Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1135338 - Typecover on Surface Pro (keyboard) doesnt work on F20
Summary: Typecover on Surface Pro (keyboard) doesnt work on F20
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-drivers
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Benjamin Tissoires
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1403301
TreeView+ depends on / blocked
 
Reported: 2014-08-29 06:04 UTC by Nicholas Schuetz
Modified: 2016-12-09 15:02 UTC (History)
6 users (show)

Fixed In Version: kernel-3.17.3-200.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1403301 (view as bug list)
Environment:
Last Closed: 2014-11-18 12:17:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
lsusb -vv (deleted)
2014-08-29 17:13 UTC, Nicholas Schuetz
no flags Details
dmesg output (deleted)
2014-10-10 20:03 UTC, Jerry Amundson
no flags Details
usb-drivers.log (deleted)
2014-10-10 20:04 UTC, Jerry Amundson
no flags Details
evemu-record.log (deleted)
2014-10-10 20:10 UTC, Jerry Amundson
no flags Details
lsusb.log (deleted)
2014-10-14 15:52 UTC, Jerry Amundson
no flags Details
hid-recorder output (deleted)
2014-11-12 21:16 UTC, Jerry Amundson
no flags Details

Description Nicholas Schuetz 2014-08-29 06:04:22 UTC
Description of problem:

fully updated F20 on Surface Pro (1 and 3), Typecover keyboard does not work but mouse does.

# cat /dev/hidraw0
#shows data spewing for keyboard for X doesnt interpret it.

related:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1248958

Comment 1 Hans de Goede 2014-08-29 07:02:21 UTC
Can you please do (through e.g. using an external usb keyboard):

sudo yum install evemu
sudo evemu-record

The second command will print a list of input devices, can you please see if the typecover is listed there ?
If it is listed, please select it and then press a few keys on the cover and see if they generate events.

Comment 2 Hans de Goede 2014-08-29 07:04:24 UTC
Also do you know what kind of interface is being used between the typecover and the surface pro ?

If it is usb, can you please run:

sudo lsusb -vv &> lsusb.log

And then attach lsusb.log?

Comment 3 Nicholas Schuetz 2014-08-29 16:40:03 UTC
evemu-record shows the typecover but lists it a "UNKNOWN"

"/dev/input/event9:	Microsoft Surface Type Cover UNKNOWN"


I get this when attempting to record that device(9)

error: this device is grabbed and I cannot record events

Comment 4 Nicholas Schuetz 2014-08-29 16:43:06 UTC
It is indeed USB.  See attachment.

Comment 5 Nicholas Schuetz 2014-08-29 17:13:12 UTC
Created attachment 932749 [details]
lsusb -vv

Comment 6 Hans de Goede 2014-08-29 19:10:47 UTC
(In reply to Nicholas Nachefski from comment #3)
> evemu-record shows the typecover but lists it a "UNKNOWN"
> 
> "/dev/input/event9:	Microsoft Surface Type Cover UNKNOWN"
> 
> 
> I get this when attempting to record that device(9)
> 
> error: this device is grabbed and I cannot record events

Can you try switching to a text-console (ctrl + alt + f2), login there, and then do the "sudo evemu-record" from there? Then the device should not be grabbed, and you should be able to see if it properly generates events for keypresses.

Thanks,

Hans

Comment 7 Nicholas Schuetz 2014-09-02 16:50:10 UTC
So pressing keys on the keyboard itself does not spew any data.  However, when i move my finger on the mouse bad (which is attached to the keyboard) it does spew data.  pressing the keyboard keys does *not* spew any data.

Comment 8 Nicholas Schuetz 2014-09-02 16:51:05 UTC
*pad

Comment 9 Hans de Goede 2014-09-14 21:05:51 UTC
Hi,

Can you please reboot the machine, and then directly after boot, from a terminal do:

dmesg > dmesg.log
ls -lR /sys/bus/usb/drivers &> usb-drivers.log

And then attach the generated dmesg.log and usb-drivers.log files here ?

Thanks,

Hans

Comment 10 Jerry Amundson 2014-10-10 20:03:11 UTC
Created attachment 945808 [details]
dmesg output

Comment 11 Jerry Amundson 2014-10-10 20:04:11 UTC
Created attachment 945809 [details]
usb-drivers.log

Comment 12 Jerry Amundson 2014-10-10 20:10:46 UTC
Created attachment 945811 [details]
evemu-record.log

On my SP3, *nothing* gets recorded - keyboard and pad both give nothing.

Comment 13 Hans de Goede 2014-10-11 09:26:15 UTC
Hi Jerry,

Can you please do the following as root:

cd /sys/bus/usb/drivers/usbhid
echo '1-3:1.0' > unbind
lsusb -vv &> /tmp/lsusb.log

And the attach lsusb.log here ?

This will detach the usbhid driver from the keyboard, allowing lsusb to get the full hid descriptors, which should hopefully help us to figure out what is going on.

Regards,

Hans

Comment 14 Jerry Amundson 2014-10-14 15:52:50 UTC
Created attachment 946965 [details]
lsusb.log

Comment 15 Hans de Goede 2014-10-15 09:52:30 UTC
(In reply to Jerry Amundson from comment #14)
> Created attachment 946965 [details]
> lsusb.log

Thanks, all the HID descriptors are there, which is good to have, I'll let Benjamin handle this further as he is the real expert on this.

Comment 16 Jerry Amundson 2014-10-28 20:35:40 UTC
Just wondering if there is anything additional I can do to help with this ... ?

Comment 17 Benjamin Tissoires 2014-10-30 21:00:32 UTC
Apologies for the delay, I did not had the time to look into that before today.

So the device I have been reported earlier is slightly different from yours, and yours should definitively be managed by hid-multitouch.

To ease the tests, I have pushed a branch (kernels-3.15+) with the (hopefully working) support of your device:

$> git clone https://github.com/bentiss/hid-multitouch -b kernels-3.15+
$> cd hid-multitouch
$> make
$> sudo rmmod hid-multitouch ; sync ; sudo insmod hid-multitouch.ko

This should enable the keyboard and also enable the mouse.

I would then ask you to send me a hid-recorder trace of your device so I can test it by myself and see if I need to improve the patch or not.
For that, just install hid-replay from this copr[1] and capture the hid-recorder output of the Surface TypeCover.
Please type things (not your password), and move your fingers on the touchpad (also do some gestures like two fingers scrolls).


[1] https://copr.fedoraproject.org/coprs/bentiss/hid-replay/

Comment 18 Nicholas Schuetz 2014-10-30 22:19:43 UTC
That worked for me.  I was able to get into the machine by using an external keyboard and then apply your patch.  Thanks!

-Nick

Comment 19 Jerry Amundson 2014-11-12 21:16:24 UTC
Created attachment 956877 [details]
hid-recorder output

Comment 20 Benjamin Tissoires 2014-11-13 14:56:07 UTC
(In reply to Jerry Amundson from comment #19)
> hid-recorder output

Thanks for the log. Just to be sure, this was with hid-multitouch patched?
If so, then the upstream choice of using hid-microsoft instead of hid-multitouch makes sense because the touchpad is still in mouse emulation mode.

Comment 21 Jerry Amundson 2014-11-13 15:02:09 UTC
Yes, hid-multitouch patched and insmod'd.

Comment 22 Benjamin Tissoires 2014-11-13 15:22:13 UTC
OK, thanks for the confirmation.

Josh, do you think it would be possible to backport the following commit in the F21 (or even F20?) kernel tree?

https://git.kernel.org/cgit/linux/kernel/git/jikos/hid.git/commit/?h=for-3.19/microsoft&id=be3b16341d5cd8cf2a64fcc7a604a8efe6599ff0

This one is what will 3.19 get, so it should be safe to have it in Fedora.

Comment 23 Josh Boyer 2014-11-13 19:56:57 UTC
Added to F20-rawhide kernels.  Thanks.

Comment 24 Fedora Update System 2014-11-15 15:03:27 UTC
kernel-3.17.3-300.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/kernel-3.17.3-300.fc21

Comment 25 Fedora Update System 2014-11-15 16:44:31 UTC
kernel-3.17.3-200.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/kernel-3.17.3-200.fc20

Comment 26 Fedora Update System 2014-11-16 14:39:49 UTC
Package kernel-3.17.3-300.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.17.3-300.fc21'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-15159/kernel-3.17.3-300.fc21
then log in and leave karma (feedback).

Comment 27 Fedora Update System 2014-11-18 12:17:02 UTC
kernel-3.17.3-300.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 28 Fedora Update System 2014-11-20 23:03:44 UTC
kernel-3.17.3-200.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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