Plasma on Wayland VirtualBox guest screen resize

Vlad Zahorodnii vlad.zahorodnii at kde.org
Tue Feb 1 21:49:28 GMT 2022


On 2/1/22 22:58, Vadim Galitsin wrote:
> Hi guys,
> 
> I am currently looking to the issue with VirtualBox guest screen 
> resizing when guest is running Plasma on Wayland (using VMSVGA graphics 
> configuration).
> 
> For my experiments, I use Kubuntu 22.04 guest with Plasma 5.23. Guest 
> Additions are from our latest development build 
> (https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_6.1.97-149665.iso).
> 
> In general, screen resizing does not work. If I, for example, drag 
> right-bottom corner of the guest window, I can see that guest screen 
> up-scales, but does not increase in size. So, it looks like a zoom-in 
> effect when image size stays the same.
> 
> For resizing on a guest side, we are using tool called VBoxDRMClient 
> (https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Additions/x11/VBoxClient/display-drm.cpp). 
> This tool receives resize hints from host and injects them into vmwgfx 
> driver using custom ioctl DRM_IOCTL_VMW_UPDATE_LAYOUT. This approach 
> works for X11 Desktop Environments as well as for Gnome3 on Wayland. 
> However, not for Plasma case.
> 
> What do you think if we could take a look to the issue from both sides? 
> If there is something in your mind what VBoxDRMClient is potentially 
> missing to have better integration with KDE/Plasma, we could discuss that.
> 
> Best regards,
> Vadim

Hi,

There was some work in 5.23 to improve VM integration, but it looks like 
there are still some issues.. As long as kwin_wayland receives a change 
udev event after the vm window has been resized, kwin should re-scan drm 
connectors, reload modes, and resize the workspace to match the new 
output layout.

Relevant code is here 
https://invent.kde.org/plasma/kwin/-/blob/749cf798ce465634b616682e7c072f0a43a22906/src/backends/drm/drm_backend.cpp#L254. 
It's worth checking if kwin receives the relevant udev event.

Cheers,
Vlad


More information about the kde-core-devel mailing list