FS#79144 - [systemd] USB devices connected to a USB hub do not work unless they are replugged

Attached to Project: Arch Linux
Opened by nl6720 (nl6720) - Wednesday, 19 July 2023, 13:31 GMT
Last edited by Toolybird (Toolybird) - Monday, 30 October 2023, 20:55 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
After updating systemd from 253.6-2 to 254rc2-2, USB devices attached to my monitor's USB hub do not work in Plasma wayland session unless I unplug and replug them (or the USB/Thunderbolt3 cable connecting the monitor to the PC). Since I attach my mouse and keyboard to the monitor's USB ports, this can be annoying.
The USB devices work fine in a Plasma Xorg session, only the wayland session is affected.

systemd 253.6-2 doesn't have this issue.


In systemd-254rc2-2.plasma_wayland.bad.log I unplugged the keyboard at 12:23:06.


Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any
systemd 254rc2-2
systemd-libs 254rc2-2
systemd-resolvconf 254rc2-2
systemd-sysvcompat 254rc2-2
lib32-systemd 254rc2-1
lightdm 1:1.32.0-4
web-greeter 3.5.2-2
plasma-wayland-session 5.27.6-2


Steps to reproduce:
Start a plasmawayland session.
This task depends upon

Closed by  Toolybird (Toolybird)
Monday, 30 October 2023, 20:55 GMT
Reason for closing:  Deferred
Additional comments about closing:  Not an Arch packaging issue. Please continue liaising with upstream.
Comment by nl6720 (nl6720) - Wednesday, 19 July 2023, 15:58 GMT
Here's some `udevadm info` output. "replug" is after unplugging and replugging the USB/Thunderbolt3 cable connecting to the PC.
Comment by Toolybird (Toolybird) - Wednesday, 19 July 2023, 22:30 GMT
This looks like a hardware specific problem. The description implies a systemd regression (but obviously Plasma wayland could be at fault too). It should therefore be reported upstream because it doesn't appear to be an Arch packaging bug. But the offending upstream systemd commit should first be identified by performing a git bisection. But before doing that, it's probably worthwhile trawling the upstream udev issues [1]

I personally have performed git bisection on systemd on 2 separate occasions in recent months and it wasn't too painful :)

[1] https://github.com/systemd/systemd/labels/udev
Comment by nl6720 (nl6720) - Thursday, 20 July 2023, 01:40 GMT
I tried to bisect it a few days ago, but I didn't get very far. I got stuck in a group of commits where the plasma session would simply die upon launch. After a couple of skips, I simply gave up.
Comment by Christian Hesse (eworm) - Monday, 24 July 2023, 21:08 GMT
Wondering if this could fix it...
https://github.com/systemd/systemd/pull/28509

Can you check, please?

If it does not I would still like to see an upstream issue on this.
Comment by Christian Hesse (eworm) - Monday, 24 July 2023, 21:11 GMT
Regarding the bisect issue... Have you tried to find the commit that fixes your intermittent issue with plasma session dying? Cherry-picking that in every bisect step could bring a reasonable result.
Comment by nl6720 (nl6720) - Tuesday, 25 July 2023, 06:33 GMT
https://github.com/systemd/systemd/pull/28509 doesn't fix it. As I understand, it's a fix for an issue that also affects version 253.*, but for me 253.7 works fine.

> Have you tried to find the commit that fixes your intermittent issue with plasma session dying?

Sounds like a pain :(

I opened an issue upstream: https://github.com/systemd/systemd/issues/28512
Comment by Toolybird (Toolybird) - Thursday, 24 August 2023, 22:37 GMT
No response so far to the subsequent upstream Plasma issue: https://bugs.kde.org/show_bug.cgi?id=472736

Please follow up with upstream as this doesn't appear to be an Arch packaging issue.

Comment by nl6720 (nl6720) - Tuesday, 19 September 2023, 07:27 GMT
The KDE people have reported it to libinput now: https://gitlab.freedesktop.org/libinput/libinput/-/issues/936
Comment by Toolybird (Toolybird) - Friday, 06 October 2023, 07:32 GMT
> The KDE people have reported it to libinput now

libinput folks now say it's a kernel bug...