9

I recently installed Ubuntu 20.04 on a brand new Yoga Slim 7i Pro. Everything seems to work fine, except for the fact that the internal keyboard is usually unresponsive after turning on the computer - only select f-keys work (brightness, airplane mode, microphone on/off). The keyboard works fine in the UEFI and Grub menu; it is only after running Ubuntu that it fails. External keyboards work fine, as do both the touchpad and external mice.

Strangely, the keyboard typically starts to work just fine after a period of time between approximately 0 and 20 minutes. As far as I'm aware the timing seems completely random - I have not been able to find any event which triggers this.

After the keyboard starts working, running xinput shows an input of AT Translated Set 2 keyboard which isn't there otherwise.

I've tried several methods which have been recommended for people with similar problems, including:

  • Running sudo apt update and sudo apt upgrade

  • Running sudo apt install xserver-xorg-xinput-all

  • Installing and running a newer kernel (5.10), which according to a forum had fixed a similar issue for other people. This only made things worse - the computer screen spazzed out completely until I installed a fresh version of Ubuntu 20.04 again.

  • Installing Ubuntu 21.04. This had a similar effect as the newer kernel.

I discovered a recently active forum on Lenovo's website where people with the same type of computer are having the exact same problem - it appears that this may be a bug with respect to the laptop in question.

Any and all help with this issue is greatly appreciated.

Small update: It appears that attempting to use the keyboard and brightness keys helps "activate" the keyboard. Combinations of pressing normal keys, pressing brightness keys, waiting, opening Terminal / a browser, attempting to type and repeating work to activate the keyboard within 20 seconds in most cases; however, I have not been able to recreate any particular sequence more than twice in a row. It seems that this is necessary - the keyboard has (almost) never worked with the first press(es) of a key, no matter how long the computer has been running since rebooting.

3 Answers3

11

I also have a Lenovo Yoga Slim 7i Pro with the same problem. What helped me was specifying boot parameters for the i8042 controller, which controls the PS/2 laptop keyboard.

  1. Open /etc/default/grub as root and find the line with GRUB_CMDLINE_LINUX_DEFAULT.

  2. Append these two kernel parameters inside the quotes, ensuring a space between any others.

    • i8042.direct - Put keyboard port into non-translated mode.
    • i8042.dumbkbd - Pretend that controller can only read data from keyboard and cannot control its state (don't attempt to blink the LEDs).

    E.g. if the line is

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    

    Change it to

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.direct i8042.dumbkbd"
    
  3. Run

    sudo update-grub
    
  4. Reboot

Hope that helps. You might also check this thread.

Try different i8042 options if these don't work.

EDIT I still haven't found any explanation for this bug. I also tried installing a newer kernel version (5.11), but not only did the problem with keyboard still occur, the monitor started having problems — constant flickering when moving mouse/pressing keys — so I reverted back to 5.8.

Walf
  • 398
Pfear
  • 126
  • 4
  • Is this really the only solution? Since the keyboard works properly, including LEDs, after "activating" it with some random key presses, it should be possible to get the full functionality somehow, shouldn't it? I think there should be a boot option to activate the keyboard on startup. – iuvbio Sep 08 '21 at 16:12
  • 3
    I have not trieed exactly this solution. What I have tried is the solution at the top of this page (quite similar to the above): https://forums.lenovo.com/t5/Lenovo-Yoga-Series-Notebooks/lenovo-yoga-slim-7-pro-intell-keyboard-doesnt-work-on-ubuntu-20-04/m-p/5087655?page=2

    (Credits to Nejmish)

    To fix the keyboard and the screen flickering (tested on manjaro 5.13 kernel and ubuntu 21.04), change your grub config entry named GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub to:

    GRUB_CMDLINE_LINUX_DEFAULT="i915.enable_psr=0 i8042.direct i8042.dumbkbd"

    update-grub and reboot

    – smiron Jan 17 '22 at 19:28
  • Worked like a charm for me, on a Yoga Slim as well. Had to use a USB keyboard to do it :) – garyj Feb 02 '22 at 09:05
  • I know this isn't the right place be to asking, but i couldn't find any forum related to this so, how is the overall performance and battery life of this laptop using linux guys? – Ashok Aug 25 '22 at 00:39
  • I'm using Ubuntu 22.04 on Lenovo Yoga Slim 7 Pro 14IHU5 & had 2 issues - the screen flicker and the keyboard not responding. Both of them got fixed with GRUB_CMDLINE_LINUX_DEFAULT="i915.enable_psr=0 i8042.direct i8042.dumbkbd". – sohammondal Dec 19 '22 at 03:00
  • 1
    Worked for me with Linux Mint under VMware Workstation – bashis May 07 '23 at 12:17
3

I have this exact issue with my Lenovo Carbon X1 6th gen. My keyboard and touchpad are unresponsive after waking from suspend.

I've found that pressing the Esc key right after waking up from sleep will fix the issue until the next suspend.

zx485
  • 2,426
  • This worked for me at, at least once. I did not try this, but might be useful to others: https://github.com/mistine/i8042-keyboard-fix-linux – Michael Dec 09 '22 at 15:53
2

I had the same issue running Ubuntu 22.04. Run sudoedit /etc/default/grub in a terminal.

On the line that starts with GRUB_CMDLINE_LINUX add these parameters in between the quotation marks:

atkbd.reset=1 i8042.nomux=1 i8042.reset=1 i8042.nopnp=1 i8042.dumbkbd=1

Save it, then do sudo update-grub and reboot.

sebastian
  • 173