Thinkpad L14 slows down after disconnecting external display
Downstream ticket at my distro's bug tracker: https://bugs.archlinux.org/task/70549
tl;dr: laptop slows down significantly when external display is unplugged. No specific task slows down in particular, and RAM and CPU usage are higher than usual. Input also lags and sometimes keyboard events are missed altogether. It also recovers on its own gradually, then slows down and recovers and so on.
The attached dmesg log was recorded with drm.debug=0xe
. The machine was booted with the external display plugged in. xorg was started on tty1 and st was opened. The display cable was then physically unplugged from the laptop (over usb-c). After waiting for several minutes, the cable was plugged back in. It should be noted that during this time, the slowdown wasn't recorded - it is quite random (I'll keep drm.debug on and attach another dmesg log once the slowdown starts).
Copying some detail from the original bug report:
- After I unplug my external display (connected over USB-C, if it matters), the system gradually slows down and all operations take a significant amount of time.
- For example, opening a new browser tab takes a few seconds (both firefox and chromium), opening rofi and dmenu also takes a second or two.
- When the xrandr display is turned --off, the problem gradually goes away.
- During this time, memory (mostly virtual, but sometimes RES as well) and CPU usage of graphical applications (mpv, dmenu, rofi, firefox, X, i3) is somewhat high. However, no individual application is an outlier.
- The issue is not specific to any of the graphical applications. I can reproduce it almost consistently with each of those not running.
- I have recorded strace'ed invocations of a dmenu based script with timings for each syscall. In my cursory read, no specific syscall seems to slow down disproportionately compared to the others. However, I'd be happy the attach the logs here if anyone wants to investigate.