5

I have a Dell Inspiron 5379 running the latest firmware and Ubuntu 20.04. After the notebook sleeps, intermittently, the keyboard and the trackpad won't work. The touchscreen does work so I can reboot using the on screen keyboard. After rebooting the keyboard and the touchpad do work.

After googling, I found this suggestion to edit /etc/default/grub with this GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.direct i8042.dumbkbd" from Ubuntu 17.04 keyboard not responding after suspend but it does not have any effects.

I've also found Dell Inspiron 15-7568 Touchpad Move Freeze on Xenial 16.04 but it doesn't seems to be applicable as I don't have synapse installed.

Update: after installing synaptics (and confirming it's being used by the trackpad through xinput list-props), the issue now affects only the keyboard. The keyboard is still being managed through libinput.

I'm somewhat convinced this is related to the "tablet mode" being enabled in certain conditions (https://www.dell.com/support/article/en-uk/sln305434/how-to-enable-or-disable-tablet-mode-on-your-notebook-in-windows-10?lang=en). I'm guessing what I need to find out is how to disable it.

Possibly related: https://bbs.archlinux.org/viewtopic.php?id=237782

Update 2: Tried to run xinput list-props while the keyboard wasn't working, no additional info:

vitor@vitor-Inspiron-5379:~$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                          id=12   [slave  pointer  (2)]
⎜   ↳ DELL0804:00 06CB:7E7E Mouse               id=13   [slave  pointer  (2)]
⎜   ↳ DELL0804:00 06CB:7E7E Touchpad            id=14   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Integrated_Webcam_HD: Integrate           id=10   [slave  keyboard (3)]
    ↳ Integrated_Webcam_HD: Integrate           id=11   [slave  keyboard (3)]
    ↳ Intel Virtual Button driver               id=15   [slave  keyboard (3)]
    ↳ Intel HID events                          id=16   [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=17   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=18   [slave  keyboard (3)]
# Device not working
vitor@vitor-Inspiron-5379:~$ xinput list-props 18
Device 'AT Translated Set 2 keyboard':
    Device Enabled (171):   1
    Coordinate Transformation Matrix (173): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Send Events Modes Available (293): 1, 0
    libinput Send Events Mode Enabled (294):    0, 0
    libinput Send Events Mode Enabled Default (295):    0, 0
    Device Node (296):  "/dev/input/event4"
    Device Product ID (297):    1, 1
vitor@vitor-Inspiron-5379:~$ 
# Device working (after reboot)
vitor@vitor-Inspiron-5379:~$ xinput list-props 18
Device 'AT Translated Set 2 keyboard':
    Device Enabled (171):   1
    Coordinate Transformation Matrix (173): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Send Events Modes Available (293): 1, 0
    libinput Send Events Mode Enabled (294):    0, 0
    libinput Send Events Mode Enabled Default (295):    0, 0
    Device Node (296):  "/dev/input/event4"
    Device Product ID (297):    1, 1
vitor@vitor-Inspiron-5379:~$ 

Update 3: Followed this, found the appropriate event (https://github.com/alesguzik/linux_detect_tablet_mode also useful). Even unbinding the driver doesn't seem to solve it as well.

I'm wondering if I should just try to write a GNOME Extension to manage tablet mode.

Update 4: While I still get the tablet mode event when I extend the laptop into tablet mode, unbinding the driver seems to suppress the issue when opening the lid. I don't have an explanation for this yet. I'll find a way to automate this and, if I'm able to, try to identify the root cause.

Vitor Py
  • 363
  • You could try checking what lsmod says before and after sleep, if there is some difference then maybe some kernel module is not getting loaded after sleep? – Elias Sep 14 '20 at 10:49

2 Answers2

1

I have a very similar same problem on a Dell Inpiron 13 700. I was doing the same thing, restarting the notebook to have the mouse/keyboard back working and this was irritating me quite a bit. I figured flipping the screen, and forcing it to tablet mode, and then back again to a "notebook" position, makes everything work back to normal. It does not solve the problem, but as a work-around, at least I don't need to restart.

0

It appears that some Dell Inspiron 2-in-1 laptops report that they entry the "tablet" mode when being suspended. The libinput library blocks the keyboard and the touchpad in response. When woken up, the hardware doesn't send an event about leaving the tablet mode.

The behavior appears to be hard to reproduce reliably. However, following workarounds appear to work:

  1. Close and open the lid again for a short time. Only needs to be done once until the next reboot.
  2. Flip the lid to the tablet mode and back. It can be done in advance, before putting the laptop to sleep and needs to be done only once until the reboot.
  3. Reload the intel_vbtn driver by modprobe -r intel_vbtn && modprobe intel_vbtn (can be done manually or from cron). It will detect the switch.
  4. Delay loading of the intel_vbtn driver on boot. It can be done by adding rd.driver.blacklist=intel_vbtn to the Linux kernel command line. The driver would still load but later during boot.
proski
  • 186
  • 5