A few weeks ago, I updated 18.04 through 19.04 to 20.04 on my Acer laptop. Everything was fine. A few weeks later, without having done any major update or operation I can remember, I booted up to find that the laptop internal keyboard and touchpad do not do anything, both in the login screen and from then on.

Both work when I boot into Windows, so it can't be a hardware issue. And I've been through what feels like every search result on the Web tangentially related to this, installed packages, uninstalled packages, reinstalled packages, nothing has worked.

During said process I learned several things that narrow down what's happening.

  • The devices are clearly OK at some lower level; when the system is asleep / suspended, pressing a key or the touchpad easily wakes it up -- after which, they refuse to work again.
  • Strangely, the brightness key combos (Fn+/) and one that turns off the screen (Fn+F6) do work, but others such as volume (Fn+/) do not work.
  • I see all expected key output when I run sudo libinput debug-events --device /dev/input/event4 --show-keycodes and type keys.
  • When I plug in an external USB keyboard and mouse, they work correctly while the internal keyboard and touchpad remain the same.
  • 18 Sep When I use the gear icon to login with "Ubuntu" instead of "Ubuntu on Wayland", etc. the touchpad works but the keyboard remains the same. If I set WaylandEnable=False in /etc/gdm3/custom.conf and sudo systemctl restart gdm3.service, my touchpad also works on the login screen as well; keyboard still broken. Wayland trouble? But even using X does not help my keyboard.

Thus, it seems to be something to do with GNOME. Of course, I've tried reinstalling gnome-this and gnome-that and restarting, but still no success. Here's what looks like a relevant section from the system logs (journalctl -b):

Sep 17 11:36:20 joel-Aspire-E5-511 systemd[1188]: Startup finished in 17.580s.
Sep 17 11:36:20 joel-Aspire-E5-511 gnome-shell[1314]: Registering session with GDM
Sep 17 11:36:20 joel-Aspire-E5-511 gsd-media-keys[1462]: Failed to grab accelerator for keybinding settings:rfkill
Sep 17 11:36:20 joel-Aspire-E5-511 gsd-media-keys[1462]: Failed to grab accelerator for keybinding settings:playback-repeat
Sep 17 11:36:20 joel-Aspire-E5-511 gsd-media-keys[1462]: Failed to grab accelerator for keybinding settings:playback-random
Sep 17 11:36:20 joel-Aspire-E5-511 gsd-media-keys[1462]: Failed to grab accelerator for keybinding settings:hibernate
Sep 17 11:36:20 joel-Aspire-E5-511 colord[948]: failed to get session [pid 1460]: No data available
Sep 17 11:36:20 joel-Aspire-E5-511 systemd[1188]: GNOME session X11 services is not active.
Sep 17 11:36:20 joel-Aspire-E5-511 systemd[1188]: Dependency failed for GNOME XSettings.
Sep 17 11:36:20 joel-Aspire-E5-511 systemd[1188]: gsd-xsettings.target: Job gsd-xsettings.target/start failed with result 'dep>
Sep 17 11:36:20 joel-Aspire-E5-511 systemd[1188]: Starting GNOME XSettings...
Sep 17 11:36:20 joel-Aspire-E5-511 dbus-daemon[1231]: [session uid=121 pid=1231] Activating service name='org.freedesktop.port>
Sep 17 11:36:20 joel-Aspire-E5-511 dbus-daemon[1231]: [session uid=121 pid=1231] Successfully activated service 'org.freedeskt>
Sep 17 11:36:20 joel-Aspire-E5-511 gnome-shell[1575]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Sep 17 11:36:20 joel-Aspire-E5-511 gnome-shell[1575]: > Warning:          Unsupported maximum keycode 569, clipping.
Sep 17 11:36:20 joel-Aspire-E5-511 gnome-shell[1575]: >                   X11 cannot support keycodes above 255.
Sep 17 11:36:20 joel-Aspire-E5-511 gnome-shell[1575]: > Internal error:   Could not resolve keysym Invalid
Sep 17 11:36:20 joel-Aspire-E5-511 gnome-shell[1575]: Errors from xkbcomp are not fatal to the X server
Sep 17 11:36:21 joel-Aspire-E5-511 systemd[1188]: Started GNOME XSettings.

I tried to figure out when exactly gnome-shell calls xkbcomp and how it invokes it; I searched in its source code but could not find my answer. I learned what systemd is and had a look at files like gsd-xsettings.target but still could not track down how or where xkbcomp is being invoked. If I search the web for the xkbcomp error message I get things that look related but differ in details (e.g. instead of being unable to resolve keysym Invalid, it's something else) and pursuing them yields no success.

Next to the Xorg logs -- I'm confused that I have two: ~/.local/share/xorg/Xorg.0.log and /var/lib/gdm3/.local/share/xorg/Xorg.0.log. The GDM one has smaller timestamps than the local one, so does that mean this one comes first?

Anyway, the GDM log shows many devices (e.g. video bus, webcam) being "configured as Keyboard", and the log file ends with "failed to set mode - permission denied". Could this be relevant? There's also part of my local Xorg log showing more complicated device adding / removal (e.g. "Video Bus: device is a keyboard").

(I would like to show the logs, but including the relevant sections makes the question too long.)

I'm posting this question here as a last resort: how does any of this relate to each other, what's going on, and how can I diagnose / fix what's going on with my keyboard and touchpad?

18 Sep OK, I have three kernel versions available through GRUB: 5.4.0-47, 5.4.0-45, 4.15.0-112. First two do nothing, last one fixes my problems. This suggests it's a kernel bug that could in principle be narrowed down to some version.

I would like to try 5.4.0-42 as commenter Kasonnara mentioned, but this looks more complicated that I first thought. The archive given in this answer doesn't seem to have any specific version under 5.4.0-xxx, while it has all the others. Do I have to build it from source, or what?

24 Sep OK, turns out I only need to run sudo apt install linux-image-5.4.0-42-generic. I booted into it to find that the keyboard works but that the touchpad doesn't. Also, Wifi doesn't seem to be there in the top right menu and I have no internet connection.

I know 4.15.0-112 is Good and 5.4.0-42 is Broken. I see here under "Versions Published" that 20.04 (Focal) was shipped with 5.4.0-26. Thus, I install and boot that. Keyboard still working, touchpad and WiFi still broken.

I am now super confused as 20.04 worked for several weeks after I upgraded to it. Surely it was running kernel 5.4.0-26?

I could still narrow down the keyboard issue, however 5.4.0-43 and -44 don't seem to be Ubuntu packages (I get E: Unable to locate package in apt; can confirm that simply changing the 3 or 4 to a 5 shows me a valid already-installed package).

Thus I conclude so far that something between 5.4.0-42 and -45 broke my keyboard. The situation with the touchpad is far less clear; I could say between 4.15.0-112 and 5.4.0-26, but it's less clear because the latter ought to have been the working kernel I used after installing 20.04.

Next, I created a 20.04 bootable USB stick and ran "try Ubuntu". Keyboard and touchpad work fine, and when I cat /proc/version ... I see Linux version 5.4.0-42-generic.

Does this mean it's not a kernel problem after all? I'm perfectly willing to admit it's something to do with X or Wayland or GNOME or gthis or gthat.d or whatever ... I'm just not enough of an expert to know what to do next...

25 November Windows has been so terrible that it drove me back to fix this. Finally bit the bullet and reinstalled after backing up my personal files. Keyboard and touchpad STILL don't work! (with the above caveats, e.g. brightness combo works). And now I don't have the old 4.15 kernel in my list anymore!!

To reiterate: the Ubuntu 20.04 LTS install USB works fine with my keyboard and touchpad, yet the actual installed system breaks it!

I'm really frustrated here. Can nobody help me with this?? Whatever arcane steps I need to do on my own, I'll do them! Just give me a pointer!

Concretely, I would benefit from a way to trace the lifetime of a keystroke event, from hardware up to when it (should) appear on screen. Again, I'm convinced the problem is with GNOME or some middle layer. But I've no idea how to narrow it down from there.

  • 1
    Which laptop model do you have? As for the keyboard icon, that only shows if you have more than one keyboard layout enabled. Do you? – Томица Кораћ Sep 17 at 13:30
  • 1
    Looks like an Acer Aspire E5-511 model? This really might be a bug in 20.04 causing this, but not sure how you would file this one. All I know is when I had 20.04.1 installed cleanly on my system it was showing some strange bugs out of the blue that would popup that I couldn't fix like one was apt stopped supporting https repos. I guess you could boot to live media of 20.04 and test your keyboard and touchpad that way. – Terrance Sep 17 at 13:40
  • 3
    I had very similar symptomd with my Acer Aspire E5 today, other posts on ask ubuntu suggested it's a bug in recent version of the linux kernel, so I tried booting with an older version and it worked for me: "Have access to GNU GRUB menu. From there select 'advanced options' instead of the default and boot from Linux 5.4.0-42-generic". It doesn't really fix the bug but workaround the problem until a new fixed linux kernel is out. – Kasonnara Sep 18 at 12:21
  • 1
    @Kasonnara thanks. Good idea but I only have 5.4.0-47 and 45-generic, along with 4.15.0-112-generic. The first two make no difference; the last one fixes my problems :) I will add this and see if I can download the version you mentioned. I would still like to understand what is going on, but this is evidence that it's a kernel issue. – Idratex Sep 18 at 16:00
  • 1
    @ТомицаКораћ I have 5.4.0-47-generic, 5.4.0-45-generic and 5.4.0-42-generic. The newer one (5.4.0-47-generic) was fautly, so I used the same one as indicated in the other post (e.g. 5.4.0-42-generic) – Kasonnara Sep 20 at 12:22

I've had this laptop for years and on multiple Linux installs Arch Mint Ubuntu Kali and eventually, it always breaks like this and I'm still waiting for a long term solution as you can see by running into the thread seemingly just a thing we have to live with on the acer aspire e5-511

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.