Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Cover disconnects for a few seconds #342

Open
danielzgtg opened this issue Nov 18, 2020 · 7 comments
Open

Type Cover disconnects for a few seconds #342

danielzgtg opened this issue Nov 18, 2020 · 7 comments

Comments

@danielzgtg
Copy link

Occasionally, my Type Cover suddenly powers off for a few seconds then lights up again.
I usually notice this when using the touchpad.
I haven't noticed this happen in Windows, but that might just be because I don't usually use it.

This is annoying because the touchpad settings revert to default, and I can't tap to click and the cursor speed is low.
I need to open KDE System Settings > Input Devices > Touchpad and toggle "Device Enabled" twice then click "Apply" to get my settings back.
This issue may be more harmful if it occurs during work that requires realtime input such as meetings or games.

This might be related to #233, but this is different because in that issue the wrong settings appear in KDE System Settings, while in my case the correct settings remain there.
I also didn't see "USB disconnect" in that issue's dmesg, and my issue doesn't happen across suspend-resume.
I've encountered the issue of KDE settings not applying with a Wacom tablet on a desktop, so that's not a linux-surface issue, and this issue focuses on the Type Cover USB disconnection problem.

Environment

  • Hardware model: Surface Pro 7 i7 512GB
  • Kernel version: Linux daniel-tablet1 5.9.8-surface #1 SMP Fri Nov 13 21:49:37 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Distribution: Ubuntu 20.04.1 LTS Desktop
`dmesg` output
[27889.435249] usb 3-8: USB disconnect, device number 3
[27892.328354] usb 3-8: new full-speed USB device number 4 using xhci_hcd
[27892.477677] usb 3-8: New USB device found, idVendor=045e, idProduct=09c0, bcdDevice= 0.07
[27892.477681] usb 3-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[27892.477683] usb 3-8: Product: Surface Type Cover
[27892.477685] usb 3-8: Manufacturer: Microsoft
[27892.483973] input: Microsoft Surface Type Cover Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input36
[27892.540906] input: Microsoft Surface Type Cover Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input37
[27892.541208] input: Microsoft Surface Type Cover Consumer Control as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input38
[27892.541363] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input39
[27892.541505] input: Microsoft Surface Type Cover Touchpad as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input40
[27892.541732] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input41
[27892.541855] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input42
[27892.541973] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input43
[27892.542087] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input44
[27892.542204] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input45
[27892.542319] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input46
[27892.542476] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input47
[27892.542656] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input48
[27892.542850] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input49
[27892.543029] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input50
[27892.543246] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input51
[27892.543444] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input52
[27892.543632] input: Microsoft Surface Type Cover UNKNOWN as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:045E:09C0.0003/input/input53
[27892.543994] hid-multitouch 0003:045E:09C0.0003: input,hiddev0,hidraw0: USB HID v1.11 Keyboard [Microsoft Surface Type Cover] on usb-0000:00:14.0-8/input0
@danielzgtg
Copy link
Author

danielzgtg commented Feb 15, 2021

I reported the settings reset half of the problem upstream to https://bugs.kde.org/show_bug.cgi?id=432989

@hardwareadictos
Copy link

I have a similar issue on my surface go on the boot process, I have my device encrypted and when I enter the password I have to be quick enough for avoiding it, if not the keyboard turns off while im writting the passphrase. It usually powers on by it self on 2-3 seconds, on the OS sometimes stops working also having then to replug it again.

@surfs-ubuntu
Copy link

surfs-ubuntu commented Mar 14, 2021

I'm experiencing a similar issue with my Surface Go. My type cover just disconnects and reconnects randomly. It seems like immediately after reboot, I don't get this issue, but after repeatedly suspending and resuming, the issue becomes worse and worse, until I'm eventually forced to reboot because it no longer connects.

Hardware model: Surface Go 128GB
Kernel version: 5.1.15-surface-linux-surface
Distribution: Ubuntu 20.04.2 LTS

My dmesg output is more or less the same as the OP's...

dmesg output [Mar13 18:55] usb 1-7: USB disconnect, device number 70 [ +3.314014] usb 1-7: new full-speed USB device number 71 using xhci_hcd [ +0.149230] usb 1-7: New USB device found, idVendor=045e, idProduct=096f, bcdDevice= 0.11 [ +0.000002] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ +0.000002] usb 1-7: Product: Surface Type Cover [ +0.000002] usb 1-7: Manufacturer: Microsoft [ +0.003463] input: Microsoft Surface Type Cover as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/0003:045E:096F.0308/input/input993 [ +0.059723] hid-generic 0003:045E:096F.0308: input,hidraw0: USB HID v1.11 Keyboard [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input0 [ +0.001101] input: Microsoft Surface Type Cover Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:096F.0309/input/input994 [ +0.058759] input: Microsoft Surface Type Cover as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:096F.0309/input/input995 [ +0.000286] hid-generic 0003:045E:096F.0309: input,hiddev0,hidraw1: USB HID v1.11 Device [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input1 [ +0.004960] hid-generic 0003:045E:096F.030A: hiddev1,hidraw2: USB HID v1.11 Device [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input2 [ +0.002365] input: Microsoft Surface Type Cover Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:096F.030B/input/input996 [ +0.000619] input: Microsoft Surface Type Cover Touchpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:096F.030B/input/input997 [ +0.000262] hid-multitouch 0003:045E:096F.030B: input,hiddev2,hidraw3: USB HID v1.11 Mouse [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input3 [Mar13 18:56] usb 1-7: USB disconnect, device number 71 [ +4.801597] usb 1-7: new full-speed USB device number 72 using xhci_hcd [ +0.162297] usb 1-7: New USB device found, idVendor=045e, idProduct=096f, bcdDevice= 0.11 [ +0.000003] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ +0.000002] usb 1-7: Product: Surface Type Cover [ +0.000002] usb 1-7: Manufacturer: Microsoft [ +0.002989] input: Microsoft Surface Type Cover as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/0003:045E:096F.030C/input/input998 [ +0.059225] hid-generic 0003:045E:096F.030C: input,hidraw0: USB HID v1.11 Keyboard [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input0 [ +0.001488] input: Microsoft Surface Type Cover Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:096F.030D/input/input999 [ +0.062265] input: Microsoft Surface Type Cover as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:096F.030D/input/input1000 [ +0.000341] hid-generic 0003:045E:096F.030D: input,hiddev0,hidraw1: USB HID v1.11 Device [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input1 [ +0.005105] hid-generic 0003:045E:096F.030E: hiddev1,hidraw2: USB HID v1.11 Device [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input2 [ +0.002372] input: Microsoft Surface Type Cover Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:096F.030F/input/input1001 [ +0.001614] input: Microsoft Surface Type Cover Touchpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:096F.030F/input/input1002 [ +0.000321] hid-multitouch 0003:045E:096F.030F: input,hiddev2,hidraw3: USB HID v1.11 Mouse [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input3

I have no idea if this is relevant, but one thing I've noticed is that on every disconnect and reconnect, the device number increments.

Further dmesg output [ +20.093647] usb 1-7: USB disconnect, device number 73 [ +2.265491] usb 1-7: new full-speed USB device number 74 using xhci_hcd [ +0.149434] usb 1-7: New USB device found, idVendor=045e, idProduct=096f, bcdDevice= 0.11 [ +0.000003] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ +0.000002] usb 1-7: Product: Surface Type Cover [ +0.000002] usb 1-7: Manufacturer: Microsoft [ +0.002812] input: Microsoft Surface Type Cover as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/0003:045E:096F.0314/input/input1008 [ +0.060231] hid-generic 0003:045E:096F.0314: input,hidraw0: USB HID v1.11 Keyboard [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input0 [ +0.001044] input: Microsoft Surface Type Cover Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:096F.0315/input/input1009 [ +0.058725] input: Microsoft Surface Type Cover as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:096F.0315/input/input1010 [ +0.000374] hid-generic 0003:045E:096F.0315: input,hiddev0,hidraw1: USB HID v1.11 Device [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input1 [ +0.001082] hid-generic 0003:045E:096F.0316: hiddev1,hidraw2: USB HID v1.11 Device [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input2 [ +0.002349] input: Microsoft Surface Type Cover Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:096F.0317/input/input1011 [ +0.003927] input: Microsoft Surface Type Cover Touchpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:096F.0317/input/input1012 [ +0.001768] hid-multitouch 0003:045E:096F.0317: input,hiddev2,hidraw3: USB HID v1.11 Mouse [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input3 [Mar13 18:57] usb 1-7: USB disconnect, device number 74 [ +4.498058] usb 1-7: new full-speed USB device number 75 using xhci_hcd [ +0.149368] usb 1-7: New USB device found, idVendor=045e, idProduct=096f, bcdDevice= 0.11 [ +0.000003] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ +0.000002] usb 1-7: Product: Surface Type Cover [ +0.000001] usb 1-7: Manufacturer: Microsoft [ +0.004372] input: Microsoft Surface Type Cover as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/0003:045E:096F.0318/input/input1013 [ +0.058774] hid-generic 0003:045E:096F.0318: input,hidraw0: USB HID v1.11 Keyboard [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input0 [ +0.001095] input: Microsoft Surface Type Cover Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:096F.0319/input/input1014 [ +0.058810] input: Microsoft Surface Type Cover as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:096F.0319/input/input1015 [ +0.000951] hid-generic 0003:045E:096F.0319: input,hiddev0,hidraw1: USB HID v1.11 Device [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input1 [ +0.001239] hid-generic 0003:045E:096F.031A: hiddev1,hidraw2: USB HID v1.11 Device [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input2 [ +0.002371] input: Microsoft Surface Type Cover Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:096F.031B/input/input1016 [ +0.000445] input: Microsoft Surface Type Cover Touchpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:096F.031B/input/input1017 [ +0.000321] hid-multitouch 0003:045E:096F.031B: input,hiddev2,hidraw3: USB HID v1.11 Mouse [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input3 [ +18.356153] usb 1-7: USB disconnect, device number 75 [ +1.741504] usb 1-7: new full-speed USB device number 76 using xhci_hcd [ +0.149323] usb 1-7: New USB device found, idVendor=045e, idProduct=096f, bcdDevice= 0.11 [ +0.000003] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ +0.000002] usb 1-7: Product: Surface Type Cover [ +0.000001] usb 1-7: Manufacturer: Microsoft [ +0.002634] input: Microsoft Surface Type Cover as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/0003:045E:096F.031C/input/input1018 [ +0.060400] hid-generic 0003:045E:096F.031C: input,hidraw0: USB HID v1.11 Keyboard [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input0 [ +0.000846] input: Microsoft Surface Type Cover Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:096F.031D/input/input1019 [ +0.058905] input: Microsoft Surface Type Cover as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1/0003:045E:096F.031D/input/input1020 [ +0.000224] hid-generic 0003:045E:096F.031D: input,hiddev0,hidraw1: USB HID v1.11 Device [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input1 [ +0.004565] hid-generic 0003:045E:096F.031E: hiddev1,hidraw2: USB HID v1.11 Device [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input2 [ +0.003512] input: Microsoft Surface Type Cover Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:096F.031F/input/input1021 [ +0.000224] input: Microsoft Surface Type Cover Touchpad as /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.3/0003:045E:096F.031F/input/input1022 [ +0.000258] hid-multitouch 0003:045E:096F.031F: input,hiddev2,hidraw3: USB HID v1.11 Mouse [Microsoft Surface Type Cover] on usb-0000:00:14.0-7/input3

A few other things I've noticed:

  • It usually reconnects if I just leave it alone for a few seconds, but sometimes it seems to require physically disconnecting and reconnecting the keyboard, particularly after suspending and resuming a few times.
  • It doesn't seem to be a purely physical issue... I've tried cleaning the connector several times, and I don't see the issue on Windows. It also seems to go away on a reboot. However, it's possible it's related to physically disconnecting and reconnecting it, because it does seem to happen more often after definitely being physically disconnected and reconnected or when I move it around.
  • In addition to the above, I've noticed that sometimes Ubuntu changes from recognizing my touchpad as a touchpad to recognizing my touchpad as a mouse, which ends up using different settings and disabling my two-finger scroll. Physically disconnecting and reconnecting it seems to "reset" it, and usually resolves it, though it might take a few tries. Physically disconnecting and reconnecting it also seems to cause the issue, so I expect it's probably happening because of one of the phantom disconnecting and reconnecting here.

I've used Ubuntu for years but have been fortunate enough not to have any problems that weren't easily solved with a quick search, so I may need a bit of handholding on any further debugging you'll need me to do, sorry.

@hardwareadictos
Copy link

Hey!! One year later i am on Fedora 36 on my SGO but i see this is still happening. Any progress on it? Can i help? :)

@Betelgeuse1
Copy link

Hey, this happened to me !
I didn't see this ticket, I created another one → #1147
My specs:

  • Hardware model: Surface Go 3 Intel
  • Kernel version: linux6.1.29_1-surface
  • Distribution: Void

In contrast to @surfs-ubuntu, the issue seems to never go away despite rebooting.
Based on dmesg, it gets disconnected/reconnected in a loop.
Although, the typecover never gets disconnected if I just press a unique key but happened when I try typing text.
I haven't installed any WM nor DE, still on the TTY, so it doesn't seem to be DE related, at least no in my case.

@afn
Copy link

afn commented Jan 24, 2024

I encountered this same issue on my Surface Go 2 during installation of Arch Linux, both with the linux-surface kernel and with the stock Arch kernel. Interestingly, it only happened when I was on a virtual console (TTY), not in a graphical desktop environment. I thought it might have something to do with the keyboard being active without the touchpad, so I installed and started gpm (mouse support for virtual consoles), and the problem went away.

I thought maybe it was a USB powersave issue, so I tried disabling autosuspend (adding usbcore.autosuspend=-1 to the kernel parameters) but that didn't make a difference.

I've found a way to consistently reproduce the issue: simply click on the trackpad, wait 2 seconds, and the keyboard will disconnect and reconnect. This can be confirmed from watching the dmesg output, and also from the keyboard LEDs: if you have Fn locked, the Fn light will turn off and back on during the "reboot".

Incidentally, since I'm using luks for full-disk encryption, and the keyboard disconnect issue occurs during the password entry prompt (which unhelpfully does not provide much visual feedback of characters having been entered), I enable Fn lock and watch the Fn light as I'm typing in the encryption passphrase on boot in order to ensure that the keyboard isn't getting disconnected during password entry.

This is a bit outside my area of expertise, but my hunch is that there's some sort of watchdog timer in the keyboard firmware which restarts itself when it finds that mouse events haven't been polled in ~2 seconds. If anyone has any clues on how to debug this further, and whether it's possible to either modify this firmware, or alternatively have the Linux kernel capture mouse input events even when gpm/Wayland/X isn't running, I'd be happy to do some additional digging!

@afn
Copy link

afn commented Apr 2, 2024

As a workaround/solution to the issue of the TypeCover disconnecting during password entry for full-disk encryption, I've installed unl0kr, which provides an on-screen keyboard for the disk encryption password. I don't even use the on-screen keyboard, but because this enables the trackpad input device, the disconnect issue doesn't happen while typing the password. (Also, helpfully it provides better visual feedback as characters are entered.)

FYI, for anyone on Arch, I've forked the unl0kr_arch repo to update it to the latest version (PR: Grosskopf/arch_unl0kr#5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants