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

VM scrolling locks up #4636

Closed
jtran19 opened this issue Nov 9, 2022 · 23 comments
Closed

VM scrolling locks up #4636

jtran19 opened this issue Nov 9, 2022 · 23 comments
Labels
apple virtualization macOS Virtualization issues
Milestone

Comments

@jtran19
Copy link

jtran19 commented Nov 9, 2022

Describe the issue
When scrolling quickly (flick on a Trackpad) or near the ends (top/bottom) of a page, the UI locks up for 5+ seconds. Most noticeable in vscode-insiders, but also happens in Google Chrome.

Update 1: Scrolling with a mouse (Logitech MX Master 2S) works without issues or lock ups.

Configuration

  • UTM Version: 4.1.01
  • macOS Version: 13 (Ventura)
  • Mac Chip (Intel, M1, ...): M1

Upload VM
config.plist.zip

Footnotes

  1. Issue also occurs in 4.0.7, 4.0.8 and 4.0.9, but not as noticeably. When it does happen in these versions, the lock up is not as easily triggered and does not last as long.

@osy
Copy link
Contributor

osy commented Nov 23, 2022

This is likely an Apple issue and would be difficult to debug on our end.

@jdork0
Copy link

jdork0 commented Dec 21, 2022

I think this is being caused by this commit: 6d66612

I have macOS 13.1 with a macOS 13.1 guest running on an M2 MacBook Air. I don't see any problems before release 4.0.6 and if I rebuild the latest code without this change, I no longer see the issue.

Edit: Seems like this problem is only visible when using my bluetooth Magic Trackpad (connected to the host). If I turn off bluetooth and use the built-in trackpad on my laptop, then I can't re-create this.

@jtran19
Copy link
Author

jtran19 commented Jan 4, 2023

FWIW, I am using a bluetooth connected Magic Trackpad. However, it does also happen to me when I'm using the built-in trackpad on my 2021 MBP 16".

@jdork0
Copy link

jdork0 commented Jan 4, 2023

Tried again and I was wrong. It does still happen with the built in trackpad. I reverted to UTM v3.2.4 as it has no problems for me.

@osy, any chance the trackpad config can be made optional? macOS VMs on arm Macs are unusable for me with this issue.

@osy osy added this to the v4.2 milestone Jan 4, 2023
@jtran19
Copy link
Author

jtran19 commented Jan 5, 2023

I'm not sure what the added trackpad feature was in v4. I don't have the Trackpad settings option in my System Settings.

@osy osy added the apple virtualization macOS Virtualization issues label Mar 5, 2023
@osy osy closed this as completed in 76d3277 Mar 5, 2023
@jtran19
Copy link
Author

jtran19 commented Mar 10, 2023

Installed the latest beta (4.2.0) and the scrolling issues have been resolved for me. Doesn't feel like scrolling in the host OS, but it's not locking up anymore. However, I'm having the right-click issues described by #4645. Going on memory...I think UTM v3 had the click issues, but they were resolved for me in v4.0.x and v4.1.x.

Sometimes when I right-click, the following sequence occurs:

  1. nothing happens, I right-click again
  2. nothing happens, I right-click again
  3. context menu appears
  4. context menu disappears when I move my cursor onto it to select from the menu
  5. I right-click again
  6. context menu appears
  7. I can now select from the menu

Doesn't happen all the time, but it reliably happens every time I type, stop typing, right-click without first moving the cursor. I'll try to find a 100% reproducible pattern.

@osy
Copy link
Contributor

osy commented Mar 11, 2023

@jtran19 how is your right click configured? Is this on a trackpad or mouse or Magic Mouse?

osy added a commit that referenced this issue Mar 11, 2023
@osy
Copy link
Contributor

osy commented Mar 11, 2023

Okay, I think I was able to reproduce it and this new commit seems to fix it. Let me know after the next update.

osy added a commit that referenced this issue Mar 11, 2023
@jtran19
Copy link
Author

jtran19 commented Mar 12, 2023

@jtran19 how is your right click configured? Is this on a trackpad or mouse or Magic Mouse?

In my host OS, I have
Secondary Click = "Click with Two Fingers"
Tap to click = disabled

In my VM, I only have mouse settings (no trackpad):
image

This happens on trackpad (Magic Trackpad and built-in MacBook Pro trackpad). No scrolling/clicking issues when I use my Logitech MX Master 2S. I don't have a Magic Mouse to test with.

Also, is there supposed to be some kind of "trackpad config" in the VM settings? This is the only thing I see related to input devices:

image

@jtran19
Copy link
Author

jtran19 commented Mar 21, 2023

I can confirm v4.2.1 fixes the click issue for me (#4645) but breaks scrolling on trackpad.

@osy
Copy link
Contributor

osy commented Mar 21, 2023

@jtran19 so if I understand correctly, scrolling issue fixed -> click issue and click issue fixed -> scrolling issue? Basically there’s no way to fix them both at once?

@jdork0
Copy link

jdork0 commented Mar 21, 2023

@osy I've seen the same thing playing with the code. VZMacTrackpadConfiguration will fix the click issue, but it causes the scroll issue.

@jtran19
Copy link
Author

jtran19 commented Mar 21, 2023

I have not looked at the code, but if it's a single change for both issues, then I don't see how they could both be fixed at once. Perhaps a current limitation in the Apple visualization library?

@jtran19
Copy link
Author

jtran19 commented Mar 21, 2023

Ok, looking at what you did in commit ae8cce8 and some quick Googling on VZMacTrackpadConfiguration, I don't think the 2 issues can be fixed at the same time if they're both related to the pointing device that the VM is configured with.

@osy
Copy link
Contributor

osy commented Mar 21, 2023

Okay would you agree that fixing click issue is higher priority than fixing scrolling issue? I’ll file a feedback with apple in the meantime.

@jdork0
Copy link

jdork0 commented Mar 21, 2023

You can work around the click issue by holding down control while clicking. When it locks up scrolling you're stuck until it comes back.

@jtran19
Copy link
Author

jtran19 commented Mar 21, 2023

While there might be a workaround for the click issue, I'd prefer to have the click issue fixed over the scroll issue. I can use a mouse to avoid the scroll issue, but the click issue results in selecting unwanted options from the context menu.

@osy
Copy link
Contributor

osy commented Mar 21, 2023

Filed FB12073793 with Apple

@wizzard0
Copy link

wizzard0 commented Mar 22, 2023

Can confirm 4.2.2 (78) no longer locks up. Scrolling is subtly different from the native one, and sometimes lags for ~0.1-1s before the scrolling starts, but finally usable (4.1.6 was locking up like every minute for 20s). Thanks a lot 🙇

UPD: So far I don't observe the issue with clicking, either.

UPD2: Scrolling lockups are back. Can't say I changed something specific :(

@wizzard0
Copy link

Minor annoyance: if you use the VM in a window, the scrolling might \appear\ to be locked up because it seems that the VM doesn't capture scroll events when defocused, unlike other apps where I can hover and scroll without activating the window.
But if you click first, everything works.

Don't remember if this was the case with 4.1.6.

@osy
Copy link
Contributor

osy commented Mar 23, 2023

Reply from apple:

Thank you for your message. Upon further review, we require additional files to help us investigate your feedback. Please reproduce the issue, provide a screenshot/screen recording, capture a sysdiagnose, and use Feedback Assistant to gather the requested file.

Can someone provide this?

osy added a commit that referenced this issue Apr 24, 2023
Previously, we implemented both the USB pointer and trackpad device but it
introduced double-clicking and scrolling issues (#4636, #4645). After
setting the default to trackpad for macOS, it turns out that Monterey guests
do not have the right driver for it and does not work.

Now, we will attempt to detect Monterey on new installs and enable the
trackpad when it is not Monterey (no earlier macOS versions are supported).
Existing VMs will default to trackpad off for compatibility and will require
manual setting to enable it.

Fixes #5237
@ThomDap
Copy link

ThomDap commented Oct 9, 2023

Any update ? Can't barely use macOS 13 VM on M2

@tenedor
Copy link

tenedor commented Apr 5, 2024

I've been having the same issue for months, running MacOS 13.5 in UTM 4.4.4 on M2. Scrolling within the VM freezes the VM for 10+ seconds, particularly scrolling in certain apps like VSCode. Is this simply the expected behavior at this point, or is there a workaround I can use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apple virtualization macOS Virtualization issues
Projects
None yet
Development

No branches or pull requests

6 participants