Mouse randomly stops working

Discussions related to using VirtualBox on Windows hosts.
Post Reply
janwilmans
Posts: 12
Joined: 2. Apr 2020, 13:33

Mouse randomly stops working

Post by janwilmans »

(mod edit: these posts from 2020 were on the end of someone else's solved post. Moved here for clarity)

I'm experiencing this on debian 10 guests as well. Mouse works fine for hours, days even, then suddenly it stops working.
Whats interesting, the mouse cursor still moves, but no clicks are accepted on the TOP HALF of the screen ??

The only way I get out of this is a reboot for of the guest OS.
I'm using :

sudo apt install xserver-xorg-input-evdev
sudo vi /usr/share/X11/xorg.conf.d/40-libinput.conf

Section "InputClass"
Identifier "evdev pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
janwilmans
Posts: 12
Joined: 2. Apr 2020, 13:33

Re: Mouse randomly stops working

Post by janwilmans »

On further investigation:
- its actually not the x/y coordination of the mouse that stops working, the the mouse-clicks that are not being processed anymore
- killing the VBoxClient using 'pkill VBoxClient' immediately makes the mouse responsive again

```
$ sudo pkill VBoxClient
$ sudo VBoxClient-all
```

This restarts all guest additions and restores normal operations.
janwilmans
Posts: 12
Joined: 2. Apr 2020, 13:33

mouse scroll and click problems

Post by janwilmans »

I have been for a year or so and still am experiencing mouse problems, on debian 10 in Virtualbox on a windows 10 host.
I posted about this before, but no reaction since 2. Apr 2020.

The problem persists across 6.0 and 6.1, I'm using now:
- Virtualbox 6.1 r140961
- Windows 10 19041.804 (last update 9. Febr 2021)
- Debian 10 (buster), uname -a: Linux debian 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
- xserver-xorg-input-evdev is already the newest version (1:2.10.6-1).

Is there more information I can provide? I'm a C++ software engineer, willing to help in any way I can...

Greetings,

Jan

```
Re: Mouse randomly stops working
Postby janwilmans » 2. Apr 2020, 13:37

I'm experiencing this on debian 10 guests as well. Mouse works fine for hours, days even, then suddenly it stops working.
Whats interesting, the mouse cursor still moves, but no clicks are accepted on the TOP HALF of the screen ??

I this fix, but the problem remains:

sudo apt install xserver-xorg-input-evdev
sudo vi /usr/share/X11/xorg.conf.d/40-libinput.conf

Section "InputClass"
Identifier "evdev pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection


Posts: 2
Joined: 2. Apr 2020, 13:33
Top
Re: Mouse randomly stops working
Postby janwilmans » 6. Apr 2020, 13:22

On further investigation:
- its actually not the x/y coordination of the mouse that stops working, the the mouse-clicks that are not being processed anymore
- killing the VBoxClient using 'pkill VBoxClient' immediately makes the mouse responsive again

```
$ sudo pkill VBoxClient
$ sudo VBoxClient-all
```

This restarts all guest additions and restores normal operations.

```




related links:
viewtopic.php?f=3&t=87150

https://askubuntu.com/questions/1196175 ... VirtualBox).
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: mouse scroll and click problems

Post by scottgus1 »

janwilmans wrote:no reaction since 2. Apr 2020
This'll probably be because you glommed onto someone else's topic and your posts got missed. Do not hijack other threads, create your own. Choose your title carefully.

Start the VM from full power off, not save-state. Run until you see the problem happen, and please time the run with a stopwatch so the time the problem happens can be coordinated in the logs. Then shut down the VM from within the VM OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Please right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log and the next tab over (the hardening log), zip both files, and post the zip file, using the forum's Upload Attachment tab. Also post the stopwatch time when the problem happened.
janwilmans
Posts: 12
Joined: 2. Apr 2020, 13:33

Re: Mouse randomly stops working

Post by janwilmans »

Thanks for the swift reply! I will gather the information as requested!
janwilmans
Posts: 12
Joined: 2. Apr 2020, 13:33

Re: Mouse randomly stops working

Post by janwilmans »

I caught the situation again, here are the logs:

Code: Select all

03:24:22.108289 GUI: UIMachineLogic: Guest-screen count changed
03:24:43.548801 NAT: Link down
03:24:46.549060 NAT: Link up
03:24:46.552636 NAT: DNS#0: 172.16.1.50
03:24:46.552656 NAT: DNS#1: 172.16.1.254
03:24:46.552660 NAT: DNS#2: 192.168.2.254
03:24:48.263495 NAT: DHCP offered IP address 10.0.2.15
06:42:40.970261 TM: Giving up catch-up attempt at a 60 113 369 135 ns lag; new total: 60 113 369 135 ns                         <<<=============== here the guest stop accepting mouse-clicks
06:43:39.933139 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago
06:43:39.938276 VMMDev: GuestHeartBeat: Guest is alive (gone 4 187 698 108 ns)
06:43:49.950944 TM: Giving up catch-up attempt at a 60 091 865 016 ns lag; new total: 120 205 234 151 ns
06:44:58.330836 TM: Giving up catch-up attempt at a 60 917 277 958 ns lag; new total: 181 122 512 109 ns
06:45:22.125887 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 5 seconds ago
06:45:22.126073 VMMDev: GuestHeartBeat: Guest is alive (gone 5 052 882 934 ns)
06:46:08.231232 TM: Giving up catch-up attempt at a 60 604 081 329 ns lag; new total: 241 726 593 438 ns
06:47:23.351486 TM: Giving up catch-up attempt at a 60 353 438 746 ns lag; new total: 302 080 032 184 ns
06:49:02.119980 TM: Giving up catch-up attempt at a 60 066 605 218 ns lag; new total: 362 146 637 402 ns
I also recorded a screen capture where you can see, that I'm left-clicking, the host-os is receiving the clicks (they are visible in the capture) but the guest OS is not responding to them.
Then suddenly after I right-click a couple of times, it starts working again! (I had never noticed that before).

I see two differences compared to my earlier report:
- it was not just the top half of the screen not responding, it was the whole screen
- I was able to 'repair' it with right-clicks (or that was just a coincidence and it resume normal operation after some time)

Here are the full logs you requested and the screen capture:
https://drive.google.com/drive/folders/ ... sp=sharing
Attachments
virtualbox-mouse-problem.zip
(42.61 KiB) Downloaded 10 times
Last edited by janwilmans on 28. Feb 2021, 22:27, edited 2 times in total.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Mouse randomly stops working

Post by scottgus1 »

scottgus1 wrote:Please right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log and the next tab over (the hardening log), zip both files, and post the zip file, using the forum's Upload Attachment tab. Also post the stopwatch time when the problem happened.
janwilmans
Posts: 12
Joined: 2. Apr 2020, 13:33

Re: Mouse randomly stops working

Post by janwilmans »

Ok done, the reason I didn't do that the first time: it doesn't allow uploads > 128Kb and the screen capture is 1.29 MB

As I indicated, time is: 06:42:40.970261
janwilmans
Posts: 12
Joined: 2. Apr 2020, 13:33

Re: Mouse randomly stops working

Post by janwilmans »

btw, you can DM me on twitter @janwilmans if you have questions or need more information
janwilmans
Posts: 12
Joined: 2. Apr 2020, 13:33

Re: Mouse randomly stops working

Post by janwilmans »

It seems to occur more (but not exclusively) when I'm compiling (so the cpu is pretty busy)
janwilmans
Posts: 12
Joined: 2. Apr 2020, 13:33

Re: Mouse randomly stops working

Post by janwilmans »

If you look carefully at the screen-recording you can see that mouse-overs are working, just the left-clicks are not.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Mouse randomly stops working

Post by scottgus1 »

First, Hyper-V is enabled, try disabling it . See HMR3Init: Attempting fall back to NEM (Hyper-V is active).

Also, try reducing processor count from all 6 physical host cores to just 2.

After these two, see if the mouse sticks again.
janwilmans
Posts: 12
Joined: 2. Apr 2020, 13:33

Re: Mouse randomly stops working

Post by janwilmans »

Thanks, I will try your suggestions to see if it makes any difference to the problem!

However, I compile in virtualbox, reducing the amount of cores will increase my compilation time from around 20 minutes to an hour, and I'd rather take in the inconvenience of the mouse sometimes not working instead of 3x compilation time.
I have Hyper-V enabled because I also use WSL2 and docker, turning it off renders my PC effectively useless.

Anyway, it the suggestions are only ment as a means to track down the problem, its absolutely fine to do this ;)
Btw, I checked Hyper-V, on the PC was testing on it was not enabled, these are the settings:
https://pasteboard.co/JQzFqxf.png

What do you want me to turn off ?

Looking at the referenced post, I'll try:
> bcdedit /set hypervisorlaunchtype off
> DISM /Online /Disable-Feature:Microsoft-Hyper-V
janwilmans
Posts: 12
Joined: 2. Apr 2020, 13:33

Re: Mouse randomly stops working

Post by janwilmans »

These suggestions:
- reducing the amount of cores to 2 of 6 (6 core, 12 threads available)
- disabling Hyper-V

"work" in the sense that the problem is now even less prominent, I still experience that mouse-left-clicks are sometimes no longer accepted, but I found two 'work-arounds', that I alternate between and get me out of the reproduction scenario:
- sometimes right-clicking, popping up a context menu works, and left-clicks are excepted after that
- when right-clicking is not enough, I drag a file (any file) from outside the VM into the VM window, and drop is somewhere (anywhere), and after that normal mouse operations seem to resume, left-clicks are accepted again.

I checked the logs around these times but they show nothing 'new' around the time this happens (not when the problem occurs, and also nothing when it is resolved)

Greetings,

Jan
Post Reply