0

I am working on an Acer Aspire R13 and everything is working fine until I close my lid to tablet (so the lid is closed but the screen is on top). After I do, touchpad and keyboard are not responding anymore. I already tried to reset them with xinput but it has no effect. They are marked enabled but still no response.

After restarting the device, everything is fine as long as I don't transform it to a tablet.

I am working with Gnome Shell 3.16.4.

Any idea what the issue could be?

narranoid
  • 58
  • 9

1 Answers1

1

I have a brand new R13 and am having the same problem. I'm not sure what is turning the touchpad and keyboard off. I suspect it is the laptop itself, and linux doesn't know it is happening.

I have a partial fix that may help you. I wish I had a full solution.

The following script will restore your keyboard and possibly your touchpad. If the touchpad is not restored, then Fn+t will turn it back on:

#!/bin/sh
[ "root" != "$USER" ] && exec sudo $0 "$@"
lsmod |grep hid|cut -f1 -d" "|xargs -n1 rmmod
udevadm trigger
sleep 1
xinput|grep SYN1B|cut -f2 -d"="|cut -f1|xargs -n1 xinput --enable

There is a wrinkle though. It may need to ask for your password to run as root. In my case, I have a onscreen keyboard (like onboard, or cellwriter) so that I can enter the my password. An external keyboard works too.

Strangely, I have found that after running the above script once, my laptop is no longer disabling the screen and touchpad. I don't have time to see if it's a one-off thing, or happens every time.

I have limited time to play, though, so this partial answer is what I have for now. Here's hoping it helps someone come up with a complete solution.

Later edit as requested: The script removes all kernel device drivers that had HID (Human Interface Device) in the name, which includes the touchpad drivers, digitizer pen, keyboard, etc., and then tells udev to trigger the installation of any missing device drivers, which reinstalls them. This hopefully resets the drivers for those devices (and gets the keyboard back). Then we wait a second, get a list of X input devices and specifically enable the one that corresponds to the touchpad. This gets the touchpad back unless it's disabled by the laptop itself, in which case Fn+t on the (now working) keyboard gets it back.

Line by line:

1: Use /bin/sh shell to run script
2: If we aren't root, sudo and rerun the script
3: List all modules, remove modules with "hid" in the name
4: Insert modules for any devices for which drivers are not present
5: Wait 1 second
6: List X input devices, find one with SYN1B in the name, enable it.

It's a brute force solution, but it's a start. I'll do a better job narrowing down the problem later, when I'm not moving to another continent. :)

Ray H.
  • 26
  • Thank you! As soon as the bug comes up again, I'll try it out. Could you add a description about what your script does in detail? – narranoid Nov 07 '15 at 10:19
  • Works like a charm, thanks :) But the bug is coming back after closing the lid in touchscreen mode again. By the way, the bug is only affecting the device sometimes, not everytime i close the lid. – narranoid Nov 07 '15 at 20:46
  • 1
    Edit added as requested. I'll try to find the time to get a better fix in the future, but am currently in the midst of moving to China for 6 months. – Ray H. Nov 09 '15 at 15:18
  • Hey I just did a nice solution for this. At first I modified you first regex a bit because it returned two more devices I didn't want to remove (they returned an error by trying to remove them) This is the line: lsmod | grep '^[^ ]*hid' | cut -f1 -d " " | xargs -n1 rmmod I followed the instructions of this answer to run it without the need of a password: http://askubuntu.com/a/155827/448526 Now things are working fine :) – narranoid Feb 19 '16 at 00:36