Extremely annoying bug I've had since I started using Fedora

I started with Fedora 37 and I’ve had this till now.

Up until recently my mouse and keyboard cables were very easy to reach and whenever this happened I would replug them, and it was fixed. But now I’ve moved things around and I need to get up and walk all the way over to my PC to do this, so I’m finally posting about it.

I have a Logitech g600 mouse (all side keys have shortcuts assigned to them in onboard memory), and a wireless keyboard.

The issue is that at least once per day, my input would get totally messed up. Where a certain key is pressed, but it is very weird and not due to the devices themselves. How do I know? This never happens in any other distro or Windows. It’s also extremely weird, so it doesn’t make sense for it to be the devices themselves.

For example, the Ctrl key may get “stuck” - sometimes it may get stuck for both the mouse and the keyboard, sometimes for just one of those devices. Restarting GNOME shell does not fix it. It can be either the Alt, the Super, or the Ctrl key that get “stuck”. Stuck essentially means that whatever I do a shortcut, that key is going to be pressed too. Let’s say the Ctrl key is stuck, I press Alt+F4 and it opens a TTY (Ctrl+Alt+F4).

Like I said, I only experience this on Fedora, but then again I haven’t used GNOME much on other distros, except for that one time I tried Arch and ran GNOME for a few days, and no problems. In fact, this was really bad in Fedora 40 when I first installed it, but after I did the updates it magically went back to how it was in Fedora 37.

Fact is I can’t pinpoint where tf this is coming from. Is it GNOME, is it the kernel, or is it some “cutting edge” module that Fedora uses. For example restarting GNOME shell will not fix it per say but “change it” - in other words for example transfer the stuck key from one device to another or change the stuck key.

If I can resolve this once and for all, I’d be super happy.

Added f38, f39, f40, kernel

I wonder if this is a hardware issue.
FYI I use USB hubs with Fedora all the time and have not seen issues myself.

When this happens check sudo dmesg and look for messages about issues with USB.

Is the USB hub you are using powered? Is it getting external power?
Do you have a different USB hub to try with?

I have many things connected. 2 hubs unpowered and 1 powered. I don’t think it has anything to do with the USB hub because this used to happen when they were connected directly to the PC ports.

Like I said though this has never happened to me on Windows or Ubuntu/Debian-based distros.

That’s why I assume it’s either the kernel or gnome. I disabled repeat keys let’s see if it happens again. If it doesnt, then it’s 100% GNOME.

They’re both wireless devices so it likely could be more related to how that networking is handled than the usb port itself.

1 Like

Never mind. I still happens even with repeat keys fully disabled.

Alright, therefore it’s a kernel problem or an input module problem. Whatever module Fedora uses for the input or whatever modifications it does to the kernel is 100% the problem.

I also don’t see anything suspicious with sudo dmesg

Also, I forgot to mention that this happens on both x11 and wayland so it’s not a x11 problem either.

Is the hub USB2 or USB3?

This could be an RF interference issue.

So you have one or more wireless dongles in a hub? Is the hub USB3?

USB3 signals greatly increase the potential for RF interference over USB2. Older cables may not have adequate shielding, but even high-quality cables have some RF leakage. Longer cables have more leakage so connectiing USB3 wireless dongles to a USB hub greatly increases the increases the potential for RF interference. Interference will be worse if the mouse and keyboard aren’t close to their wireless dongles.

USB 3, but the cables / adapters conncted to it are USB 2. Though I’ve had this issue before I started using a hub. Hell, it’s the whole reason I started. That way instead of having to unplug 2 cables I only unplug one.

I will remove that part from the OP so it doesn’t confuse people.

Early USB3 ports often failed to upgrade RF shielding, so USB3 in configuration that worked for USB2. Has the issue always been present with this system? Are other USB3 devices connected? One troubleshooting method is to remove all but essential devices, then try wired mouse or keyboard to see if the issue still occurs.

Did you ever use another DE under Fedora? Does the problem still persist?

I had problem with stuck keys while gaming caused by the ibus system. The fastest way to disable ibus is to rename /usr/bin/ibus-daemon to e.g. /usr/bin/ibus-daemon.bkp and restart. This prevents gnome from starting the ibus service.

Yeah it happened (I’m pretty sure, it was 1 or 2 years ago when I tried) with the KDE version as well. I can’t disable ibus because I have other input methods that I need. By the way, I had this before I added them.

As for you, wouldn’t it be better to create a .desktop file either in ~/.config/autostart or /etc/xdg/autostart that disables the service on boot instead of messing directly with its files? If ibus updates, you’d probably need to re-do this.

The file would look something like this:

ibus-daemon-kill.desktop

[Desktop Entry]
Name=Kill Ibus Daemon
Type=Application
Terminal=false
Exec=sh -c "ps aux | grep 'ibus-daemon' | grep -v grep | awk '{print $2}' | xargs kill -9"

You could also add a delay like this:
sleep 5 && ps aux | …

Or use Exec=pkill -9 ibus-daemon that does all that in one command.