nuclearsandwich / surface3-archlinux

Archlinux on the Microsoft Surface Pro 3
70 stars 4 forks source link

Type Cover 3 not working even after kernel patch #4

Open nuclearsandwich opened 10 years ago

nuclearsandwich commented 10 years ago

The patch listed here after being applied to Archlinux kernel version 3.16.

The following comes from dmesg

[  298.210436] usb 1-3: new full-speed USB device number 9 using xhci_hcd
[  298.384153] usb 1-3: No LPM exit latency info found, disabling LPM.
[  308.384780] hid-multitouch 0003:045E:07DC.0008: usb_submit_urb(ctrl) failed: -1
[  308.384822] hid-multitouch 0003:045E:07DC.0008: timeout initializing reports
[  308.385080] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:045E:07DC.0008/input/input21
[  308.385573] hid-multitouch 0003:045E:07DC.0008: input,hiddev0,hidraw2: USB HID v1.11 Keyboard [Microsoft Surface Type Cover] on usb-0000:00:14.0-3/input0
FrauH0lle commented 9 years ago

Thank you very, works like a charm!

colorprint commented 9 years ago

Works fine with Option "ClickPad" "true" Thanks!

jonasnurjonas commented 9 years ago

Hi felipeota, I use a luks encrypted disc and need to provide a password for decryption right after the kernel has booted. Your multitouch patch disabled the type cover keyboard, so I can not type in a password any more. If I readd the removed "USB_DEVICE_ID_MS_TYPE_COVER_3" lines, the type cover keyboard starts working again, but multitouch does not work. Can you help? regards jonas

colorprint commented 9 years ago

it is strange, patch works fine for me, and keyboard works fine on the grub boot menu, for example... try to reconnect the keyboard...

jonasnurjonas commented 9 years ago

I'm using ubutnu with kernel 3.19 and the german type cover. Camera, acpi-wakeup & surface-button patched applied. All working. I tried unplugging the keyboard also, but no success.

lizalc commented 9 years ago

You need to add the 'hid_multitouch' module to your initramfs to get the keyboard working during boot. On Apr 3, 2015 6:37 AM, "jonasnurjonas" notifications@github.com wrote:

I'm using ubutnu with kernel 3.19 and the german type cover. Camera, acpi-wakeup & surface-button patched applied. All working. I tried unplugging the keyboard also, but no success.

— Reply to this email directly or view it on GitHub https://github.com/nuclearsandwich/surface3-archlinux/issues/4#issuecomment-89250299 .

jonasnurjonas commented 9 years ago

Hi shvr, thanks for the hint, that did the trick! multitouch trackpad and keyboard are now working.

osamabingates commented 9 years ago

Hi jonasnurjonas, it would be very nice if you could explain how u added hid_multitouch to initramfs....I have been waiting long to be able to use my surface 3 with ubuntu and a working touchpad is very vital for me :-)

osamabingates commented 9 years ago

I tried to add hid_multitouch to /etc/initramfs-tools/modules by:

sudo gedit /etc/initramfs-tools/modules and then just put hid_multitouch to the bottom of the file and then i updated with

sudo update-initramfs -u and then rebooted but it did not work...

A sidenote, i have updated my 15.04 to the latest kernel 4 with rc7, so i guess i do not have archlinux but this is the closest i have gotten to an answer to the touchpad problem on surface pro 3...

jonasnurjonas commented 9 years ago

Hi osamabingates, have you patched your kernel? The update of your initramfs looks ok.

pRiVi commented 9 years ago

I have sometimes a delay, up to 2 minutes, if you remove the typecover and reattach before you can use it again.

I have already Linux 4.0.0.

Can anybody confirm this?

Vistaus commented 9 years ago

@felipeota: I did what you said but the touchpad still isn't working. Running Linux 4.0 (latest available from Arch repos). I want to get it working though 'cause then I can disable tap-to-click (which is annoying the hell out of me right now; the touchpad doesn't work but tap-to-click does).

ieatborg commented 9 years ago

Hello,

I noticed some strange behaviour on keyboard layout and don't know if such a thing is already known.

I recently installed Arch on my Surface Pro 3 and configured it for my Type Cover for german layout. So on tty(1-6) and in KDE and every Application in KDE it works properly. But in kdm I got (how many others) the problem that the layout is >> us << . Yesterday I fumbled a bit on my xorg.conf.d files and landed on a loginscreen with no function on my keyboard and even no function on my mouse. My bad but not the point. The point is: I unplugged my mouse and plugged in a USB-Keyboard (german layout). I didn't unplugged my Type Cover. Then I tried to type someting and it works (still not the point). Now the strange thing. I tried the >> ö << key on my USB-Keyboard and woops I got an ö in kdm logginscreen.... So I typed ö on type cover and heres the point.... a nother ö on loginscreen. WTF!?

So I fixed my files and restarted kdm.service. In kdm logginscreen I typed ö key on type cover and got semicolon >> ; << us-layout. Typed ö on (still plugged in) USB-Keyboard and got ö. Typed ö again on type cover and got ö.

Magic or a bug? Respectively is it related to type cover driver or kdm?

Ps.: Sorry for bad english.

[Edit] For everyone who might be interested. I solved the problem with adding setxkbmap de to /usr/share/config/kdm/Xsetup Now I have german layout on my type cover.

felipeota commented 9 years ago

@Vistaus did you patch the kernel and added the xorg conf? Can you give me dmesg.log and xorg.0.log right after boot?

Mbra771 commented 9 years ago

Hello, I'm just trying to bring my work to Surface. Unfortunately, neither suspend works, even multitouch. I use Ubuntu and had compiled a new kernel with the patches. Cameras, touchpad, WiFi works. Suspend would be very helpful for me.

Are there any packages with a final kernel for the Surface for Ubuntu with all patches? Sorry for bad english. Iam from Germany too :-)

Regards, Micha

nuclearsandwich commented 9 years ago

Hi Micha / @Mbra771

Sorry for the delay in response. I don't have any news about Ubuntu on the Surface Pro 3.

Recent Linux kernels (4.0+) have support for most things. I think the camera still requires patches, although I'm not certain, and suspend requires custom ACPI configurations for recognizing the buttons but I think it's at least possible now.

I would suggest trying the latest release of Ubuntu, if you were using an earlier one, and either checking the parent guide to this one https://github.com/rubiojr/surface3-ubuntu-trusty or the Ubuntu forums for more help.

Feel free to keep posting in the hardware specific issues here but remember that this repository is focused on Archlinux-based distros.

ravedog commented 9 years ago

Hey guys,

I have a Surface 3 with Swedish/danish/Norwegian type cover 3 and trusty installed. No matter what i cant get that type cover working. The touch pad has been working since day one but i cant get the keyboard to work. I have vendor id 07e2 when checking with lsusb (removing and plugging in the type cover). I tired kernels already having the patch (3.19 and 4.0) and i tried patching and building myself a 3.16 myself (modified with my vendor id and "out of the box"). Nothing works. Any ideas on how to move forward here? Cheers! -R

lizalc commented 9 years ago

@ravedog, yeah, you need a patch. I have a working one written against the latest -rc kernel (4.1-rc8) that you can find here: https://github.com/shvr/fedora-surface-pro-3-kernel/blob/master/typecover3-multitouch.patch

The patch might need some editing to work on previous kernel versions if you don't want to use the -rc releases but unfortunately I don't have the time to backport it right now.

ravedog commented 9 years ago

@shvr: Awesome, ill try that right away. Cheers!

ravedog commented 9 years ago

@shvr Tried but failed. On a 14.04 with all the nessessary packages installed and 4.1-rc8: $patch -p1 --ignore-whitespace -i typecover3-multitouch.patch $cp /boot/config-4.0.0-040000-generic .config $make menuconfig $make-kpkg clean $fakeroot make-kpkg --initrd --append-to-version=-surfacepatchedkernel kernel_image kernel_headers With output:

...
                INSTALL_PATH=/home/test/Downloads/linux-4.1-rc8/debian/linux-image-4.1.0-rc8-surface-pro-3//boot  install
make[2]: Entering directory `/home/test/Downloads/linux-4.1-rc8'
scripts/kconfig/conf  --silentoldconfig Kconfig
make[2]: Leaving directory `/home/test/Downloads/linux-4.1-rc8'
make[2]: Entering directory `/home/test/Downloads/linux-4.1-rc8'
sh ./arch/x86/boot/install.sh 4.1.0-rc8-surface-pro-3 arch/x86/boot/bzImage \
                System.map "/home/test/Downloads/linux-4.1-rc8/debian/linux-image-4.1.0-rc8-surface-pro-3//boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.1.0-rc8-surface-pro-3 /home/test/Downloads/linux-4.1-rc8/debian/linux-image-4.1.0-rc8-surface-pro-3//boot/vmlinuz-4.1.0-rc8-surface-pro-3
/etc/kernel/postinst.d/apt-auto-removal: 84: /etc/kernel/postinst.d/apt-auto-removal: cannot create /etc/apt/apt.conf.d//01autoremove-kernels.dpkg-new: Permission denied
run-parts: /etc/kernel/postinst.d/apt-auto-removal exited with return code 2
make[3]: *** [install] Error 1
make[2]: *** [install] Error 2
make[2]: Leaving directory `/home/test/Downloads/linux-4.1-rc8'
make[1]: *** [debian/stamp/install/linux-image-4.1.0-rc8-surface-pro-3] Error 2
make[1]: Leaving directory `/home/test/Downloads/linux-4.1-rc8'
make: *** [kernel_image] Error 2
test@test-Surface-Pro-3:~/Downloads/linux-4.1-rc8$

Any ideas? Cheers!

lizalc commented 9 years ago

I don't really know much about Ubuntu's process for building a custom kernel, but it looks like a permission issue. Note:

run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.1.0-rc8-surface-pro-3 /home/test/Downloads/linux-4.1-rc8/debian/linux-image-4.1.0-rc8-surface-pro-3//boot/vmlinuz-4.1.0-rc8-surface-pro-3 /etc/kernel/postinst.d/apt-auto-removal: 84: /etc/kernel/postinst.d/apt-auto-removal: cannot create /etc/apt/apt.conf.d//01autoremove-kernels.dpkg-new: Permission denied run-parts: /etc/kernel/postinst.d/apt-auto-removal exited with return code 2

ravedog commented 9 years ago

Saw the permission errors but It usually fine to compile under normal account , but this time it wasn't. When ran elevated it worked fine, however the deb pkgs had some issues making installation exit on 2.

root@test-Surface-Pro-3:/home/test/Downloads# dpkg -i install linux-image-4.1.0-rc8-surfacepatchedkernel_4.1.0-rc8-surfacepatchedkernel-10.00.Custom_amd64.deb linux-headers-4.1.0-rc8-surfacepatchedkernel_4.1.0-rc8-surfacepatchedkernel-10.00.Custom_amd64.deb
dpkg: error processing archive install (--install):
 cannot access archive: No such file or directory
Selecting previously unselected package linux-image-4.1.0-rc8-surfacepatchedkernel.
(Reading database ... 304738 files and directories currently installed.)
Preparing to unpack linux-image-4.1.0-rc8-surfacepatchedkernel_4.1.0-rc8-surfacepatchedkernel-10.00.Custom_amd64.deb ...
Examining /etc/kernel/preinst.d/
Done.
Unpacking linux-image-4.1.0-rc8-surfacepatchedkernel (4.1.0-rc8-surfacepatchedkernel-10.00.Custom) ...
Selecting previously unselected package linux-headers-4.1.0-rc8-surfacepatchedkernel.
Preparing to unpack linux-headers-4.1.0-rc8-surfacepatchedkernel_4.1.0-rc8-surfacepatchedkernel-10.00.Custom_amd64.deb ...
Unpacking linux-headers-4.1.0-rc8-surfacepatchedkernel (4.1.0-rc8-surfacepatchedkernel-10.00.Custom) ...
Setting up linux-image-4.1.0-rc8-surfacepatchedkernel (4.1.0-rc8-surfacepatchedkernel-10.00.Custom) ...
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.1.0-rc8-surfacepatchedkernel /boot/vmlinuz-4.1.0-rc8-surfacepatchedkernel
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.1.0-rc8-surfacepatchedkernel /boot/vmlinuz-4.1.0-rc8-surfacepatchedkernel
update-initramfs: Generating /boot/initrd.img-4.1.0-rc8-surfacepatchedkernel
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.1.0-rc8-surfacepatchedkernel /boot/vmlinuz-4.1.0-rc8-surfacepatchedkernel
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.1.0-rc8-surfacepatchedkernel /boot/vmlinuz-4.1.0-rc8-surfacepatchedkernel
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.1.0-rc8-surfacepatchedkernel /boot/vmlinuz-4.1.0-rc8-surfacepatchedkernel
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.1.0-rc8-surfacepatchedkernel
Found initrd image: /boot/initrd.img-4.1.0-rc8-surfacepatchedkernel
Found linux image: /boot/vmlinuz-4.0.0-040000-generic
Found initrd image: /boot/initrd.img-4.0.0-040000-generic
Found linux image: /boot/vmlinuz-3.19.0-21-generic
Found initrd image: /boot/initrd.img-3.19.0-21-generic
Found linux image: /boot/vmlinuz-3.16.0-rc6-surface3
Found initrd image: /boot/initrd.img-3.16.0-rc6-surface3
Found linux image: /boot/vmlinuz-3.13.11.4-surface3
Found initrd image: /boot/initrd.img-3.13.11.4-surface3
Found linux image: /boot/vmlinuz-3.13.11-ckt20-surface-pro-3
Found initrd image: /boot/initrd.img-3.13.11-ckt20-surface-pro-3
Adding boot menu entry for EFI firmware configuration
done
Setting up linux-headers-4.1.0-rc8-surfacepatchedkernel (4.1.0-rc8-surfacepatchedkernel-10.00.Custom) ...
Examining /etc/kernel/header_postinst.d.
Errors were encountered while processing:
 install

Seems like the kernel went in alright although and the issues was just complaining about a directory that wasn't there. Cheers for the patch mate!