jakeday / linux-surface

Linux Kernel for Surface Devices
2.6k stars 244 forks source link

Pen not working on Surface Pro 2017 #29

Closed geoffholden closed 6 years ago

geoffholden commented 6 years ago

After trying the latest 4.14-rc8 kernel, I still have no pen support.

I've added the udev rules for the different devices in the 2017 version:

% diff 99-ipts.rules /etc/udev/rules.d/99-ipts.rules              
17a18,27
> 
> # IPTS Touchscreen (SP2017)
> SUBSYSTEMS=="input", ATTRS{name}=="ipts 1B96:001F", ENV{ID_INPUT_TOUCHSCREEN}="1", SYMLINK+="input/touchscreen"
> 
> # IPTS Touchscreen (SP2017)
> SUBSYSTEMS=="input", ATTRS{name}=="ipts 1B96:001F UNKNOWN", ENV{ID_INPUT_TOUCHSCREEN}="1", SYMLINK+="input/touchscreen"
> 
> # IPTS Pen (SP2017)
> SUBSYSTEMS=="input", ATTRS{name}=="ipts 1B96:001F Pen", SYMLINK+="input/pen"

But evtest still gives me nothing:

% evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      Lid Switch
/dev/input/event1:      Video Bus
/dev/input/event2:      Microsoft Microsoft® 2.4GHz Transceiver v9.0
/dev/input/event3:      Microsoft Microsoft® 2.4GHz Transceiver v9.0
/dev/input/event4:      Microsoft Microsoft® 2.4GHz Transceiver v9.0
/dev/input/event5:      Surface Pro 3/4 Buttons
/dev/input/event6:      Microsoft Surface Type Cover Keyboard
/dev/input/event7:      Microsoft Surface Type Cover Mouse
/dev/input/event8:      Microsoft Surface Type Cover Consumer Control
/dev/input/event9:      Microsoft Surface Type Cover Touchpad
/dev/input/event10:     HDA Intel PCH Mic
/dev/input/event11:     HDA Intel PCH Headphone
/dev/input/event12:     HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event13:     HDA Intel PCH HDMI/DP,pcm=7
/dev/input/event14:     HDA Intel PCH HDMI/DP,pcm=8
/dev/input/event15:     HDA Intel PCH HDMI/DP,pcm=9
/dev/input/event16:     HDA Intel PCH HDMI/DP,pcm=10
/dev/input/event17:     ipts 1B96:001F UNKNOWN
/dev/input/event18:     ipts 1B96:001F Pen
/dev/input/event19:     ipts 1B96:001F
/dev/input/event20:     ipts 1B96:001F Mouse
/dev/input/event21:     Surface Pen
Select the device event number [0-21]: 18
Input driver version is 1.0.1
Input device ID: bus 0x44 vendor 0x1b96 product 0x1f version 0x0
Input device name: "ipts 1B96:001F Pen"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 256 (BTN_0)
    Event code 320 (BTN_TOOL_PEN)
    Event code 321 (BTN_TOOL_RUBBER)
    Event code 330 (BTN_TOUCH)
    Event code 331 (BTN_STYLUS)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max     9600
      Resolution      34
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max     7200
      Resolution      38
    Event code 24 (ABS_PRESSURE)
      Value      0
      Min        0
      Max     1024
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
Testing ... (interrupt to exit)
jakeday commented 6 years ago

Did you try repairing your pen?

geoffholden commented 6 years ago

I've tried, but it doesn't help. /dev/input/event21 is the Bluetooth connection to the pen, and that reports the pen button (eraser end), but nothing else.

jakeday commented 6 years ago

@geoffholden Can you get me the output of lsusb and lspci?

jakeday commented 6 years ago

@geoffholden Nevermind, I figured it out.

jakeday commented 6 years ago

This should be working now with the build and changes I just pushed. You'll need to install the latest kernel and headers, use the new udev rule, and use the appropriate updated ipts_firmware package.

geoffholden commented 6 years ago

Still no-go on the pen. :( Touchscreen works fine though.

% lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 02)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 02)
00:05.0 Multimedia controller: Intel Corporation Skylake Imaging Unit (rev 01)
00:13.0 Non-VGA unclassified device: Intel Corporation Device 9d35 (rev 21)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:14.3 Multimedia controller: Intel Corporation Device 9d32 (rev 01)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)
00:15.2 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #2 (rev 21)
00:15.3 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #3 (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:16.4 Communication controller: Intel Corporation Device 9d3e (rev 21)
00:1c.0 PCI bridge: Intel Corporation Device 9d13 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1e.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO UART Controller #0 (rev 21)
00:1f.0 ISA bridge: Intel Corporation Device 9d4e (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Device 9d71 (rev 21)
01:00.0 Ethernet controller: Marvell Technology Group Ltd. 88W8897 [AVASTAR] 802.11ac Wireless
02:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a806
% lsusb
Bus 002 Device 003: ID 045e:0306 Microsoft Corp. 
Bus 002 Device 005: ID 045e:07c6 Microsoft Corp. 
Bus 002 Device 004: ID 045e:0902 Microsoft Corp. 
Bus 002 Device 002: ID 045e:0900 Microsoft Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 045e:09c0 Microsoft Corp. 
Bus 001 Device 008: ID 1286:204c Marvell Semiconductor, Inc. 
Bus 001 Device 005: ID 045e:0904 Microsoft Corp. 
Bus 001 Device 007: ID 067b:2571 Prolific Technology, Inc. 
Bus 001 Device 006: ID 045e:07a5 Microsoft Corp. Wireless Receiver 1461C
Bus 001 Device 004: ID 045e:0903 Microsoft Corp. 
Bus 001 Device 002: ID 045e:0901 Microsoft Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub