Repository navigation
iptsd: start it for the Surface Laptop 7 touchpad when the boot-time start is lost #2798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ryanrhughes
merged 3 commits into
omacom:master
from
fidecastro:iptsd-romulus15-boot-retry
Nov 15, 2026
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Start iptsd for the Surface Laptop 7 15" touchpad when its start at boot was | ||
| # lost. Run by iptsd-romulus15-boot.service. | ||
| # | ||
| # At boot the touchpad's HID device is bound to hid-generic and then re-bound | ||
| # to hid-multitouch. iptsd starts on the first binding and is stopped by the | ||
| # re-bind, and on some boots the pad then stops answering for about five | ||
| # seconds (spi_hid logs "failed to set report" and "Response timed out"). | ||
| # iptsd's udev rule runs iptsd-check-device against the silent pad, gets no | ||
| # answer and does not ask for iptsd again, so the pad stays in its mouse mode. | ||
| # Re-running the rule once the pad answers starts iptsd. | ||
|
|
||
| touchpad_id="045E:0C77" | ||
|
|
||
| touchpad_hidraw() { | ||
| local node | ||
| for node in /sys/class/hidraw/hidraw*; do | ||
| if [[ $(readlink -f "$node/device") == *":$touchpad_id."* ]]; then | ||
| echo "${node##*/}" | ||
| return 0 | ||
| fi | ||
| done | ||
| return 1 | ||
| } | ||
|
|
||
| for attempt in {1..8}; do | ||
| sleep 5 | ||
| hidraw=$(touchpad_hidraw) || continue | ||
| if systemctl is-active --quiet "iptsd@dev-$hidraw.service"; then | ||
| echo "iptsd is running for the touchpad ($hidraw) after $((attempt - 1)) retries" | ||
| exit 0 | ||
| fi | ||
| echo "iptsd is not running for the touchpad ($hidraw); re-running its udev rule (attempt $attempt)" | ||
| udevadm trigger --action=change "/dev/$hidraw" | ||
| done | ||
|
|
||
| echo "iptsd did not start for the touchpad" >&2 | ||
| exit 1 | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # On some boots of the Surface Laptop 7 15" iptsd's udev rule finds the | ||
| # touchpad not answering and never starts iptsd, so the pad stays in its mouse | ||
| # mode. This starts it once the pad answers again. See iptsd-romulus15-boot. | ||
| [Unit] | ||
| Description=Start iptsd for the touchpad after boot on the Surface Laptop 7 15" | ||
| ConditionFirmware=device-tree-compatible(microsoft,romulus15) | ||
|
|
||
| [Service] | ||
| Type=oneshot | ||
| ExecStart=/usr/lib/iptsd/iptsd-romulus15-boot |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.