Input events lost randomly

Hi,

Since the latest update, my mouse keeps randomly freezing every now and then, especially when a new application is launched. It lasts about 2 seconds, and then it runs fine again. I’m on KDE, and my Xorg log shows something like the following whenever such a freeze occurs:

Information [ 1587.474] (II) event29 - Logitech G502 HERO Gaming Mouse: SYN_DROPPED event - some input events have been lost.

It says that like 10 times or so. This mouse worked fine before the update.

System information:

Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.5.3-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 32 × AMD Ryzen 9 7950X 16-Core Processor
Memory: 30.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6800
Product Name: X670E PG Lightning

The kernel version has not changed since the update, I kept it the same as before, so that’s probably not it.

Any ideas? Thanks!

inxi -Gx
ls /etc/X11/xorg.conf.d/

Graphics:
  Device-1: AMD Navi 21 [Radeon RX 6800/6800 XT / 6900 XT]
    vendor: Tul / PowerColor driver: amdgpu v: kernel arch: RDNA-2
    bus-ID: 03:00.0
  Device-2: AMD Raphael driver: amdgpu v: kernel arch: RDNA-2
    bus-ID: 1a:00.0 temp: 44.0 C
  Display: x11 server: X.Org v: 21.1.8 driver: X: loaded: amdgpu
    unloaded: modesetting,radeon dri: radeonsi gpu: amdgpu resolution: 3840x2160
  API: OpenGL v: 4.6 Mesa 23.1.7-1 renderer: AMD Radeon RX 6800 (navi21
    LLVM 16.0.6 DRM 3.54 6.5.3-1-MANJARO) direct-render: Yes
00-keyboard.conf  30-touchpad.conf

Could be amdgpu cursor corruption problem.

Create /etc/X11/xorg.conf.d/20-amdgpu.conf and paste

Section "OutputClass"
     Identifier "AMD"
     MatchDriver "amdgpu"
     Driver "amdgpu"
     Option "SWCursor" "True"
EndSection

Reboot and check if the problem is still there

Thanks for the suggestion. I tried it and haven’t noticed any hang-ups so far, so it might have worked. It happened somewhat randomly before, so I will test it for a bit longer to be sure. I did notice that my mouse flickers a little bit sometimes now though, but that’s not a big deal.

Unfortunately, it still does it. I am no longer certain whether it’s the mouse, the keyboard, or the graphics driver - I had it hang earlier but the Konsole instance was still updating properly (it was running a process that printed a bunch), but just now had it hang for a bit when switching tabs, so it could be graphics driver related after all.

By the way, why do you use X11 while having AMD gpu?
May be switching to Wayland could help.

I wouldn’t recommend Wayland to any KDE Plasma 5 user regardless of GPU. There are numerous known issues, many of which will only get fixed in Plasma 6.

I have indeed not noticed any freezes on Wayland so far, although X11 was working fine before the latest Manjaro update and hitches randomly now still.

Getting this as well (though i’m not on manjaro, just vanilla arch). Switching to the lts kernel fixes it though (linux-lts 6.1.55). I don’t know the exact kernel version that introduced it, because I have been using lts since the AMDGPU MCLK bug, which took a few months to fix. Maybe it was 6.5.3?

I haven’t seen it on wayland (sway) yet, but I also haven’t used wayland too much since (< 10 hours).

I feel like the freezes happen most when you switch to a different application, like firefox, thunderbird, or qtcreator.

The messages have mostly been about the mouse dropping events, but i have seen keyboard events dropped as well. My mouse polling rate is 1000hz.

Nothing about it shows up in journalctl, just /var/log/Xorg.0.log

specs:
AMD 3700X CPU
AMD 6700XT GPU
Xfce 4.18 X11
240hz monitor with VRR and tearfree enabled

Yeah sounds like the same issue, it seemed to lag more often when switching applications for me as well. I have just been using Wayland since my original post, as it doesn’t seem to happen there for me.