Repository navigation
Conversation
The rule only matches ACTION=="add". udev rebuilds a device's properties from the rules on every event, so a later "change" event on the hidraw node drops both TAG+="systemd" and SYSTEMD_WANTS. The device unit then goes inactive, and iptsd is stopped while /dev/hidrawN is still present. Nothing starts it again until the device is re-added. A plain "udevadm trigger" is enough to hit this. On Ubuntu, snapd does that whenever a snap is installed, so installing any snap silently kills touch and pen. Match every action except "remove" instead, so the tag and the wanted unit are re-applied on "change". Real removal is unaffected. Link: linux-surface#163 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KLPZcjA8vscVEpwGEMZAmK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #163.
The udev rule only matches
ACTION=="add". udev rebuilds a device's properties from the rules on every event, so a laterchangeevent on the hidraw node drops bothTAG+="systemd"andSYSTEMD_WANTS. The device unit goes inactive and iptsd is stopped while/dev/hidrawNis still there. Nothing starts it again until the device is re-added.This PR matches every action except
removeinstead, so both are re-applied onchange. Real removal behaves as before.How it shows up
Surface Pro 8 (ITHC,
045E:0C37), Ubuntu 26.04, iptsd 3.1.0. On Ubuntu, snapd reloads udev rules and triggerschangeon every device whenever a snap is installed. Three times in the journal, installing a snap (obs-studio, kf6-core24, inkscape) stopped iptsd within 1–2 seconds:Afterwards the node is present and ITHC is still bound, but:
Once, touch and pen stayed dead for over a day until a reboot.
Tested
With this rule as a local override in
/etc/udev/rules.d/50-iptsd.rules:The daemon keeps the same PID across the
changeevent; nothing is restarted.iptsd-check-devicedoes run again on eachchange, which is a read-only descriptor check.I only reproduced the failure through snap installs, not with a bare
udevadm triggeron the unfixed rule. The journal shows the samechangeevent either way, though.Relation to open PRs
StopWhenUnneeded=yes, for a stop about 6 s after a cold boot with no udev event involved. That looks like a separate trigger. Here the device unit itself goes inactive afterchange, so I'd expectBindsTo=to stop the service even with iptsd@.service stops itself ~6s after start on cold boot due to StopWhenUnneeded=yes #219 applied, but I have not tested that combination. The two PRs touch different files.🤖 Generated with Claude Code
https://claude.ai/code/session_01KLPZcjA8vscVEpwGEMZAmK