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

            Bug ID: 525668
           Summary: KWin loses pointer clicks after S3 resume while
                    pointer movement continues — Dell E5440 / ALPS /
                    CachyOS
    Classification: Plasma
           Product: kwin
      Version First unspecified
       Reported In:
          Platform: CachyOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: input
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

## Summary

After returning from S3/deep suspend, KWin sometimes stops delivering pointer
button clicks while pointer movement continues normally.

When the issue occurs, clicking stops working on BOTH:

* the built-in ALPS touchpad
* an external USB mouse

The pointer itself continues to move.

The issue is currently highly reproducible after S3/deep suspend on the current
linux-cachyos kernel, while it has also occurred less frequently on the CachyOS
LTS kernel.

## Hardware

* Dell Latitude E5440
* Intel Core i5-4310U (Haswell)
* Internal touchpad: AlpsPS/2 ALPS GlidePoint
* Touchpad interface: PS/2 through i8042/serio1
* External USB mouse is also affected

## Software

* CachyOS
* KDE Plasma Wayland
* Plasma: 6.7.5-1.1
* KWin: 6.7.5-1.1
* libinput: 1.31.3-1.1
* Current kernel: linux-cachyos 7.2.4-3
* LTS kernel also tested: linux-cachyos-lts 6.18.50-3

## Reproduction

### Primary scenario: S3/deep suspend and resume

1. Start a normal KDE Plasma Wayland session.
2. Suspend the system using S3/deep suspend.
3. Resume the system.
4. Move the pointer and try to click.

On affected resumes:

* pointer movement continues to work normally
* pointer clicks stop working
* the failure affects both the internal ALPS touchpad and an external USB mouse

The desktop can also behave as if a pointer/drag state is stuck, for example
when selecting text.

On the current linux-cachyos 7.2.4-3 kernel, this currently occurs consistently
or nearly consistently after S3/deep resume.

The same problem has occurred on linux-cachyos-lts 6.18.50-3, but much less
frequently.

### Secondary scenario: normal boot

The same click failure can occasionally already be present after a normal boot
and entering the KDE Plasma Wayland session, without performing suspend/resume
first.

This is intermittent and significantly less frequent than the suspend/resume
case.

## Critical cross-device observation

When the problem occurs, the external USB mouse also loses clicking at the same
time as the ALPS touchpad.

Pointer movement from the mouse remains usable.

This makes an ALPS-only hardware or psmouse failure unlikely.

## ALPS/kernel device state after the failure

The ALPS device remains present:

AlpsPS/2 ALPS GlidePoint

Device:

/dev/input/event13

udev path:

/devices/platform/i8042/serio1/input/input9/event13

udev reports:

ID_INPUT=1
ID_INPUT_TOUCHPAD=1
ID_BUS=i8042
ID_PATH=platform-i8042-serio-1

The device therefore does not disappear from the kernel input subsystem after
resume.

## KWin state

While the failure is active, querying KWin reports:

enabled = true

and:

name = AlpsPS/2 ALPS GlidePoint

Therefore KWin does not appear to simply disable the touchpad device.

## libinput observation

While the click failure is active:

sudo libinput debug-events --device /dev/input/event13

continues to produce POINTER_MOTION events from the ALPS touchpad.

Therefore the ALPS device continues to generate pointer motion events after the
failure.

The important failure is specifically pointer button/click handling.

## Suspend/resume logs

The failure occurs after actual S3/deep suspend.

Relevant kernel messages:

PM: suspend entry (deep)
ACPI: PM: Low-level resume complete
PM: suspend exit

PowerDevil reports:

PrepareForSleep(true=prepare)
PrepareForSleep(false=resume)

## KWin/libinput warning

During an affected resume, KWin logged:

"Libinput: event13 - AlpsPS/2 ALPS GlidePoint: client bug: event processing
lagging behind by 3158ms, your system is too slow"

Similar lag warnings were also reported for the two Power Button devices:

event1 - Power Button: client bug: event processing lagging behind by 1610ms
event3 - Power Button: client bug: event processing lagging behind by 1607ms

## Recovery

The KDE global action "Touchpad Toggle" immediately restores clicking:

1. Touchpad Off
2. Touchpad On

After this, clicking works again on both:

* the internal ALPS touchpad
* the external USB mouse

Logging out of KDE also restores normal clicking.

These are recovery methods, not considered the root-cause fix.

## psmouse test

Reloading the psmouse module with:

sudo modprobe -r psmouse && sudo modprobe psmouse

does not permanently solve the issue.

The problem can return after a later suspend/resume cycle or reboot.

This makes a psmouse-only failure unlikely.

## Kernel comparison

The issue occurs on both tested kernels:

* linux-cachyos 7.2.4-3 — currently highly reproducible after S3 resume
* linux-cachyos-lts 6.18.50-3 — also observed, but significantly less
frequently

This suggests that linux-cachyos 7.2.x may affect the frequency or
reproducibility, but is unlikely to be the sole underlying cause.

## Current evidence

After a failing resume:

* the ALPS device remains present
* the kernel input device remains present
* i8042/serio1 remains present
* KWin reports the ALPS device as enabled=true
* libinput can still generate pointer motion events
* an external USB mouse also loses clicking

The failure is therefore not simply loss of the touchpad device.

## Suspected area

The current evidence points toward a problem in pointer-button handling or
pointer event routing after S3 resume in the KDE Wayland input stack,
potentially involving KWin/libinput integration.

The observed sequence is:

S3 suspend
→ resume
→ pointer motion continues
→ pointer clicks stop working system-wide
→ Touchpad Off → On restores clicking for all pointer devices

I am not claiming that KWin is conclusively the root cause. The purpose of this
report is to determine whether the failure is in KWin, its libinput
integration, or another part of the Wayland input/resume path.

## Related report

This appears closely related to KDE Bug 524322:

"Resume from suspend: pointer clicks reach libinput but don't register in KWin"

The hardware/software environment here is different, but the key symptom is
similar: pointer movement continues after resume while pointer clicks stop
working.

The additional observations here are:

* external USB mouse is affected at the same time
* KWin reports the ALPS device as enabled=true
* ALPS remains present as /dev/input/event13
* libinput continues generating POINTER_MOTION events
* the issue occurs on both CachyOS current and LTS kernels, with different
frequencies
* Touchpad Off → On restores clicking system-wide

## Requested investigation

Please investigate the pointer-button/input-event handling path during and
immediately after S3 resume.

In particular, please determine:

1. Whether pointer button state can become stale or inconsistent after resume.
2. Whether pointer button events continue reaching libinput but are not
correctly routed or processed by KWin.
3. Whether the resume sequence can leave a button/drag state logically pressed.
4. Whether the reported libinput client-processing lag is related to the
failure.
5. Whether the issue is already fixed in a newer KWin/Plasma branch.

I am looking for the underlying upstream fix rather than a manual Touchpad
Toggle, psmouse reload, session restart, or other recovery workaround.

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

Reply via email to