X11 libinput failing Keyboard and touchpad not working on dell xps 9300

Hello,

I recently reinstalled nixos after upgrading the ssd. Everything was working fine with the default config (from the live cd installer). I was even able to start using my setup from before the install. Then after the update on the 13th my keyboard and mouse stopped working. So I have to use the update from the 8th.

This is my config. _new.nix files were created by the new install and _old.nix files were from before the install.

  1. I tried removing some of the previous changes (fprintd, gnome keyring, seahorse) none of that worked.
  2. I went back to the configuration.nix created by the installer.
  3. I tried using the latest linux kernel.
  4. I ran nixos-generate-cofig

None of these options worked. Another thing I noticed is I can’t switched to a different virtual terminal so I’m not sure this is an x11 issue or a console issue.

So I am really stuck and I’m not sure what to do after this.

Ok when I try it with services.xserver.enable = false; the keyboard works. This is with the very small config from nixos-generate-config.

{ config, lib, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];

  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  console = {
    font = "Lat2-Terminus16";
    keyMap = "us";
  #   useXkbConfig = true; # use xkb.options in tty.
  };

  services.xserver.enable = false;

  system.stateVersion = "23.11";
}

Here is another update. I found the X.0.log.old has some errors for libinput.

[     6.114] (II) LoadModule: "libinput"
[     6.118] (II) Loading /nix/store/wmaai5v87wmnllh2l3h56wbaadfk9672-xf86-input-libinput-1.4.0/lib/xorg/modules/input/libinput_drv.so
[     6.128] (EE) Failed to load /nix/store/wmaai5v87wmnllh2l3h56wbaadfk9672-xf86-input-libinput-1.4.0/lib/xorg/modules/input/libinput_drv.so: /nix/store/26wxdyshnaxx68an1d96411rzxb629kz-libwacom-2.8.0/lib/libwacom.so.9: file too short
[     6.128] (EE) Failed to load module "libinput" (loader failed, 0)
[     6.128] (EE) No input driver matching `libinput'

From what I read this means the so file is corrupted. How do I verify this or fix it on nixos? I’m guessing it comes from a cache.

I’m not sure if I am doing this right but I am taking the store path for the libraries and trying to verify them.

Failed to load /nix/store/wmaai5v87wmnllh2l3h56wbaadfk9672-xf86-input-libinput-1.4.0/lib/xorg/modules/input/libinput_drv.so: /nix/store/26wxdyshnaxx68an1d96411rzxb629kz-libwacom-2.8.0/lib/libwacom.so.9: file too short

For libinput

nix --extra-experimental-features nix-command store verify --store https://cache.nixos.org/ /nix/store/wmaai5v87wmnllh2l3h56wbaadfk9672-xf86-input-libinput-1.4.0

This passes and for libwacam it passes

nix --extra-experimental-features nix-command store verify --store https://cache.nixos.org/ /nix/store/26wxdyshnaxx68an1d96411rzxb629kz-libwacom-2.8.0

I ran

nix-store --verify --check-contents

And libwacom showed up.

checking store hashes...
path '/nix/store/26wxdyshnaxx68an1d96411rzxb629kz-libwacom-2.8.0' was modified! expected hash 'sha256:11kk41ljmxwm8n54qaabz6v9kcmw5nv9jp3nrvbqrmfr3z5ks0n1', got 'sha256:1fw8m3b96r7wfyx7zcay2j6g5ryvh6j42y8038qqa3gsixrslfl0'
path '/nix/store/5hg6x9jiv4p7i2wcgjqmdq64a2qpvg7z-libvisual-0.4.1' was modified! expected hash 'sha256:0waih3yfd3lzmz74w694cnpx0dz3alhhy8cg8cdjx9sjhglibj1k', got 'sha256:0ln21gifhikwbv5wsps32fgm30c58snqp4prx7kyjaqmkgzh569x'
path '/nix/store/cncbpk8xjbmx5ws98076dwl70wzjy9k5-gupnp-igd-1.2.0' was modified! expected hash 'sha256:12g7a4gngsapbjhcqckywddczhsw1xvacrgvnz2mi6lgj9mqrnxd', got 'sha256:0fx6ny1099ggcy0wj0bhmvbdfx1lm1k7g2sndzwcs53x7f8fvlyz'
path '/nix/store/l0ngj5hhhymc58c28lilngqxljkfh6ha-libvisual-0.4.1' was modified! expected hash 'sha256:1dyvr3gbqmh5q146j6fj665jnks8nbs1c8iqwgl4cgidm0z5n7yi', got 'sha256:0ln21gifhikwbv5wsps32fgm30c58snqp4prx7kyjaqmkgzh569x'
warning: not all store errors were fixed

I’m going to try the repair option next.

This is the solution and it works after restarting.

Run

nix-store --verify --check-contents --repair

It copied the path along with sever other paths.

checking store hashes...
path '/nix/store/26wxdyshnaxx68an1d96411rzxb629kz-libwacom-2.8.0' was modified! expected hash 'sha256:11kk41ljmxwm8n54qaabz6v9kcmw5nv9jp3nrvbqrmfr3z5ks0n1', got 'sha256:1fw8m3b96r7wfyx7zcay2j6g5ryvh6j42y8038qqa3gsixrslfl0'
copying path '/nix/store/26wxdyshnaxx68an1d96411rzxb629kz-libwacom-2.8.0' from 'https://cache.nixos.org'...
1 Like