https://bugs.kde.org/show_bug.cgi?id=524322

            Bug ID: 524322
           Summary: Resume from suspend: pointer clicks reach libinput but
                    don't register in KWin ("main thread hanging
                    temporarily")
    Classification: Plasma
           Product: kwin
      Version First 6.6.6
       Reported In:
          Platform: Kubuntu
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: input
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Created attachment 195189
  --> https://bugs.kde.org/attachment.cgi?id=195189&action=edit
Terminal output: 'journalctl -b 0 --since "-10 min"'

DESCRIPTION

Clicks (mouse, touchpad and trackpoint) don't work after resume from suspend. A
fresh log-in is needed to get it to work again. 

I have had issues with the touchpad since Kubuntu 22.04 LTS (at least I believe
it was this version, I'm only sure it was a LTS and probably in 2022). At the
time (and now again), neither touchpad clicks not trackpoint clicks nor
external mouse clicks worked (at least the left-clicks didn't work, I don't
remember the details). Googling didn't result in any solution or workaround.
I upgraded to 24.04 last year, but the issue partially remained: the trackpoint
clicks (the physical buttons) worked, which allowed me to deactivate and
re-activate the touchpad in the System Settings using the trackpoint (and its
associated buttons), which solved the issue until the next resume from suspend. 
Since my upgrade to 26.04, the old problem seems to be back: none of the click
events work (although I haven't verified with an external mouse, nor have I
done that when using 24.04).
Strangely, this problem does not occur on every resume from suspend. It seems
to be quite random (I don't have any statistics on the probability of the
touchpad working or not working).

STEPS TO REPRODUCE
(This does not work consistently. I have not found out what exactly triggers
the issue.)
1. Suspend the laptop (close the lid)
2. Resume

OBSERVED RESULT
Mouse/touchpad/trackpoint cursor movement works normally, but no click (left,
right, or middle button) registers any action in the UI. 

Things already tried (with help from Claude.ai since I am a beginner):

- Using a bash script with: 

modprobe -r psmouse
sleep 1
modprobe psmouse

(executed with sudo via keyboard upon click-issues) could not resolve the
problem.

- libinput debug-events confirms POINTER_BUTTON events ARE being generated
correctly for all devices (touchpad clicks, trackpoint hardkeys) - input is
reaching libinput correctly.
Despite this, no click has any effect in Plasma/KWin.

- Restarting plasmashell does not fix it.

- Manually replacing the compositor (kwin_wayland --replace) does restore
clicks, but disconnects/crashes Firefox and Thunderbird, making it an
unpractical workaround.

- Journal log shows 'kwin_wayland_drm: The main thread was hanging
temporarily!' firing at the exact resume timestamp, right after the amdgpu
finishes resuming (PSP/SMU resume, DMUB init) and the touchpad is re-probed.
(This last point is output by Claude.)
(-> The output of 'journalctl -b 0 --since "-10 min" ' is given in the attached
file. The command was executed shortly after resuming from suspend and finding
the clicks not working.)

EXPECTED RESULT
Clicks should work normally.

SOFTWARE/OS VERSIONS
Operating System:
Ubuntu/Kubuntu 26.04 LTS (Resolute), Kernel 7.0.0-29-generic
KDE Plasma Version: ?!? two versions: Plasma 6.6.6 (plasmashell --version),
Plasma 6.6.5 (Info Center app), 
KWin 6.6.6
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Graphics Platform: Wayland

ADDITIONAL INFORMATION
System:
ThinkPad T14 AMD Gen 1 (Ryzen, integrated amdgpu)
Processors: 16 × AMD Ryzen 7 PRO 4750U with Radeon Graphics
Memory: 32 GiB of RAM (30.6 GiB usable)
Graphics Processor: AMD Radeon Graphics

Bug 501073 was considered, but the bug is supposed to be fixed. So it's not the
same.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to