Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Update Surface Pro in Ubuntu to support pen pressure sensitivity using the wacom drivers.
#!/bin/bash
#load wacom driver
sudo modprobe wacom
#unbind touch screen
echo 2-1.6:1.0 | sudo tee /sys/bus/usb/drivers/usbhid/unbind
#unbind pen
echo 2-1.5:1.1 | sudo tee /sys/bus/usb/drivers/usbhid/unbind
#unbind pen
echo 2-1.5:1.1 | sudo tee /sys/bus/usb/drivers/wacom/unbind
#bind wacom driver for surface pro
echo 045e 079c 0 056a 0116 | sudo tee /sys/bus/usb/drivers/wacom/new_id
#wait for device
sleep 1
#calibrate stylus and eraser
xsetwacom --set "Wacom ISDv4 116 Pen stylus" Area 0 0 23472 13203
xsetwacom --set "Wacom ISDv4 116 Pen eraser" Area 0 0 23472 13203
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment