On Ubuntu 26.04, the Windows 10 operating system created using VirtualBox and Virt-Manager cannot support screen splitting

Ubuntu Version:
ubuntu budgie 26.04 wayland(labwc)

Desktop Environment (if applicable):
Budgie

Problem Description:
On Ubuntu budgie 26.04 wayland wthe Windows 10 operating system created using VirtualBox and Virt-Manager cannot utilize screen splitting (win+ ← / →), as shortcut keys are intercepted by the virtual machine management system; this issue does not occur on Ubuntu budgie 24.04 (X11).

1 Like

That’s a problem with most any virtual machine and it’s not even limited to that; GNOME keyboard shortcuts override local application shortcuts just as well, for instance. There should be a keyboard shortcut to release your mouse and keyboard from the VM, e.g. ShiftF12 with virt-viewer.

3 Likes

This isn’t really virt-manager or VirtualBox stealing your shortcut. It’s mostly a Wayland limitation.

On X11, a VM could grab the keyboard exclusively, so shortcuts like Super+Left went straight to the guest. Wayland doesn’t allow that by default. Instead, applications have to use the keyboard-shortcuts-inhibit protocol, and not every VM client supports it. virt-viewer has support in some versions, but the standard “VirtualBox” window usually doesn’t.

That’s why labwc still handles Super+Left and Super+Right as its own shortcuts. The overrideInhibition option only matters if the application actually requests shortcut inhibition, which VirtualBox generally doesn’t.

Your options are basically to change the host shortcut to something else, or use the Windows snap shortcut from inside the guest once the VM has focus.

3 Likes

That’s expected behavior with most VM solutions. The host OS captures global shortcuts first. Try using the viewer’s release key or remap the conflicting host shortcut if you need it inside the guest.

2 Likes

How do I map the interface in Oracle Virtual Box 7.2.12? I need a screenshot for clarification—I can’t find the method. Thank you.

This should be what you’re looking for; no screenshot, though, because I’m using Virtual Machine Manager and have thus no need for VB. I’d suggest something like right r(ight)Alt (Gr)+rCtrl; that combo should be safe from overriding any vital function inside the VM.

How do I combine the right mouse button with Win+← and Win+→? The following VBS code I used doesn’t work.

Set WshShell = CreateObject(“WScript.Shell”)
WshShell.SendKeys “#{LEFT}”
WScript.Sleep 200
’ WshShell.SendKeys “#{RIGHT}”

No, sorry for being vague on this, you press and immediately release the host key to trigger the action of catching and releasing the mouse and keyboard (sometimes the two may also be referred to as “cursor”). The VM needs exclusive access to your keyboard, for Super shortcuts to work; otherwise the host GNOME session may overrule them.

But I’ve also noticed that even then it doesn’t always work. I sometimes have to click somewhere in the window to really give it the focus, even though I have switched to it with SuperTab, for instance.
Weirdly enough, while exploring the GNOME keyboard shortcuts in Settings, Super and Super were shown as disabled:


A terminal in the background (sadly forgot to bring it into the picture) is set “View split on left”. I did that with the extra convincing described above, even though the shortcuts are disabled. :red_question_mark:
Try setting/enabling them, that seems to do the trick for me.

My best guess is that the virtio driver, which enables dynamic display resizing among many other creature comforts, is somehow involved. But I haven’t investigated it further yet.

Since you’re using Virt-Manager, at least when not using Virtualbox, I find virt-viewer to work better for me, with more consistent cursor catch and release behavior. I start the VM in Virt-Manager and then run virt-viewer -ac gemu:///system; depending on your setup it might be virt-viewer -ac gemu:///session (in case of user mode). Then I select the VM and connect.
The default “host key” equivalent is ShiftF12, but it’s easily changeable in the preferences; fullscreen is the familiar F11. Switching focus to a virt-viewer window immediately catches the cursor and it has to be released by the shortcut or by moving the mouse outside the window.


I wanted to see if I can disable the shortcuts to redo the screenshot, but GNOME was ahead of me:


:exclamation_question_mark:

Thank you for your response. After changing the host machine, I found that pressing Win+← or Win+→ on the virtual machine still didn’t work—the key presses were blocked by the host machine. Unless the Ubuntu 26.04 team or the virtual machine developers make adjustments, there’s no alternative solution.

Actually, that little backspace icon shows your shortcuts are disabled as well, and you’ve changed them.

I think I’ve found the likely culprit: spice-vdagent. See it’s package description:

$ apt show spice-vdagent
Package: spice-vdagent
[...]
Description: Spice agent for Linux
 spice-vdagent is the spice agent for Linux, it is used in conjunction with
 spice-compatible hypervisor, its feature includes:
  - Client mouse mode (no need to grab mouse by client, no mouse lag)
    this is handled by the daemon by feeding mouse events into the kernel
    via uinput. This will only work if the active X-session is running a
    spice-vdagent process so that its resolution can be determined.
  - Automatic adjustment of the X-session resolution to the client resolution
  - Support of copy and paste (text and images) between the active X-session
    and the client

Do you have a SPICE display set up for your VM?

But I’ve also just now realized that your host is 26.04, whereas mine is 24.04; should have read your OP more carefully, sorry.

Perhaps let’s compare our configs from the XML tab in the Details Window of Virt-Manager. Here’s mine:

<domain type="kvm">
  <name>Ubuntu_Desktop_26.04</name>
  <uuid>b0ef2cd1-a37c-42df-b2ef-f2aa05e12d76</uuid>
  <title>Ubuntu Desktop 26.04</title>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://libosinfo.org/linux/2024"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">8388608</memory>
  <currentMemory unit="KiB">6291456</currentMemory>
  <memoryBacking>
    <source type="memfd"/>
    <access mode="shared"/>
  </memoryBacking>
  <vcpu placement="static">4</vcpu>
  <cputune>
    <emulatorpin cpuset="0-4"/>
  </cputune>
  <os firmware="efi">
    <type arch="x86_64" machine="pc-q35-noble">hvm</type>
    <firmware>
      <feature enabled="no" name="enrolled-keys"/>
      <feature enabled="yes" name="secure-boot"/>
    </firmware>
    <loader readonly="yes" secure="yes" type="pflash">/usr/share/OVMF/OVMF_CODE_4M.secboot.fd</loader>
    <nvram template="/usr/share/OVMF/OVMF_VARS_4M.fd">/var/lib/libvirt/qemu/nvram/Ubuntu_Desktop_26.04_VARS.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <vmport state="off"/>
    <smm state="on"/>
  </features>
  <cpu mode="host-passthrough" check="none" migratable="on"/>
  <clock offset="utc">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/peter/Downloads/ubuntu-26.04-desktop-amd64.iso"/>
      <target dev="sda" bus="sata"/>
      <readonly/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="writeback"/>
      <source file="/var/lib/libvirt/images/ubuntu.qcow2"/>
      <target dev="sdb" bus="sata"/>
      <boot order="1"/>
      <address type="drive" controller="0" bus="0" target="0" unit="1"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </controller>
    <controller type="pci" index="0" model="pcie-root"/>
    <controller type="pci" index="1" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="1" port="0x10"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x11"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0x12"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0x13"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0x15"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
    </controller>
    <controller type="pci" index="7" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="7" port="0x16"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
    </controller>
    <controller type="pci" index="8" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="8" port="0x17"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x7"/>
    </controller>
    <controller type="pci" index="9" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="9" port="0x18"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="10" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="10" port="0x19"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x1"/>
    </controller>
    <controller type="pci" index="11" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="11" port="0x1a"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x2"/>
    </controller>
    <controller type="pci" index="12" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="12" port="0x1b"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x3"/>
    </controller>
    <controller type="pci" index="13" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="13" port="0x1c"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x4"/>
    </controller>
    <controller type="pci" index="14" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="14" port="0x1d"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x5"/>
    </controller>
    <controller type="pci" index="15" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="15" port="0x1e"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x6"/>
    </controller>
    <controller type="pci" index="16" model="pcie-to-pci-bridge">
      <model name="pcie-pci-bridge"/>
      <address type="pci" domain="0x0000" bus="0x08" slot="0x00" function="0x0"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <controller type="virtio-serial" index="0">
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </controller>
    <controller type="scsi" index="0" model="virtio-scsi">
      <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
    </controller>
    <filesystem type="mount" accessmode="passthrough">
      <driver type="virtiofs"/>
      <source dir="/home/peter/VM/shared"/>
      <target dir="host_shared"/>
      <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
    </filesystem>
    <interface type="network">
      <mac address="52:54:00:25:5c:b6"/>
      <source network="default"/>
      <model type="virtio"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </interface>
    <serial type="pty">
      <target type="isa-serial" port="0">
        <model name="isa-serial"/>
      </target>
    </serial>
    <console type="pty">
      <target type="serial" port="0"/>
    </console>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
      <address type="virtio-serial" controller="0" bus="0" port="1"/>
    </channel>
    <input type="tablet" bus="usb">
      <address type="usb" bus="0" port="1"/>
    </input>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <input type="keyboard" bus="virtio">
      <address type="pci" domain="0x0000" bus="0x09" slot="0x00" function="0x0"/>
    </input>
    <input type="tablet" bus="virtio">
      <address type="pci" domain="0x0000" bus="0x0a" slot="0x00" function="0x0"/>
    </input>
    <tpm model="tpm-tis">
      <backend type="emulator" version="2.0"/>
    </tpm>
    <graphics type="spice">
      <listen type="none"/>
      <image compression="auto_lz"/>
      <jpeg compression="auto"/>
      <zlib compression="auto"/>
      <playback compression="on"/>
      <streaming mode="filter"/>
      <gl enable="yes" rendernode="/dev/dri/renderD128"/>
    </graphics>
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>
    <audio id="1" type="spice"/>
    <video>
      <model type="virtio" heads="1" primary="yes">
        <acceleration accel3d="yes"/>
      </model>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="2"/>
    </redirdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="3"/>
    </redirdev>
    <watchdog model="itco" action="reset"/>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </memballoon>
    <rng model="virtio">
      <backend model="random">/dev/urandom</backend>
      <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
    </rng>
  </devices>
</domain>

Hopefully diff can help find relevant setup differences.

In the virtual machine operating system of Ubuntu Budgie 24.04 X11, screen splitting is supported,

whereas in Ubuntu Budgie 26.04 Wayland, it is not available.

There are no alternative solutions; only the official Ubuntu documentation and the virtual machine software developers can provide fixes.

Must be a Budgie issue then, because vanilla Ubuntu’s GNOME works just fine(ish).

Then you should let them know about this, i.e. file a bug report:

ubuntu-bug budgie-desktop

Run it from the VM, so it can collect the relevant additional info and attach it to your report.
Could also be more like:

ubuntu-bug spice-vdagent

or some other virtio (adjacent) stuff.
BTW:

This clearly shows that the shortcuts are disabled; the little “backspace” icon indicates that. While in GNOME they still seem to work, somehow, I have no idea what that means for Budgie.

These are the default Wayland shortcut keys for Ubuntu Budgie 26.04. I’ve reported that screen splitting isn’t possible on the operating system within a virtual machine, and they attributed this to a Wayland issue—specifically stating that your system is running version 26.04.

Why don’t you share a link to that conversation and an excerpt? This style of communication is akin to hearsay and not very productive. Others will want to know that info, too. After all, they might end up in this thread, if they encounter the same issue.
Also, my system is irrelevant, insofar as it works for me, albeit a little erratically, with GNOME in a VM running Ubuntu 26.04 on a 24.04 host. If anything, that’s proof positive, this isn’t a generic issue and narrows down the list of possible suspects.

Plus, there is no Wayland, only compositors implementing it. It’s just a set of protocols. So saying it’s not a Budgie issue, is oxymoronic.

Thank you! This finally prompted me to revisit the problem of missing shortcuts in remote-viewer console and the solution was a couple of mouse clicks away :slight_smile:

I have no idea why Inhibit Shortcuts was disabled, I do not remember having seen any prompts to allow it, but maybe it’s my memory.

Hmm … as long as I can believe the information I found VirtualBox still runs as a X11 application running under Xwayland. Which shifts the problem from “VirtualBox does not support keyboard shortcut inhibition protocol” to “how to tell a specific Wayland compositor to allow keyboard grab by a specific Xwayland client”. It is possible in Mutter, not sure about labwc.