Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor sometimes disappears or shows a stale state when SPICE is installed #2628

Closed
Terabyte1385 opened this issue Jun 20, 2021 · 76 comments
Closed
Labels
spice Spice/CocoaSpice related
Milestone

Comments

@Terabyte1385
Copy link

Terabyte1385 commented Jun 20, 2021

Describe the issue
My Windows pointer is somewhere, but the pointer is actually somewhere else. Screenshot attached.

Configuration

  • UTM Version: Version 2.1.1 (30)
  • OS Version: macOS 12.0 Dev Beta 1
  • Intel or Apple Silicon? Apple Silicon

Crash log
If the app crashed, you need a crash log. To get your crash log, open Console.app, go to Crash Reports, and find the latest entry for either QEMU, QEMUHelper, or qemu-*. Right click and choose Reveal in Finder. Attach the report here.

Debug log
For all issues, including crashes, you should attach a debug log. Open UTM, and open the settings for the VM you wish to launch. Near the top of the QEMU page is Debug Log. Turn it on and save the VM. After you experience the issue, open the VM settings again and select Export Log... and attach it here.

Upload VM
(Optional) If possible, upload the config.plist inside the .utm. If you do not have this, you can upload the entire .utm but note this contains your personal data. Since Github has an attachment size limit, you may want to upload to another service such as Google Drive. Link it here.

@Terabyte1385
Copy link
Author

Update: Cursor sometimes even goes invisible.

@Terabyte1385
Copy link
Author

Screenshot 2021-06-20 at 11 47 26

Screenshot 2021-06-20 at 11 48 50

@Terabyte1385
Copy link
Author

First image: Cursor does not work properly, pointing towards the close button actually points somewhere else.
Second image: Cursor goes invisible.

@conath
Copy link
Contributor

conath commented Jun 24, 2021

I have this issues sometimes as well. Clicking the Capture Cursor button in the Toolbar and then pressing ctrl-option/alt to unlock it again seems to fix it every time.

@Terabyte1385
Copy link
Author

Doesn't work for me unfortunately. :(

@mlwyne
Copy link

mlwyne commented Jul 2, 2021

Does changing to display 2 instead of display 1 help?

@osy osy added the interface Design, UX/UI issues label Jul 5, 2021
@osy
Copy link
Contributor

osy commented Jul 5, 2021

Related to #2569

And I also run into this issue a lot. Just haven't had the time to figure it out.

@osy
Copy link
Contributor

osy commented Jul 10, 2021

I think the cursor disappearing issue is a Windows driver issue. Without installing the SPICE tools, it doesn't happen.

@Terabyte1385
Copy link
Author

So should I uninstall SPICE tools?

@osy
Copy link
Contributor

osy commented Jul 11, 2021

Try it and report back.

@Terabyte1385
Copy link
Author

Now it seems to work fine, even though I still have SPICE tools installed. It seems like this issue happens if I move my cursor during startup. I'll play with it in the following days and I will let you know how's going.

@Terabyte1385
Copy link
Author

Does changing to display 2 instead of display 1 help?

I did change to display 2 now so that I can get a higher resolution but the cursor disappears or clicks somewhere else instead of clicking where it is pointing. Display 1 has a terrible resolution but cursor works perfectly.

@dmuratov-als
Copy link

I have a mouse pointer constantly disappearing on display 1 with SPICE installed. MacBook Air with M1.

@Terabyte1385
Copy link
Author

I have a mouse pointer constantly disappearing on display 1 with SPICE installed. MacBook Air with M1.

Same here but on display 2. Also 8GB MacBook Air with M1.

@Vishram1123
Copy link

To mitigate this, I used a different cursor that will be rendered by Windows instead of QEMU. By using the Inverted cursor, Windows will have to render it, preventing the cursor from disappearing. One caveat of this is that there are sometimes two cursors on the screen.

@meshonline
Copy link

I may figure it out:)

The Windows 10 VM generated by v2.1.1 may not compatible with v2.1.2, the document says that after installation, you need to setup display to “Show only on 1”, this will cause lots of mouse issues, you should not modify the display settings, always leave it as default, please always setup resolution in BIOS when starting by press 'ESC'.

I have re-installed Windows 10 VM from scratch, the issue disappeared.

@Terabyte1385
Copy link
Author

Okay, will try that out!

@Terabyte1385
Copy link
Author

Screenshot 2021-07-14 at 09 59 32

Where can I change the resolution here in the BIOS?

@Terabyte1385
Copy link
Author

Screenshot 2021-07-14 at 10 02 02

Actually, I got there. What resolution do I put?

@yoedy108
Copy link

@meshonline Thanks for the tip! I re-installed Win10, kept the default display settings, installed SPICE Tools (need network access), changed the resolution thru BIOS and indeed the mouse cursor stays put.

Only thing, this is a workaround and shouldn't be treated as a fix for this issue, as resolution cannot be changed in the OS settings (disabled when changing thru BIOS), and the resolution is limited to a max of 1024x768, when using virtio-ramfb.
As per suggestions from #2569 , using ramfb shows a black screen, and virtio-gpu-pci crashes Windows Settings when trying to open it.

So I guess until this issue is fixed, this is a good enough workaround to be able to work.
Thank you!

@meshonline
Copy link

meshonline commented Jul 17, 2021

To use high resolution on Apple Silicon/M1 machine, I built a custom bios from the source code of the 'edk2' project, it supports almost all popular resolutions, vary from standard VGA display to 5K retina display.

http://www.mesh-online.net/edk2-aarch64-code.fd.zip

Download and unzip the package, replace '/Applications/UTM.app/Contents/Resources/qemu/edk2-aarch64-code.fd' with the custom 'edk2-aarch64-code.fd'.

When starting, press 'ESC' key to enter BIOS interface, from 'Device Manager->OVMF Platform Configuration->Change Preferred', setup a preferred high resolution, select 'Commit Changes and Exit' and press enter, press 'ESC' key, select 'Reset' and press enter, the VM will re-start with the preferred high resolution.

The window may be larger than the screen, enter full screen mode, the window will fit the screen automatically, if the fonts look too small, you can setup the scale to 200% for the 2nd display from 'Display Settings' in Windows 10, the retina fonts always look comfortable than small fonts.

Enjoy it!

@Terabyte1385
Copy link
Author

Terabyte1385 commented Jul 17, 2021

Thanks! It works perfectly! Just one last question; what is the best resolution for a MacBook Air? I tried 1920x1080 (the default for Windows 10 PCs) and it resizes and leaves a big black line at the top and bottom. The width is just fine.

@meshonline
Copy link

I guess that 2880 x 1800 is suitable for MacBook Air, set scale to 200% in Windows.

@Terabyte1385
Copy link
Author

It is too big. I cannot even see the Windows logo in the wallpaper or even the taskbar.

It seems like the resolution is changing back to default after every reboot.

@meshonline
Copy link

It is too big. I cannot even see the Windows logo in the wallpaper or even the taskbar.

It seems like the resolution is changing back to default after every reboot.

Yes, the window is too big, but if you switch to full screen mode and wait for a few seconds, the window will fit to the screen automatically.

@Terabyte1385
Copy link
Author

Terabyte1385 commented Jul 17, 2021

I have been waiting for minutes and nothing happens. The window still remains too big even in fullscreen.
Screenshot 2021-07-17 at 16 16 29

@Terabyte1385
Copy link
Author

UPDATE: It worked after moving to the desktop and leaving the window with the VM "alone" for a few minutes.

@Terabyte1385
Copy link
Author

Is there a way to set this resolution to apply at all times, without having to boot into BIOS every time and set it manually?

@osy osy added this to the v3.1 milestone Oct 24, 2021
@ozbrk
Copy link

ozbrk commented Oct 28, 2021

aaaah here we go again. An open issue :D

Ok I have a theory on this. It appears UTM can emulate the VMware-svga and I want to test it. AFAIK VMware relies on openvm tools and they really good at rendering graphics. Can we implement the technology somehow?

@ozbrk
Copy link

ozbrk commented Oct 29, 2021

AS A REALLY REALLY strange workaround, you can RDP to the virtual machine. Remote sessions uses different graphic operators then real systems soooo the rules won't be applied here :D :D :D This can be worked out until a solution found

@osy
Copy link
Contributor

osy commented Nov 1, 2021

This was quite a tricky bug but it turned out to be a race condition in the virtio-gpu driver: https://gitlab.freedesktop.org/osy86/virtio-gpu-wddm-dod/-/commit/8f14154a6cb608bfe713d52c6908d997bcbc20bf

I will released an update SPICE tools ISO as soon as I get the driver signed, but people can build it and test sign it themselves if they have an urgent need to get this fix.

@osy osy modified the milestones: v3.1, v3.0 Nov 1, 2021
@osy osy changed the title Cursor problems if resolution is changed in the Windows guest Cursor sometimes disappears or shows a stale state when SPICE is installed Nov 1, 2021
@AwlsomeAlex
Copy link

@osy Could you point to documentation that explains how to build this ourselves?

@osy
Copy link
Contributor

osy commented Nov 2, 2021

I would advise waiting for the signed version. It's really complicated and a pain to run unsigned drivers on Windows 10 and 11. It took me like half a day to figure it out.

@AwlsomeAlex
Copy link

Gotcha, okay.

@tiberiogf
Copy link

To use high resolution on Apple Silicon/M1 machine, I built a custom bios from the source code of the 'edk2' project, it supports almost all popular resolutions, vary from standard VGA display to 5K retina display.

http://www.mesh-online.net/edk2-aarch64-code.fd.zip

Download and unzip the package, replace '/Applications/UTM.app/Contents/Resources/qemu/edk2-aarch64-code.fd' with the custom 'edk2-aarch64-code.fd'.

When starting, press 'ESC' key to enter BIOS interface, from 'Device Manager->OVMF Platform Configuration->Change Preferred', setup a preferred high resolution, select 'Commit Changes and Exit' and press enter, press 'ESC' key, select 'Reset' and press enter, the VM will re-start with the preferred high resolution.

The window may be larger than the screen, enter full screen mode, the window will fit the screen automatically, if the fonts look too small, you can setup the scale to 200% for the 2nd display from 'Display Settings' in Windows 10, the retina fonts always look comfortable than small fonts.

Enjoy it!

image

Can you upload this file again on Google Drive?

@meshonline
Copy link

meshonline commented Nov 2, 2021

Sorry, I had wrongly deleted 'eedk2-aarch64-code.fd.zip' before, and I can find a copy on my machine:(
Updated: I have made a new one and uploaded to the website.

@meshonline
Copy link

meshonline commented Nov 3, 2021

I found the improved version and uploaded to the website: https://www.mesh-online.net/custom-bios-utm.zip
Unzip the file, there is a 'Readme.txt', read it carefully to setup custom BIOS in UTM.

@ozbrk
Copy link

ozbrk commented Nov 3, 2021

When will we get the signed driver :D @osy

@gonewithharshwinds
Copy link

I randomly tried to hit esc button when it was invisible... it came back! XD

@osy
Copy link
Contributor

osy commented Nov 4, 2021

When will we get the signed driver :D @osy

Here's the ARM64 version Signed_1152921505694127345.zip

@AwlsomeAlex
Copy link

AwlsomeAlex commented Nov 4, 2021

@osy Just installed it, works well.
Only problem is if you try to drag a window, it'll create a second cursor, where one will stay in place and the other will follow you. Once you release it becomes one again. Video below is a demonstration of it.

Cursor.Anomaly.mov

EDIT: Oops, found something. SPICE will crash if you try to reboot. Attached is crash log and QEMU export.

qemu-aarch64-softmmu: Spice: red-qxl.c:807:spice_qxl_gl_scanout: condition `qxl_state->gl_draw_cookie == GL_DRAW_COOKIE_INVALID' failed

crash.log
debug.log

Not sure if this existed before. Need to spin up a new VM and reinstall the current SPICE drivers....

EDIT 2: Crash above is not specific to this new driver. Opened a new issue. #3250

@Terabyte1385
Copy link
Author

@osy Just installed it, works well. Only problem is if you try to drag a window, it'll create a second cursor, where one will stay in place and the other will follow you. Once you release it becomes one again.

Same here. Is doesn’t really annoy me but I find it frustrating in some situations.

@ozbrk
Copy link

ozbrk commented Nov 4, 2021

Same here and cursor without the capturing more is simply useless

@ghost
Copy link

ghost commented Nov 4, 2021

Hello

I tried installing the new Windows 11 arm preview 22483.qcow2 and installed the custom bios like here:

I found the improved version and uploaded to the website: https://www.mesh-online.net/custom-bios-utm.zip
Unzip the file, there is a 'Readme.txt', read it carefully to setup custom BIOS in UTM.

Replaced the edk2 file with the original:

http://www.mesh-online.net/edk2-aarch64-code.fd.zip

And in UTM i used these settings:
Bildschirmfoto 2021-11-04 um 14 47 56

And this problem is happening and also the UTM gets stuck in "Getting ready":
Bildschirmfoto 2021-11-04 um 14 25 36
Bildschirmfoto 2021-11-04 um 14 23 30

Does someone know what i did wrong?

@sidjainn
Copy link

sidjainn commented Nov 10, 2021

@osy Just installed it, works well. Only problem is if you try to drag a window, it'll create a second cursor, where one will stay in place and the other will follow you. Once you release it becomes one again. Video below is a demonstration of it.

Cursor.Anomaly.mov
EDIT: Oops, found something. SPICE will crash if you try to reboot. Attached is crash log and QEMU export.

qemu-aarch64-softmmu: Spice: red-qxl.c:807:spice_qxl_gl_scanout: condition `qxl_state->gl_draw_cookie == GL_DRAW_COOKIE_INVALID' failed

crash.log debug.log

Not sure if this existed before. Need to spin up a new VM and reinstall the current SPICE drivers....

EDIT 2: Crash above is not specific to this new driver. Opened a new issue. #3250

@AwlsomeAlex can you please guide me how to install the driver? I'm a bit clueless here, thanks!

Okay, I added the driver from device manager. It's still acting sketchy for me :-/

@AwlsomeAlex
Copy link

@sidjainn They've updated the installer from their website. Please refer to that here.

@billziss-gh
Copy link

I am still experiencing this problem with spice-guest-tools-0.164.2.iso which appears to be the latest available from the Support page.

Has the fix mentioned in #2628 (comment) become publicly available as part of the SPICE guest tools ISO?

@osy
Copy link
Contributor

osy commented Jan 12, 2022

spice-guest-tools-0.164.3.iso was released on https://mac.getutm.app/support/ and it should fix the cursor issues on Windows ARM64.

@osy osy closed this as completed Jan 12, 2022
@ssbarnea
Copy link

ssbarnea commented May 11, 2022

Sadly it seems impossible to even install the tools with mouse absence inside the vm. After some tricking windows to start ther terminal and starting the intaller from there I was able to get the driver start installing but... surprise it got stuck at "Installing the viogpudo driver..." step without any sign that it wants to even finish.

@Gideon-7
Copy link

Gideon-7 commented Jul 6, 2022

I am facing black screen issue whenever I run Kali machine on my UTM. I have attached my debug log file below. Please help me to resolve this issue
debug.log
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spice Spice/CocoaSpice related
Projects
None yet
Development

No branches or pull requests