1

I'm trying to open a KVM VM fullscreen without a user being able to close the window of Qemu SDL GUI. My test machine has 1680x1050 resolution, but I'm NOT able to make any VM GUI to be fullscreen as my 1680x1050 resolution.

BTW, I'm opening it directly, not via SPICE. Let's imagine a scenario when this VM would be started and made fullscreen on a user monitor when his computer boots (ie. instead of X11 WM there would be directly started qemu SDL GUI).

Any idea how to achieve same resolution in qemu SDL window as the virtual host machine has? IIUC -vga std should cover such revolution.

qemu-system-x86_64 \
-vga std \
-accel kvm \
-smp 2 -m 2048 \
-boot c -cdrom <livecd> -bios bios-256k.bin -boot menu=on \
-hda <disk> \
-display sdl,alt_grab=on,window_close=off \
-usb -device usb-tablet \
-full-screen
4
  • IIUC -vga virtio needs driver in guest, am i right?
    – Jiri B
    Mar 10 at 12:20
  • IIUC there must be a driver for guest OS, there's one for Linux but missing for Windows.
    – Jiri B
    Mar 10 at 12:39
  • 1
    Not a solution but... -display spice-app calls XDG-based app for spice url scheme (see xdg-settings get default-url-scheme-handler spice), thus one could create a wrapper with remote-viewer -f -k --kiosk-quit=never <socket>. But I would prefer native solution... With spice fullscreen resolution is OK.
    – Jiri B
    Mar 10 at 13:36
  • 1
    Wrapper: desktop-file-install --dir ~/.local/share/applications/ /usr/share/applications/remote-viewer.desktop, desktop-file-edit --set-key=Exec --set-value='myremote-viewer %u' ~/.local/share/applications/remote-viewer.desktop, and inside wrapper I do exec /usr/bin/remote-viewer --kiosk --kiosk-quit=never --full-screen "$@"...
    – Jiri B
    Mar 10 at 14:25
0

Tested only with Ubuntu Linux 20.10 (X11) guest VM.

qemu-system-x86_64 -nodefaults -name test -accel kvm \
-smp 2 -m 2048 -bios bios-256k.bin -boot menu=on \
-cdrom ubuntu-20.10-desktop-amd64.iso \
-device qemu-xhci,id=usb-bus -device usb-tablet \
-display sdl \
...graphics...
-netdev user,id=hostnet0 -device virtio-net-pci,netdev=hostnet0 \
-full-screen -no-quit

VGA driver, no defined resolution (bochs_drm kernel, fb X11)

-device VGA,vgamem_mb=64 # bad 1024x768

VGA driver, defined resolution (bochs_drm kernel, fb X11)

-device VGA,vgamem_mb=64,xres=1680,yres=1050 # ok

QXL-VGA, qxl driver in guest VM, no defined resolution (qxl kernel, qxl_dri X11)

-device qxl-vga,vgamem_mb=64 # bad 1024x768

QXL-VGA, qxl driver in guest VM, defined resolution

-device qxl-vga,vgamem_mb=64,xres=1680,yres=1050 # ok

virtio-vga, driver in guest VM, no defined resolution (virtio-pci kernel, fb/modesettings X11 - not sure here)

-device virtio-vga # bad 1024x768

virtio-vga, driver in guest VM

-device virtio-vga,xres=1680,yres=1050 # ok

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.