You are not logged in.
Since a few months ago, the internal keyboard of my laptop does not work after boot, if the kernel version is above 6.7.9 (excluded, this is the last working version I found).
My problem seems to be related to the one in this subject, but the touchpad problem seem to have been resolved by recent versions, but not mine.
My laptop is a HP Elitebook x360 1040 G8.
How can I check what the problem is, and/or find patches? (and how to apply them)
Last edited by raphix (2025-04-07 07:31:46)
configs files on github -- keep up the good work, arch devs
Offline
I think the link to the other post you have mentioned is broken (it redirects me to the "create a new post" form) ...
Offline
Also please post a complete system journal from a boot w/ a good and a bad kernel and, pure speculation, try to add "atkbd.reset i8042.reset i8042.nopnp i8042.kbdreset" to the https://wiki.archlinux.org/title/Kernel_parameters and see whether that makes any difference.
Offline
Hello,
First, thank you for your help. It didn't work, unfortunately, to add "atkbd.reset i8042.reset i8042.nopnp i8042.kbdreset" to my Grub starting line. However, I am not an expert in kernel parameters, perhaps it was not at the grub level that I should have tried. (I did check that it was used with `cat /proc/cmdline`, though).
I tried to re-install newer versions of the kernel (6.10.6, 6.10.10, 6.12.10, 6.13.2, 6.13.4), beyond the "working" 6.7.9), and discovered that there is an error message pointing towards the build of /var/lib/dkms/i8042-spectre/.
With 6.7.9, it's built without errors in /var/lib/dkms/i8042-spectre/kernel-6.7.9-arch1-1-x86_64/ (with a log in ./log/make.log). With all versions above, the build is in /var/lib/dkms/i8042-spectre/1.0/ (log in the ./build/make.log file).
Here's a log with errors:
DKMS (dkms-3.1.5) make.log for i8042-spectre/1.0 for kernel 6.10.6-arch1-1 (x86_64)
jeu. 27 févr. 2025 10:57:31 CET
Cleaning build area
# command: make -C /usr/lib/modules/6.10.6-arch1-1/build M=/var/lib/dkms/i8042-spectre/1.0/build clean
make : on entre dans le répertoire « /usr/lib/modules/6.10.6-arch1-1/build »
make : on quitte le répertoire « /usr/lib/modules/6.10.6-arch1-1/build »
# exit code: 0
# elapsed time: 00:00:00
Building module(s)
# command: make -j8 KERNELRELEASE=6.10.6-arch1-1 KDIR=/usr/lib/modules/6.10.6-arch1-1/build
make -C /usr/lib/modules/6.10.6-arch1-1/build M=/var/lib/dkms/i8042-spectre/1.0/build modules
make[1] : on entre dans le répertoire « /usr/lib/modules/6.10.6-arch1-1/build »
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (GCC) 14.2.1 20240805
You are using: gcc (GCC) 14.2.1 20250207
CC [M] /var/lib/dkms/i8042-spectre/1.0/build/i8042-spectre.o
Dans le fichier inclus depuis /var/lib/dkms/i8042-spectre/1.0/build/i8042.h:14,
depuis /var/lib/dkms/i8042-spectre/1.0/build/i8042-spectre.c:131:
/var/lib/dkms/i8042-spectre/1.0/build/i8042-x86ia64io.h: Dans la fonction « i8042_pnp_id_to_string »:
/var/lib/dkms/i8042-spectre/1.0/build/i8042-x86ia64io.h:1004:9: erreur: déclaration implicite de la fonction « strlcpy »; vouliez-vous utiliser « strncpy » ? [-Wimplicit-function-declaration]
1004 | strlcpy(dst, "PNP:", dst_size);
| ^~~~~~~
| strncpy
make[3]: *** [scripts/Makefile.build:244: /var/lib/dkms/i8042-spectre/1.0/build/i8042-spectre.o] Error 1
make[2]: *** [/usr/lib/modules/6.10.6-arch1-1/build/Makefile:1934: /var/lib/dkms/i8042-spectre/1.0/build] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1] : on quitte le répertoire « /usr/lib/modules/6.10.6-arch1-1/build »
make: *** [Makefile:7: all] Error 2
# exit code: 2
# elapsed time: 00:00:01
As for the journal log that were asked for, here is the link for the 6.7.9 and the link for the 6.13.4.
I have just tried what is suggested in this post: https://bbs.archlinux.org/viewtopic.php?id=261108&p=3 (adding i8042.nopnp=1 i8042.dumbkbd=1 to kernal params), it did not wrok either.
It looks a bit like a typo in the source code (using strlcopy instead of strncopy), but:
- I don't know how to fix it (ie, manually download the code, change it, and compile it back)
- I am not sure if that would solve the problem
Last edited by raphix (2025-02-27 15:23:28)
configs files on github -- keep up the good work, arch devs
Offline
(I did check that it was used with `cat /proc/cmdline`, though).
Short of the actual module messages in dmesg this is authortive and the parameters can assumed to be applied.
/var/lib/dkms/i8042-spectre/1.0/build/i8042-x86ia64io.h: Dans la fonction « i8042_pnp_id_to_string »:
/var/lib/dkms/i8042-spectre/1.0/build/i8042-x86ia64io.h:1004:9: erreur: déclaration implicite de la fonction « strlcpy »; vouliez-vous utiliser « strncpy » ? [-Wimplicit-function-declaration]
1004 | strlcpy(dst, "PNP:", dst_size);
| ^~~~~~~
| strncpy
make[3]: *** [scripts/Makefile.build:244: /var/lib/dkms/i8042-spectre/1.0/build/i8042-spectre.o] Error 1
make[2]: *** [/usr/lib/modules/6.10.6-arch1-1/build/Makefile:1934: /var/lib/dkms/i8042-spectre/1.0/build] Error 2
The build fails, /var/lib/dkms/i8042-spectre/1.0/build/i8042-x86ia64io.h needs to "#include <string.h>"
https://github.com/dustydecapod/i8042-s … s/issues/4
https://github.com/dustydecapod/i8042-s … s/issues/5
Offline
Currently, no luck with this github repo either.
My problem seems a bit different: I cannot build the i8042 module for kernel versions beyond 6.7.9. So, the workaround in issue #5 is to help people successfully building i8042 but getting a wrong/unexpected behavior (keys unresponsive for 10-20 seconds at boot). And issue #4 has no answer, just a build error message.
configs files on github -- keep up the good work, arch devs
Offline
Edit /var/lib/dkms/i8042-spectre/1.0/build/i8042-x86ia64io.h and add "#include <string.h>" ?
Offline
I have tried to edit and add this line, but it still fails with C compilation errors (e.g., use of strlcopy or strncopy). I have tried to "fix" a few of them, but I am not a C/module expert, so I did not yet succeed in obtaining a clean build :-(
It seems that a recent update introduced some problems with kernel 6.7.9 and suspend/power management: I suspect that I will have to dive more into this problem, to be able to run newer kernels (which don't have "suspend" problems, but currently don't work with my laptop's internal keyboard).
configs files on github -- keep up the good work, arch devs
Offline
still fails with C compilation errors (e.g., use of strlcopy or strncopy)
Whenever it complains about the imlicit declaration of strlcopy, the file needs to include string.h
In doubt
LC_ALL=C make
and post the output.
Offline
First, thanks a lot for your time.
After trying a bit, I guess I don't precisely get where I have to put the #include <string.h> line.
Here is the folder structure in /var/lib/dkms/i8042-spectre/1.0/build:
.
├── dkms.conf
├── i8042.h
├── i8042-spectre.c
├── i8042-spectre-dkms
│ ├── dkms.conf
│ ├── i8042.h
│ ├── i8042-spectre.c
│ ├── i8042-x86ia64io.h
│ ├── Makefile
│ └── README.md
├── i8042-spectre.mod
├── i8042-x86ia64io.h
├── Makefile
├── make.log
└── README.md
I have tried adding the line as the first line (to avoid ifdef branching) of both files named "i8042-x86ia64io.h" (ie, i8042-x86ia64io.h and i8042-spectre-dkms/i8042-x86ia64io.h), but the compilation fails:
[build]# LC_ALL=C make
make -C /lib/modules/6.13.8-arch1-1/build M=/var/lib/dkms/i8042-spectre/1.0/build modules
make[1]: Entering directory '/usr/lib/modules/6.13.8-arch1-1/build'
make[2] : on entre dans le répertoire « /var/lib/dkms/i8042-spectre/1.0/build »
CC [M] i8042-spectre.o
Dans le fichier inclus depuis i8042-spectre.c:131:
i8042.h:14:10: erreur fatale: string.h : Aucun fichier ou dossier de ce nom
14 | #include <string.h>
| ^~~~~~~~~~
compilation terminée.
make[4]: *** [/usr/lib/modules/6.13.8-arch1-1/build/scripts/Makefile.build:196: i8042-spectre.o] Error 1
make[3]: *** [/usr/lib/modules/6.13.8-arch1-1/build/Makefile:1989: .] Error 2
make[2]: *** [/usr/lib/modules/6.13.8-arch1-1/build/Makefile:251: __sub-make] Error 2
make[2] : on quitte le répertoire « /var/lib/dkms/i8042-spectre/1.0/build »
make[1]: *** [Makefile:251: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.13.8-arch1-1/build'
make: *** [Makefile:7: all] Error 2
I have also tried to edit and then compile from /var/lib/dkms/i8042-spectre/1.0/source, with the same results. I have tried with #include <linux/string.h>, but then it complains about "implicit declaration of strlcpy" (see full message at the top of this topic).
So could you point me to a documentation or explain me a bit where I should add the line and how to compile?
(thank you again for your time!)
Last edited by raphix (2025-04-04 08:30:14)
configs files on github -- keep up the good work, arch devs
Offline
Why does LC_ALL=C make speak french?
Either way, /usr/include/string.h is part of glibc
pacman -Qikk glibc
stat /usr/include/string.h
VERBOSE=1 LC_ALL=C make
and try to add the include to i8042-spectre.c
Offline
For the locale thing, I don't know what's going on… I even tried with en_EN.UTF-8, same result (French messages). I had error messages in English only when using the "unset LANG; source /etc/profile.d/locale.sh" (and creating a ".config/locale.conf" file, with "LANG=en_US.UTF-8" to override the system-wide setting).
I tried to add the line to i8042-spectre.c, still no result.
configs files on github -- keep up the good work, arch devs
Offline
Does the VERBOSE=1 at least increase the compiler output level so we can see the include paths etc.?
What about the file stat and glibc sanity?
(The french output is more of a curiosity as it might indicate a context isolation to explain the missing header - I can still read that )
Offline
$ sudo pacman -Qikk glibc | curl -F 'file=@-' 0x0.st
http://0x0.st/8_c2.txt
$ stat /usr/include/string.h | curl -F 'file=@-' 0x0.st
http://0x0.st/8_c9.txt
As for the VERBOSE=1, the output are the same with and without it.
Yes, the French messages are unexpected, and perhaps it's a lead towards an anwser (but I haven't found yet how)…
Well, I don't exactly understand how "modules" are handled but: it seems that this i8042-spectre is broken, and has been for years (as evidenced by the github repo posted above by Seth). However, it is widely used by a lot of laptops (HP for business), not a niche product. Isn't there a "replacement" module that I can try?
Last edited by raphix (2025-04-06 09:31:06)
configs files on github -- keep up the good work, arch devs
Offline
https://github.com/archlinux/linux/comm … f8b85e6b44
The module doesn't tap into the userspace glibc, so…
sed -i 's/strlcpy/strscpy/g' i8042-spectre.c i8042-x86ia64io.h
make
Offline
Well, thank you very much! I thought I had checked that, but this helped a lot.
There is an error after that, which I was able to correct (a function returning no longer returning an int).
Now, the "make" goes through!
However, I need one extra step: when I use "pacman -S linux linux-headers", the folder with those updates seems to be ignored, and I get the same error. The installation process uses "dkms install --no-depmod i8042-spectre/1.0 -k 6.13.8-arch1-1".
Sorry for being a noob, but what should I do after the "make" is OK?
Last edited by raphix (2025-04-06 19:12:22)
configs files on github -- keep up the good work, arch devs
Offline
There is an error after that, which I was able to correct (a function returning no longer returning an int).
Specifically?
(The return values of strlcpy and strscpy differ in nature, I didn't see them being used but glossing over that might result in a building but misbehaving module!)
The dkms sources will reside in /usr/src, you'd have to patch them there, too.
Offline
First, thank you very much for all this, it works now! (after patching in "/usr/src")
I have a recent kernel (so, I can suspend my laptop) and a keyboard!
You're right, I should have posted the log and the second error.
In i8042-spectre.c, line 1603 and following:
static int i8042_remove(struct platform_device *dev)
{
i8042_unregister_ports();
i8042_free_irqs();
i8042_controller_reset(false);
i8042_platform_device = NULL;
return 0;
}
static struct platform_driver i8042_driver = {
.driver = {
.name = "i8042",
#ifdef CONFIG_PM
.pm = &i8042_pm_ops,
#endif
},
.remove = i8042_remove,
.shutdown = i8042_shutdown,
};
The error message is the following (sorry, still French here ):
make -C /lib/modules/6.13.8-arch1-1/build M=/usr/src/i8042-spectre-1.0/i8042-spectre-dkms modules
make[1] : on entre dans le répertoire « /usr/lib/modules/6.13.8-arch1-1/build »
make[2] : on entre dans le répertoire « /usr/src/i8042-spectre-1.0/i8042-spectre-dkms »
CC [M] i8042-spectre.o
Dans le fichier inclus depuis i8042.h:14,
depuis i8042-spectre.c:131:
i8042-x86ia64io.h: Dans la fonction « i8042_pnp_id_to_string »:
i8042-x86ia64io.h:1005:9: erreur: déclaration implicite de la fonction « strlcpy »; vouliez-vous utiliser « strncpy » ? [-Wimplicit-function-declaration]
1005 | strlcpy(dst, "PNP:", dst_size);
| ^~~~~~~
| strncpy
i8042-spectre.c: Au plus haut niveau:
i8042-spectre.c:1620:27: erreur: initialisation de « void (*)(struct platform_device *) » depuis le type pointeur « int (*)(struct platform_device *) » qui est incompatible [-Wincompatible-pointer-types]
1620 | .remove = i8042_remove,
| ^~~~~~~~~~~~
i8042-spectre.c:1620:27: note: (près de l'initialisation de « i8042_driver.remove »)
make[4]: *** [/usr/lib/modules/6.13.8-arch1-1/build/scripts/Makefile.build:196: i8042-spectre.o] Error 1
make[3]: *** [/usr/lib/modules/6.13.8-arch1-1/build/Makefile:1989: .] Error 2
make[2]: *** [/usr/lib/modules/6.13.8-arch1-1/build/Makefile:251: __sub-make] Error 2
make[2] : on quitte le répertoire « /usr/src/i8042-spectre-1.0/i8042-spectre-dkms »
make[1]: *** [Makefile:251: __sub-make] Error 2
make[1] : on quitte le répertoire « /usr/lib/modules/6.13.8-arch1-1/build »
make: *** [Makefile:7: all] Error 2
So my fix was just to change the "static int i8042_remove(struct platform_device *dev)" (line 1603) into "static void i8042_remove(struct platform_device *dev)", and to remove the last two lines of the function ("return 0"), so that it does not return anything explictly.
Perhaps I should have done the converse, i.e., find the declaration and change it to "int", instead of changing the function to respect the declaration.
Last edited by raphix (2025-04-07 07:30:33)
configs files on github -- keep up the good work, arch devs
Offline
Nope, void* is fine, see https://elixir.bootlin.com/linux/v6.13. … ice.h#L236
Offline