Slow and lagging keyboard response on new macbook pro host

Discussions related to using VirtualBox on Mac OS X hosts.

Slow and lagging keyboard response on new macbook pro host

Postby mannyk » 22. Aug 2020, 20:48

On a new macbook pro 13" with 16GB memory and quadcore i7, and with VirtualBox 6.1.11 and 6.1.12 (other versions not tested), I am seeing slow and lagging keyboard response for xubuntu guest applications such as emacs and firefox, independent of the display scaling but only if the window fills a good fraction of the laptop screen. The behavior does not occur for the "soft keyboard" provided by VirtualBox, only for the macbook pro keyboard. I can replicate the behavior with the "test" xubuntu on the installation disk, once I change the display resolution to 1280x1024 on 200% scaling. The test involves bringing up a long page in firefox, then pressing up- or down-arrow for a bit. On releasing, the scrolling continues for a while. With emacs, typing fast results in duplicate key press events and other lagging behavior. I modified ticket 16436 with my observations, comments #114 and #115, see https://www.virtualbox.org/ticket/16436#comment:114. A VBox.log can be found there. I see various other forum posts asking about slow performances of guests on macbook pro that may relate, but they didn't seem like good matches, hence the new topic. Comments?
mannyk
 
Posts: 5
Joined: 4. Dec 2013, 21:58

Re: Slow and lagging keyboard response on new macbook pro host

Postby fth0 » 23. Aug 2020, 00:17

I'm experiencing similar effects, using the Eclipse Development Environment, which is based on Java, but I haven't bothered enough to start a detailed investigation yet.

I'm wandering if the slowness has to do with the keyboard input, or rather with the scrolling of the display content. What happens within a text editor with a large text when pressing and holding the right arrow key, as long as no scrolling happens? And when you use the soft keyboard, does it scroll as far as with the hard keyboard? Is the key repeat rate comparable? Or is the soft keyboard simply not buffered?
fth0
Volunteer
 
Posts: 1083
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...

Re: Slow and lagging keyboard response on new macbook pro host

Postby mannyk » 23. Aug 2020, 20:19

I checked font-size effects with emacs. Font size doesn't make a difference, just the size of the application (emacs) window.
As for #lines scrolled: I get the same effect with press&hold&release any character key in emacs. It looks like more characters show up
for the same hold time with the regular than with the soft keyboard--provided the app window is large enough on the physical
screen. The observed key-repeat rate is indistinguishable by eye. I didn't play with the key-repeat setting.
mannyk
 
Posts: 5
Joined: 4. Dec 2013, 21:58

Re: Slow and lagging keyboard response on new macbook pro host

Postby fth0 » 19. Sep 2020, 23:47

Today I started a detailed investigation:

On my iMac host with Retina display, I generally use(d) a Scale Factor of 200% for my Linux guest (and other guests as well). The VM window is configured with a 1600 x 900 resolution, and covers about 3200 x 1800 pixels on the Retina display. In the Linux guest, the keyboard repeat rate is configured to be 30 characters per second. Using xev and a stopwatch, I measured that if I press and hold a letter key for about 5 seconds, there are KeyPress and KeyRelease events generated about every 33 ms (at irregular intervals between 31 and 38 ms), but for a total duration of 12.5 seconds.

Changing the resolution, the scale factor or the key press duration all lead to different timings, but with the commonality that the key events are generated longer than the key is pressed. Changing 3d acceleration, the graphics controller, or uninstalling the VirtualBox Guest Additions also lead to different timings.

In the end, I found a solution: VirtualBoxVM is the binary application that runs the VM. Setting it to Open in Low Resolution, and using a Scale Factor of 100% results in the same VM window size, but macOS does the doubling of the resolution, and my problem is gone. Can you try if it also solves your problems?
fth0
Volunteer
 
Posts: 1083
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...

Re: Slow and lagging keyboard response on new macbook pro host

Postby mannyk » 25. Sep 2020, 23:17

Thanks for the investigation! The workaround worked on a brief test. To be clear: I navigated to the package contents of the VirtualBox app and found
'VirtualBoxVM' under Contents/Resources. In Finder, right-clicked -> get-info -> and clicked on "open in low resolution", then changed to "scale to 100%" under "view -> virtual screen 1" for my VM.
mannyk
 
Posts: 5
Joined: 4. Dec 2013, 21:58

Re: Slow and lagging keyboard response on new macbook pro host

Postby fth0 » 26. Sep 2020, 14:42

mannyk wrote:To be clear: [...]

Yes, that's exactly what I meant. ;)
fth0
Volunteer
 
Posts: 1083
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...

Re: Slow and lagging keyboard response on new macbook pro host

Postby Silverdroid » 29. Sep 2020, 21:22

What is the current state of this problem? All's I can say is that I was using a 2011 iMac and Windows would run smoothe as butter with completely seamless integrated applications. Now with a 2019 MacBook Pro that is significantly more powerful with an i9 and 32 GB of RAM, it is sluggish and slow as molasses. I have experimented with different core amounts, 3D graphics acceleration, and all that jazz, and still can't get decent performance. Is there some issue with macOS Catalina? On my 2011 up to High Sierra it was fine, and again, with significantly less powerful hardware.
Silverdroid
 
Posts: 2
Joined: 29. Sep 2020, 21:19

Re: Slow and lagging keyboard response on new macbook pro host

Postby fth0 » 30. Sep 2020, 12:38

Silverdroid wrote:What is the current state of this problem?

There is a workaround, but no final solution.

If your problem is the same as the one discussed here, you know what to do.

The important detail that you didn't mention is if your 2011 iMac had a Retina display.
fth0
Volunteer
 
Posts: 1083
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...

Re: Slow and lagging keyboard response on new macbook pro host

Postby Silverdroid » 30. Sep 2020, 16:43

fth0 wrote:The important detail that you didn't mention is if your 2011 iMac had a Retina display.


I don't think retina existed on their desktops in 2011? I have the first retina Macbook which was 2012, but unsure about the desktop.
Silverdroid
 
Posts: 2
Joined: 29. Sep 2020, 21:19

Re: Slow and lagging keyboard response on new macbook pro host

Postby fth0 » 30. Sep 2020, 19:53

Silverdroid wrote:I don't think retina existed on their desktops in 2011?

Yes, you're right. I just checked it to learn that the MacBook Pro used Retina displays since 2012, and the iMac since 2014.
fth0
Volunteer
 
Posts: 1083
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...


Return to VirtualBox on Mac OS X Hosts

Who is online

Users browsing this forum: No registered users and 14 guests