Bug 100341 - Surface Pro 3 Type Cover doesn't work (product id == 0x07e2 instead of 0x07dc)
Summary: Surface Pro 3 Type Cover doesn't work (product id == 0x07e2 instead of 0x07dc)
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-22 20:59 UTC by Patrick R. Michaud
Modified: 2016-02-05 03:01 UTC (History)
5 users (show)

See Also:
Kernel Version: 3.19 and later
Tree: Mainline
Regression: No


Attachments

Description Patrick R. Michaud 2015-06-22 20:59:26 UTC
A week ago I purchased a Surface Pro 3 Type Cover from a big-box retailer here in Texas... it didn't work with the 3.19 kernel provided by Kubuntu 15.04 .

After some investigation I determined that the product id on my keyboard is 0x07e2 instead of the 0x07dc value apparently given by previous Surface Pro 3 Type Covers.  Changing the definition of USB_DEVICE_ID_MS_TYPE_COVER_3 in drivers/hid/hid-ids.h to the 0x07e2 value enabled my keyboard to start working properly.

On the box the (Microsoft) part number of my keyboard is RD-00080, with a "Lot No/Date" given as "1516" and a model number of 1709.  I don't see anything to indicate that this keyboard is anything other than the standard North American Type Cover for Surface Pro 3.

I suspect a new entry for this keyboard will need to be made, but I'll have to leave that for others to work out.

Pm
Comment 1 Patrick R. Michaud 2015-06-22 21:00:53 UTC
Correction: the part number on my keyboard is RD2-00080  (typo in original post, sorry about that).
Comment 2 itsme_410@yahoo.com 2015-06-25 04:03:32 UTC
Does this work with the 4.0 kernels? These are provided in Fedora 22.
Comment 3 Patrick R. Michaud 2015-06-25 05:25:39 UTC
I've not tried the 4.0 kernels as yet... but having looked through the kernel sources for 4.0.6 and 4.1 I don't see the 0x07e2 ID listed in hid-ids.h .

I'll be glad to try loading Fedora 22 if that would be useful.

Pm
Comment 4 Patrick R. Michaud 2015-06-25 05:56:59 UTC
I just ran the Fedora 22 Live Image on my Surface Pro 3, and with the 4.0.4 kernel (the one used in the Live Image) the Type Cover Keyboard does not work.

In Kubuntu 15.04, the relevant output I get from dmesg is:

[    1.866285] usb 1-3: new full-speed USB device number 2 using xhci_hcd
[    1.994694] usb 1-3: No LPM exit latency info found, disabling LPM.
[    1.996342] usb 1-3: New USB device found, idVendor=045e, idProduct=07e2
[    1.996346] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.996349] usb 1-3: Product: Surface Type Cover
[    1.996351] usb 1-3: Manufacturer: Microsoft

Pm
Comment 5 itsme_410@yahoo.com 2015-06-25 13:35:44 UTC
Thanks! What is the kernel that you have in Kubuntu 15.04? I don't see why this would be different, but did you try the KDE spin of Fedora? https://spins.fedoraproject.org/en/kde/

Do you get the dmesg after you change the definition of USB_DEVICE_ID_MS_TYPE_COVER_3 in drivers/hid/hid-ids.h to the 0x07e2 value? 

Is this a bug in the kernel that needs to be fixed? Many thanks!
Comment 6 Patrick R. Michaud 2015-07-03 18:50:30 UTC
Using the KDE spin of Fedora 22, I get:

[liveuser@localhost ~]$ uname -a
Linux strawberry 4.0.4-301.fc22.x86_64 #1 SMP Thu May 21 13:10:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

and the relevant section of dmesg:

[    2.141873] usb 1-3: new full-speed USB device number 3 using xhci_hcd
[    2.306789] usb 1-3: No LPM exit latency info found, disabling LPM.
[    2.307765] usb 1-3: New USB device found, idVendor=045e, idProduct=07e2
[    2.307768] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.307771] usb 1-3: Product: Surface Type Cover
[    2.307773] usb 1-3: Manufacturer: Microsoft


With Fedora 22 Workstation, I get:

[liveuser@localhost ~]$ uname -a
Linux strawberry 4.0.4-301.fc22.x86_64 #1 SMP Thu May 21 13:10:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

[    2.123072] usb 1-3: new full-speed USB device number 3 using xhci_hcd
[    2.287958] usb 1-3: No LPM exit latency info found, disabling LPM.
[    2.288940] usb 1-3: New USB device found, idVendor=045e, idProduct=07e2
[    2.288941] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.288943] usb 1-3: Product: Surface Type Cover
[    2.288944] usb 1-3: Manufacturer: Microsoft


With Ubuntu 15.04, I'm getting:

ubuntu@ubuntu:~$ uname -a
Linux ubuntu 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

dmesg:

[    7.555495] usb 1-3: new full-speed USB device number 3 using xhci_hcd
[    7.684466] usb 1-3: No LPM exit latency info found, disabling LPM.
[    7.685652] usb 1-3: New USB device found, idVendor=045e, idProduct=07e2
[    7.685654] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    7.685655] usb 1-3: Product: Surface Type Cover


The Type Cover keyboard doesn't work with any of these "stock" kernels... 
the only time it has worked is when I've recompiled the kernel (3.19)
to have USB_DEVICE_ID_MS_TYPE_COVER_3 as 0x07e2 instead of 0x07dc.

I haven't tried building a 4.x kernel yet but given the Fedora 22 results
above (and having checked the 4.x sources) I'm fairly certain I'll have
the same issue.

So yes, I consider this a bug in the kernel that needs fixing... more precisely, the kernel needs to be updated to accept both 0x07dc and 0x07e2 as valid USB ids for the Type Cover keyboard.

Pm
Comment 7 Scott Percival 2015-08-06 03:42:00 UTC
Another 0x07e2 Type Cover owner here. I can confirm that the keyboard does not work under kernel 4.1.1 (Arch), unless USB_DEVICE_ID_MS_TYPE_COVER_3 is changed to 0x07e2. A patch like this one to add more recognised USB IDs would probably do the trick - https://github.com/badmadrad/surface-pro-3/blob/master/typecover.patch
Comment 8 Donavan Lance 2015-09-14 21:20:35 UTC
I've written a patch and submitted it to the linux-input mailing list. See: http://news.gmane.org/gmane.linux.kernel.input
Comment 9 Donavan Lance 2015-09-14 21:22:24 UTC
For reference, the patch was written against 4.3-rc1.
Comment 10 Ronny Standtke 2015-10-15 12:44:41 UTC
(In reply to Donavan Lance from comment #8)
> I've written a patch and submitted it to the linux-input mailing list. See:
> http://news.gmane.org/gmane.linux.kernel.input

It was a little bit difficult finding your message on LKML with the link above. Here is a more direct link:
http://thread.gmane.org/gmane.linux.kernel.input/45707

Looks like we are getting this fixed in 4.4, great!
Comment 11 Andrew K 2016-02-05 03:01:34 UTC
I install the 4.4.1 Kernel and the type cover 3 works but not type cover 4 on my Surface Pro 3 i3

 uname -a
Linux k4nh-Surface-Pro-3 4.4.1-040401-generic #201601311534 SMP Sun Jan 31 20:36:43 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

lsusb

// working type 3
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 045e:07bf Microsoft Corp. 
Bus 001 Device 003: ID 045e:07be Microsoft Corp. 
Bus 001 Device 005: ID 1286:204b Marvell Semiconductor, Inc. 
Bus 001 Device 006: ID 045e:07dc Microsoft Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

//not working type 4
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 045e:07bf Microsoft Corp. 
Bus 001 Device 003: ID 045e:07be Microsoft Corp. 
Bus 001 Device 005: ID 1286:204b Marvell Semiconductor, Inc. 
Bus 001 Device 007: ID 045e:07e8 Microsoft Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Note You need to log in before you can comment on or make changes to this bug.