mouse cursor disappers all of a sudden

Hello,

Ever since I recently upgraded to LEAP 15.3, I started running into this intermittent issue where my mouse cursor all of a sudden disappears. I typically have a chrome browser and virtualbox open at all times. My mouse cursor is still there but is invisible which makes it very difficult to perform anything. I have not able to get it to re-appear except by restarting Leap 15.3. I am not sure if this issue may have something to do with virtualbox since the mouse cursor seems to disappear when I am working on my virtualbox Windows 11 guest. And then the mouse cursor is still active but invisible in both in the virtual box guest and in the host Leap 15.3. This is really frustrating. Any help or guidance is greatly appreciated!

Thanks,
Nick

@nsalem:

Which Mouse Vendor?

If it uses a chip from Holtek Semiconductor, Inc. – USB Vendor Id 04d9x0 Hexadecimal, 1241 Decimal – there is a known issue which has been fixed with Linux Kernel version 5.15.16 or later – Tumbleweed is an option.

For Leap 15.3, the only option is to use a Mouse from another manufacturer.

Not a newer kernel from https://download.opensuse.org/repositories/Kernel:/stable:/Backport/standard/x86_64/ or 15.4?

Thank you @dcurtisfra and @mrmazda. The mouse is a logitech G403 Hero. I had no issues with this mouse prior to the upgrade to 15.3 when I using Leap 15.2. I don’t think this has anything to do with the mouse itself; it looks like some OS/software bug to me. The next time I run into this issue, I can try to plug in a different mouse to make sure.

This issue is really frustrating. Any help is very much appreciated. Once the mouse cursor becomes invisible, the only method of getting the cursor back is a full restart of the OS. Logging out and in does not work. I even tried logging out and logging in as the root user to see if the mouse cursor would become visible but that did not do the trick. I also tried unplugging and plugging the mouse but that didn’t help. I also tried “sudo modprobe psmouse” - that didn’t help either.

Possibly the mouse speed – try slowing it down in the GUI settings.

  • Does the keyboard also become unusable?
    If KDE Plasma, when you hit the “Windows” key, does the Starter menu appear?
    And, can you navigate the choices by means of the keyboard arrow keys and, the Tab key?

The keyboard is still functional. I am using KDE. The mouse is still functional but just the cursor becomes invisible. The mouse speed is currently set in the middle.

Have you tried switching to an alternative mouse pointer style?

Does disabling enable on startup of compositor in display settings help?

Does Ctrl-Alt-F3, Alt-F7 help?

Log out of Plasma, login on a vtty, remove all content from ~/.cache/, return to Plasma. Any difference?

Thank you @mrmazda !

I did try changing the cursor type and also switched the cursor size from “Resolution Dependent” to a fixed size of 16. In virtualbox, I changed the \System\Motherboard\Pointing Device from USB tablet to PS/2 Mouse. I am not 100% that this has anything to do with virtualbox, but this issue has showed up when I am using virtualbox guest running Windows 11 which in turn is running AWS client. Not sure if something with virtualbox/AWS client causes the mouse cursor to become invisible both in the virtualbox guest and then also for my Leap 15.3 desktop. I believe this issue intermittently happens when I click on some operation in my virtualbox guest that causes the mouse cursor to spin. It is hard to reproduce but seems to happen every 1-3 days lately.

At this time, I have my mouse cursor visible. But when this issue surfaces again, I will try your suggestions and see if it helps.

Please be aware that, KDE Plasma has Mouse Styles which vary the pointer size depending on where the pointer is – if it’s hovering over a Window then, it’s usually larger than when it’s hovering over the Desktop …

  • I currently use “Oxygen Black” with the setting named “Size” set to the value “Resolution dependent” –

This results in the file ‘~/.config/kcminputrc’ having the following parameter setting –

cursorSize=0

Please be aware that, due to the dynamic sizing of the cursor and, with a given Desktop Wallpaper – for example a photograph – the cursor can occasionally “disappear” – happens to me with my default user …

  • With other users where I tend to have a matt grey Desktop Wallpaper – less visual distraction for things such as working with photographs and also for things such as book-keeping and bank accounts …

With Desktop Wallpapers which have less visual distraction, I don’t have the “cursor disappears” issue …

Thanks @dcurtisfra !

I believe I had the default settings. I changed the KDE Plasma to Oxygen and the Mouse cursor size back to “Resolution dependent”. My desktop wallpaper is currently the openSUSE default. After the change, here are my contents of kcminputrc =>

nick@localhost:~> cat ~/.config/kcminputrc
[Mouse]
cursorTheme=whiteglass


Not very much in there – it should be something like this –


 > cat .config/kcminputrc 
[Keyboard]
KeyboardRepeating=0
NumLock=0
RepeatDelay=600
RepeatRate=25

[Libinput][1133][49181][Logitech USB-PS/2 Optical Mouse]
PointerAcceleration=0.053

[Mouse]
Acceleration=2
AccelerationProfile=Adaptive
MouseButtonMapping=RightHanded
ReverseScrollPolarity=false
Threshold=2
XLbInptAccelProfileFlat=false
XLbInptPointerAcceleration=0
cursorSize=0
cursorTheme=Oxygen_Black
 > 

You may have to do some more explicit hardware setups –

  • Setup the keyboard with “localectl” – for example –

 > localectl 
   System Locale: LANG=de_DE.UTF-8
       VC Keymap: de-latin1-nodeadkeys
      X11 Layout: de
       X11 Model: cymotionlinux
     X11 Variant: nodeadkeys
     X11 Options: terminate:ctrl_alt_bksp
 > 

  • The keyboard models are listed in the “xkeyboard-config” man page.
  • After you’ve done that, check the KDE Plasma setup with “System Settings”.
  • Setup the Mouse by means of the KDE Plasma “System Settings”.

To get a better feeling on what is going on, can you install xev (sudo zypper in xev) and run it (/usr/bin/xev)

xev will show a window and if you mouse comes in prints out the events.
Place the window somewhere in one of the edges of the screen, so that if the problem happens you can still blindly move the cursor there.
Does it them show events? If so the problem is visibility, otherwise it is some system problem.

Thanks @marel !, I installed xev and will test it the next time it happens.

Hi @marel, it happened again so I opened up konsole and ran xev as you suggested. I could see events being fired off when I moved the mouse. So it is definitely a visibility issue. I cannot see the mouse cursor but I can click on things with my invisible mouse cursor if I can guess where I am. Definitel frustrated by this. I

Okay, that is progress :wink:

In your opening post you write “I typically have a chrome browser and virtualbox open at all times.”, I an imagine a problem linked with virtualbox,no expert maybe other can chime in.

Can you go into the KDE settings menu -> Workspace Behavior -> Desktop Effects and enable Track Mouse, that way the cursor is updated often and I wonder if that prevents the problem from happening. You could also try the other Accessibility options there.

You could also try, when the problem happens, what was suggested here:

Open up krunner (Alt+F2 by default) and run kwin_x11 --replace && plasmashell --replace, this usually fixes such issues for me. At this point I might as well give it its own keyboard shortcut

Thank you so much, @marel! I set the “Mouse Mark” as you suggested. And will try your other suggestions if this issue arises again. I also think this has something to do with virtualbox. So far this issue has happened only when I am working in my virtualbox windows guest where I am running aws workspace client and when I click on something that causes the mouse to suddenly disappear in the virtualbox guest and also disappears in the opensuse desktop. The issue is intermittent so it is hard to reproduce.

In case it is helpful to anyone who encounters something similar, I want to share what I have done to overcome this. I have identified that this was being caused by some VirtualBox bug. I have switched from VirtualBox to the free VMWare Player to run my windows VM and haven’t seen this issue again. I also noticed better mouse performance with VMWare Player and less spinning of the mouse cursor.
Cheers,
Nick