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
    
2
  • 1
    For anyone coming along this in the future, the Driver "vesa" line is unnecessary, I'm not sure whether it might be detrimental for performance to add this line.
    – galexite
    Commented Oct 18, 2020 at 12:40
  • @galexite Yes; in fact, you should remove the line — with it, the X server will not start, but without it, it starts up just fine with the mouse.
    – StarDust
    Commented Apr 20, 2021 at 23:28

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .