Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ELAN Touchpad not detected Thinkpad P16 G1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
justwhy
n00b
n00b


Joined: 06 Sep 2024
Posts: 4

PostPosted: Fri Sep 06, 2024 6:00 pm    Post subject: ELAN Touchpad not detected Thinkpad P16 G1 Reply with quote

Hello, so I recently just installed gentoo and before I had my touchpad working but I don't know what is wrong/missing. On ubuntu LivdCD I got the lsmod and did a hwprobe:
https://linux-hardware.org/?probe=388015fb58

while for Gentoo:
https://linux-hardware.org/?probe=02622835ee

lsmod from Ubuntu liveCD:
https://clbin.com/rOlNb

kernel config from Ubuntu liveCD:
https://clbin.com/YGdDc


lsmod from Gentoo:
https://clbin.com/vBizm

kernel config from Gentoo:
https://clbin.com/vBizm

dmesg:
https://clbin.com/dnjLa


sudo libinput list-devices:
https://clbin.com/Rj1u5

uname -a:
Linux kosher-slurpee 6.6.47-gentoo-x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 5 20:07:21 MST 2024 x86_64 12th Gen Intel(R) Core(TM) i9-12900HX GenuineIntel GNU/Linux


I tried looking at multiple threads related to thinkpad and ELAN but I cannot figure it out.



Thank you :)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5093
Location: Bavaria

PostPosted: Fri Sep 06, 2024 8:16 pm    Post subject: Reply with quote

justwhy,

Welcome to Gentoo Forums ! :D

Are you sure you are booting the kernel that has this configuration ? If yes, then it could be that you need a newer kernel for your Lenovo notebook (Ubuntu had 6.8 ).

Does the touchpad work when you boot gentoo-kernel-6.10.x ?

(I ask because I checked your kernel configuration with my article:
§7 of https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_Configuring_Kernel_Version_6.6#Part_4_-_My_recommendations )
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
justwhy
n00b
n00b


Joined: 06 Sep 2024
Posts: 4

PostPosted: Fri Sep 06, 2024 10:35 pm    Post subject: Reply with quote

so I tried 6.10.8 and it didn't work in the past, I will try again but 6.10.6 works for some reason

lsmod:
https://clbin.com/uH0co

dmesg:
https://clbin.com/PABaO

sudo libinput list-devices:
https://clbin.com/xdiRm

.config:
https://clbin.com/5ywWj


I see that it properly loads i2c_hid

https://linux-hardware.org/?probe=1c32f3b7b2

Any thoughts
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5093
Location: Bavaria

PostPosted: Fri Sep 06, 2024 11:26 pm    Post subject: Reply with quote

justwhy wrote:
[...] but 6.10.6 works for some reason
[...]
Any thoughts

It may not be relevant to this problem, but you should definitely activate this (statically):
Code:
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
# CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set

Because you have enabled one important module static into your kernel ...
Code:
CONFIG_HID_MULTITOUCH=y

... you could try to do this with every necessary module - especially:
Code:
CONFIG_I2C_HID=m
CONFIG_I2C_HID_ACPI=m

If it does not work after these changes with kernel version 6.10.8, although it is recognized correctly with 6.10.6, then we have a kernel regression between these two versions and you can/should write a kernel bug report.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
justwhy
n00b
n00b


Joined: 06 Sep 2024
Posts: 4

PostPosted: Sat Sep 07, 2024 1:02 am    Post subject: Reply with quote

6.10.8 is working, thank you. Are you using diff to identify the differences in the configs or what is the best method? I just copied the kernel config over accordingly which is great. I also enabled the iommu stuff but in order to prune the config should I use localmodconfig via the Gentoo host or via like Ubuntu LiveCD and then diff or do you think I got pretty much everything?

reference(s):
https://unix.stackexchange.com/questions/253245/what-does-make-localmodconfig-do
https://wiki.gentoo.org/wiki/User:Flexibeast/guides/A_minimal_Gentoo_kernel_for_your_hardware
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5093
Location: Bavaria

PostPosted: Sat Sep 07, 2024 1:48 am    Post subject: Reply with quote

justwhy wrote:
6.10.8 is working, thank you. [...]

Happy to hear that. You are very Welcome ! :D

justwhy wrote:
[...] Are you using diff to identify the differences in the configs or what is the best method? [...]

No ... I have been configuring my kernels myself for 20 years and have gained a bit of experience in the process. I have learnt a lot from the knowledge and feedback from other users (e.g. what an i2c touchpad needs). I also visit this site regularly and read about new patches:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
(just click on the respective branch; e.g. linux-6.10.y)

You have activated a lot of unnecessary modules in your kernel configuration. Possibly because you didn't know what you really needed. I guess compiling your kernel (make) takes 20 or 30 minutes (I compile my kernel in under a minute).

Once you have managed the effort of a manual kernel configuration (which is very large), you will hardly have any problems in the future, because you simply take over the configuration for new versions (make oldconfig).

I have tried to pass on some of the information in my wiki articles. Start here:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
justwhy
n00b
n00b


Joined: 06 Sep 2024
Posts: 4

PostPosted: Sat Sep 07, 2024 3:04 am    Post subject: Reply with quote

That's really cool, I wish to learn these skills too and recently just switched from arch to gentoo due to the idea of understanding more of what my system is.

Code:
#!/bin/bash

# Check if the script is run as root
if [ "$(id -u)" != "0" ]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi

# Set the kernel version
KERNEL_VERSION="6.10.8-gentoo-x86_64"

# Change to the Linux source directory
cd /usr/src/linux

make LSMOD=$HOME/.config/modprobed.db localmodconfig


# nvim .config

# Audio Patch
sed -i '/CONFIG_SND_HDA_INTEL=/c\CONFIG_SND_HDA_INTEL=m' /usr/src/linux/.config
sed -i '/CONFIG_SND_SOC_INTEL_SOUNDWIRE=/c\CONFIG_SND_SOC_INTEL_SOUNDWIRE=m' /usr/src/linux/.config
sed -i '/CONFIG_SND_SOC_SOF_ALDERLAKE=/c\CONFIG_SND_SOC_SOF_ALDERLAKE=m' /usr/src/linux/.config

# Compile the kernel
sudo make CC="ccache gcc" -j$(nproc) KCFLAGS="-O2"

# Install kernel modules
sudo make modules_install -j$(nproc)

# Install the kernel
sudo make install

# Rename the kernel image
cd /boot
sudo mv vmlinuz vmlinuz-$KERNEL_VERSION

# Generate the initramfs
sudo dracut --force --kver $KERNEL_VERSION /boot/initramfs-$KERNEL_VERSION.img

grub-mkconfig -o /boot/grub/grub.cfg || { echo "GRUB configuration update failed"; exit 1; }

# Clean up old kernels, keeping the 2 most recent
eclean-kernel -n 2 || { echo "Kernel cleanup failed"; exit 1; }



echo "Kernel compilation and installation complete."



so currently I got this working and it pretty much has a lot of it pruned but

~/.config/modprobed.db:
https://clbin.com/oaOZF

lsmod:
https://clbin.com/AX4G9


but when I run the localmodconfig those 3 lines I have where I am patching the kernel for the audio are impacted.

Any ideas?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3416
Location: Canada

PostPosted: Sat Sep 07, 2024 4:40 am    Post subject: Reply with quote

One starting point in configuring your kernel is to run lspci -v and see what hardware yiu have on point bus. Yiu want every hardware to have a kernel driver assigned. If you have it under overconfigured module, you may have every driver in. Record them, this what you need to enable in the kernel and disable the rest. If some have no driver, Google with pciid what driver should support them.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5093
Location: Bavaria

PostPosted: Sat Sep 07, 2024 8:48 am    Post subject: Reply with quote

justwhy wrote:
Code:

...
sed -i '/CONFIG_SND_SOC_INTEL_SOUNDWIRE=/c\CONFIG_SND_SOC_INTEL_SOUNDWIRE=m' /usr/src/linux/.config
...


Any ideas?

TBH I dont understand what you want to do with your commands, but I can tell you that CONFIG_SND_SOC_INTEL_SOUNDWIRE does not exist in the kernel. If you go into "make menuconfig" and then press / and then search for SND_SOC_INTEL_SOUNDWIRE the only result you will get is: CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH ...

Maybe read the last paragraph of this chapter:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Basics

BTW: I am not a fan of modprobed.db ... I did it manually with booting (twice) a GentooLiveCD / UbuntuLiveCD and then asked with "lsmod" for all modules, and compared both lists ... and then decided what I want / what I need ... and what I dont want (Intel MEI :evil: ).


(Note: I don't need an initramfs on my desktop either, because I have configured everything it needs in the kernel - on my notebook I only have a self-built initramfs because I do something very special there: ima_appraise=enforce.)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum