How can I disable the touchscreen when closing the lid?
My GPD Win MAX 2 (2024) unfortunately registers phantom touch events when closed and used via a dock. I can disable the touchscreen via command line (with sudo bash -c 'echo "0018:27C6:0113.0004" > /sys/bus/hid/drivers/hid-multitouch/unbind').
Now I would like to tie this to opening / closing the lid. How can I run this command (and the corresponding bind-version) when the lid is triggered?
8 Replies
you would find the state with
cat /proc/acpi/button/lid/LID0/state
or cat /proc/acpi/button/lid/LID/state
IIRC
the rest i am not sure what would be the best approach for you.What approches are there? Specifically, is there a way to trigger a script when the lid state changes?
as i said no idea
i know you can make scripts trigger on sleep and wake but thats about it and i used that many many many years ago
Ah, my bad. I thought you meant there are several options and you don't know which one would work for me.
nope i meant i have no clue what the best approach would be
the touchscreen shouldnt work if the screen is off i think
i wonder if a udev rule could be used for this.
for reference, a different workaround runs
ryzenadj --max-performance
on AC power state changes. perhaps something similar can be made for lid changes.
Yeah, I'd think so too. But unfortunately it does, I get weird phantom touch events in the lower middle screen when using the laptop on a dock (with the lid closed).
That is an interesting idea, I'll certainly have a look.