You are not logged in.
Pages: 1
Hi,
I have a Thinkpad Yoga 12 and I'm using https://github.com/admiralakber/thinkpad-yoga-scripts/.
These scripts use the laptops accelerometer to rotate the display accoring to the laptops orientation. However, the accelerometer stops working after standby.
From lsusb my accelerometer is:
Bus 001 Device 003: ID 0483:91d1 STMicroelectronicsand
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/11p, 480M
|__ Port 4: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 4: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
|__ Port 5: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 6: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 6: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 8: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
|__ Port 7: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12MAfter standby I get this data from the accelerometer, no matter the laptops orientation:
cat /sys/bus/iio/devices/iio:device1/in_accel_*raw
0
0
-1000000I can fix the problem manually with:
sudo rmmod usbhid
sudo modprobe usbhidHow to automate this? So far I haven't set up any power management tools (https://wiki.archlinux.org/index.php/Power_management). How is the out of the box standby working anyway?
I guess I'll go with systemd suspend hooks. If I decide later to use one of the userspace tools, that will still work, right?
Also as lsusb shows there are several devices using usbhid. Can this cause problems when unloading and reloading that module?
Thanks in advance!
Offline
Pages: 1