Skip to content

Instantly share code, notes, and snippets.

@nonameentername
Created April 16, 2015 22:47
Show Gist options
  • Select an option

  • Save nonameentername/e98f3a929b2e19bd2858 to your computer and use it in GitHub Desktop.

Select an option

Save nonameentername/e98f3a929b2e19bd2858 to your computer and use it in GitHub Desktop.

Revisions

  1. nonameentername created this gist Apr 16, 2015.
    23 changes: 23 additions & 0 deletions fix-surface-pro-pen.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #!/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