6

When I run qemu-system_x86_64 with -vga qxl/-device qxl-vga or -vga virtio/-device virtio-vga, the guest has no visible cursor. The mouse works, and items highlight when I hover over them, but I can't actually see the cursor. With standard VGA everything works as expected.

I'm using QEMU 4.2.94 on macOS 10.15.3.

For the guest I've tried both Alpine and Zorin OS Core.

This is what I'm running:

qemu-system-x86_64 -m 2048 \ 
    -hda "path/to/my/vm/image" \
    -accel hvf \
    -device virtio-vga,xres=1280,yres=800

Edit: I figured out that the problem is that the graphics driver used with qxl supports a hardware cursor, but the cocoa display doesn’t support it. For now I’ve enabled the software cursor (see this thread for details).

Is there any way to add hardware cursor support to QEMU’s cocoa display?


For anyone who’s interested, this how I enabled the software cursor:

  1. Create the directory /etc/X11/xorg.conf.d if it doesn’t exist already.

  2. Create a file in xorg.conf.d ending in .conf (I named mine vesa-swcursor.conf) with:

     Section "Device"
       Identifier "graphicsdriver"
       Option     "SWcursor" "on"
     EndSection
    
galexite
  • 187

1 Answers1

1

-display cocoa,show-cursor=on will ensure that the cursor is drawn by the cocoa display, however it will always draw the standard cursor, it won't draw a hand or an I-beam or a resize cursor at window edges.

Mecki
  • 1,218