2

I have an HP ENVY 13-ay0000 x360 Convertible Laptop with an AMD Ryzen 5 4500U CPU running Ubuntu 22.10. The auto-rotation is not working, and the keyboard and touchpad are only disabled if the laptop is folded completetly backwards, but not in between. I believe it's due to this bug: https://bugzilla.kernel.org/show_bug.cgi?id=212615.

As a workaround, I was trying to rotate the screen and disable the keyboard manually through a script or something of the sort. The screen rotation and touchpad disabling I managed to get working but I'm struggling to figure out how to disable and reenable the keyboard. Using xinput does not work as I'm using wayland. I checked this thread: https://unix.stackexchange.com/questions/381944/how-to-disable-internal-keyboard-on-fedora-26-wayland

But neither solution worked as I need to disable and reenable on demand and not permanently. I tried grabbing the keyboard events but this results in the touchscren and touchpad behaving erratically.

Any ideas on how this could be achieved?

2
  • The stackexchange solution worked for me on a dell inspiron and Ubuntu 22.04 running Wayland/xwayland, $ sudo evtest --grab /dev/input/event2 >/dev/null & but you need to enter evtest into visudo so you don't actually have to enter the sudo password...alternately, don't launch it backgrounded and enter the password.
    – bvargo
    Commented Dec 23, 2022 at 13:46
  • Unfortunately it didn't work out in my case. I have to grab the input by-path but somehow it messes up the touchscreen inputs and slows down the laptop
    – lzilhao
    Commented Dec 26, 2022 at 12:12

1 Answer 1

1

For users with xwayland, first find the event id.

$ libinput list-devices

If needed install the libinput (sudo apt install libinput-tools). This will listdonw all the input devices and its event id. Scroll to find the right section (Something like "AT Translated Set 2 keyboard") and find the line Kernel: /dev/input/event#. Use the event# for the next command:

$ udevadm info -a -p /sys/class/input/event#

Find an attribute that is most probably unique/distinct. For example ATTRS{name}=="AT Translated Set 2 keyboard" and then create rule file

sudo nano /etc/udev/rules.d/99-disable_touchscreen.rules

with following rule

KERNEL=="event*", ATTRS{name}=="AT Translated Set 2 keyboard", ENV{LIBINPUT_IGNORE_DEVICE}="1"

Then check if it worked by following command:

$ udevadm test /sys/class/input/event#

and search for

LIBINPUT_IGNORE_DEVICE=1

most probably within the last 3 lines. Then reboot and your intenral keyboard should be disabled.

Courtesy: https://wiki.archlinux.org/title/Dell_XPS_13_(9343)#Disable_the_touchscreen

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .