Notes on running Linux Debian 11 on the Lenovo Yoga 12 touchscreen

I didn’t experience much RSI discomfort when using a phone touchscreen. To try to get back to regular activities, I bought a used Lenovo Yoga 12 20DK, reminiscent of a deeply beloved Acer R11 c738t convertible chromebook I used for half a decade before and through university.

In retrospect, I didn’t do enough research - this specific variant doesn’t have a pen digitizer, but does have a touchscreen.

Some useful tools are
sudo hid-record
sudo evemu-record, from libevdev.
sudo xsetwacom --list

GitHub - Whisprin/thinkpad-yoga-scripts: Thinkpad Yoga 12 touchscreen fix for GNU/Linux has a nifty set of utilities, but this is not

this device is a

Bus 002 Device 003: ID 056a:501b Wacom Co., Ltd Pen and multitouch sensor

sudo dmesg | grep wacom yielded the error
wacom_set_report: "ran out of retries (last error = -110)

In Wayland, xsetwacom did not list any devices. Logged out and switched to x11, and there were some hints that slightly more worked, but the wacom devices still didn’t work.

tried an x11 conf.d file with the right udev id:id but no go

Some suggested modprobe-r or rmmod-ing, but this did nothing for me at this point. Finally, I tried blacklisting wacom, cold-rebooting (beyond a restart), logging into x11. Now two extra entries appeared in xsetwacom:

|Wacom Co.,Ltd. Pen and
 multitouch sensor Touchscreen pad|id: 9|type: PAD       |
|Wacom Co.,Ltd. Pen and multitouch sensor touch|id: 10|type: TOUCH     |
|Wacom Co.,Ltd. Pen and multitouch sensor stylus|id: 12|type: STYLUS    |
|Wacom Co.,Ltd. Pen and multitouch sensor pad|id: 18|type: PAD       |
|Wacom Co.,Ltd. Pen and multitouch sensor eraser|id: 19|type: ERASER    |

then, incredibly, sudo modprobe wacom (even though the modprobe is blacklisted) worked. yay! one last catch, the touchscreen stops working on suspend. It keeps working if the wacom is unloaded before suspending and then modprobe wacom after.


case "$1" in                                                                    
    # executed on suspend                                                   
    rmmod wacom                                                             
    sleep 1                                                                 
    sleep 1                                                                 
    modprobe wacom                                                          
    # executed on resume                                                    

fixed it right up

finally, needed to set gesture off to get the clean one-finger scroll I’m familiar with.

sudo xsetwacom --set ‘Wacom Pen and multitouch sensor Finger touch’ gesture off

Enabled “always show the accessiblity menu”, and also installed

so that the on-screen keyboard wouldn’t keep popping up when using the physical keyboard + touchscreen.

Finally, to load the module on start, added the following to /etc/systemd/system/touchscreen.service

ExecStart=/bin/bash -c "sleep 4 && modprobe wacom"                              

and then

sudo systemctl enable touchscreen.

popping sound

Alsamixer auto mute didn’t work

echo "0" | sudo tee /sys/module/snd_hda_intel/parameters/power_save