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.

19 December right, that's it, finally filed a bug report against gdm3: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1908801

24 December I'm now even more confused than I was previously. I'd already tried kernel 5.4.0-42 above, which fixed the keyboard but not the touchpad. A comment on my bug report mentioned it and I thought why the hell not try it again, now I've reinstalled? To my utter surprise, both the keyboard and touchpad are now working again from the login screen onwards. Wat. Well, happy to finally have a workaround.

Furthermore, I installed lightdm to compare display managers. On 5.4.0-42, like gdm, it presents no problems. The only other kernel I have installed is 5.4.0-54, and on it gdm can't see any keyboard or touchpad input while lightdm can only see touchpad. Additionally, on lightdm the on-screen keyboard doesn't come up even when the option is clicked, but this might be something like GNOME tools only working with GDM.

This is useful to know. Thus we add to our collection of mysteries:

  • What do GDM and LightDM have in common, which prevents them from seeing keyboard input in kernel 5.4.0-54?
  • What do GDM and LightDM do differently, that results in only LightDM seeing my touchpad in 5.4.0-54?

21 January 2021 My Ubuntu bug got marked as a duplicate of another shortly after new year. It said the issue seems to have "resolved" in 5.4.0-58. I installed 0-58 and observe that -- hurrah! My keyboard is now recognised on 5.4.0-58! Now I can debug with keyboard-typed commands again.

Unfortunately, the touchpad is not -- and worse, this time there is no trace of anything labelled "touchpad" or suggestive thereof in xinput's listing, nor even the journalctl -b logs. It looks like now the touchpad is not even being recognised at the low-level hardware discovery level.

Googling "5.4.0-58 touchpad" reveals one or two very recent bugs / mail threads to do with (a) touchpad silence on (b) Acer Aspire models on (c) 0-58. I will try out the suggestions in the thread starting from here and report the results...

  • First suggestion was to add kernel parameter i8042.reset: nope
  • Second was to use i8042.nopnp - SUCCESS! Touchpad now back on. Many thanks to the people in that mail thread.

Unfortunately, I then realised that now it doesn't recognise the WiFi interface in 0-58, even in the recovery mode root terminal. 0-54 has WiFi just fine. And this issue persists even without the aforementioned kernel parameter.

After googling net-specific stuff I then became aware that, duh, there are released kernels higher than 5.4 (though it's not exactly obvious where to find that out). I ran apt --upgradeable|grep linux and it showed me various 5.8-related upgrades including hwe and image and stuff I don't understand.

Well, I apt --upgraded that way, to 5.8, and now everything's working OK (even though I saw some people mention some of these things not working on 5.8, I seem to be OK.)

So, happy about that. However, my curiousity is unsatisfied. It's already been rather cryptic to find out what kernel versions are available for Ubuntu, what changes they represent, etc. How can I find out what changes fixed the keyboard problem?

The mysteries remain unsolved.

  • 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, 2020 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, 2020 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, 2020 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.
    – jdjakub
    Sep 18, 2020 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, 2020 at 12:22


You must log in to answer this question.

Browse other questions tagged .