# [solved]touchpad won't work in gentoo; WILL work in sysrecd

## Gooberpatrol66

Lenovo V330 with a synaptics tcm3336 touchpad.

modules: 

```

nathan@gentoolaptop ~ $ zcat /proc/config.gz | grep SYNAP

CONFIG_MOUSE_PS2_SYNAPTICS=y

CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y

CONFIG_MOUSE_SYNAPTICS_I2C=m

CONFIG_MOUSE_SYNAPTICS_USB=m

nathan@gentoolaptop ~ $ zcat /proc/config.gz | grep ELAN

CONFIG_MOUSE_PS2_ELANTECH=y

CONFIG_MOUSE_PS2_ELANTECH_SMBUS=y

CONFIG_MOUSE_ELAN_I2C=m

CONFIG_MOUSE_ELAN_I2C_I2C=y

CONFIG_MOUSE_ELAN_I2C_SMBUS=y

CONFIG_HID_ELAN=m

CONFIG_USB_FTDI_ELAN=m

# CONFIG_NLS_MAC_ICELAND is not set
```

This is identical to the config used in sysrescuecd.

loaded:

```
nathan@gentoolaptop ~ $ lsmod | grep synap

nathan@gentoolaptop ~ $ lsmod | grep elan

nathan@gentoolaptop ~ $ lsmod | grep i2c

i2c_algo_bit           16384  1 amdgpu

i2c_piix4              24576  0

i2c_hid                20480  0

hid                   106496  3 i2c_hid,usbhid,hid_generic

i2c_core               53248  7 i2c_hid,drm_kms_helper,i2c_algo_bit,amdgpu,psmouse,i2c_piix4,drm

nathan@gentoolaptop ~ $ lsmod | grep rmi

nathan@gentoolaptop ~ $ lsmod | grep generic

snd_hda_codec_generic    69632  1

snd_hda_codec         106496  3 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel

snd_hda_core           61440  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec

snd                    61440  14 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm

sha512_generic         16384  0

sha1_generic           16384  0

hid_generic            16384  0

hid                   106496  3 i2c_hid,usbhid,hid_generic

```

modprobing  hid_rmi has no effect.

INPUT_DEVICES="libinput synaptics"

I have gone through the synaptics page on the wiki and set GRUB_CMDLINE_LINUX_DEFAULT="... i8042.noloop i8042.nomux i8042.nopnp i8042.reset ...". It makes a "generic ps/2 mouse" appear, which still isn't functional. The device appears as "Synaptics TCM3336" in less /proc/bus/input/devices on sysrescuecd.

Nothing relevant in gentoo dmesg.

Edit:

dmesg on sysrescuecd:

| grep hid

```
[    9.759070] hidraw: raw HID events driver (C) Jiri Kosina

[    9.764798] usbcore: registered new interface driver usbhid

[    9.764799] usbhid: USB HID core driver

[    9.766988] hid-generic 0003:093A:2510.0001: input,hidraw0: USB HID v1.11 Mouse [PIXART USB OPTICAL MOUSE] on usb-0000:03:00.3-4/input0

[   13.175717] i2c_hid i2c-SYNA2B3F:00: i2c-SYNA2B3F:00 supply vdd not found, using dummy regulator

[   13.175740] i2c_hid i2c-SYNA2B3F:00: Linked as a consumer to regulator.0

[   13.175741] i2c_hid i2c-SYNA2B3F:00: i2c-SYNA2B3F:00 supply vddl not found, using dummy regulator

[   13.187774] hid-generic 0018:06CB:8252.0002: input,hidraw1: I2C HID v1.00 Mouse [SYNA2B3F:00 06CB:8252] on i2c-SYNA2B3F:00

[   14.314711] hid-rmi 0018:06CB:8252.0002: input,hidraw1: I2C HID v1.00 Mouse [SYNA2B3F:00 06CB:8252] on i2c-SYNA2B3F:00
```

| grep i2c 

```
[   13.175717] i2c_hid i2c-SYNA2B3F:00: i2c-SYNA2B3F:00 supply vdd not found, using dummy regulator

[   13.175740] i2c_hid i2c-SYNA2B3F:00: Linked as a consumer to regulator.0

[   13.175741] i2c_hid i2c-SYNA2B3F:00: i2c-SYNA2B3F:00 supply vddl not found, using dummy regulator

[   13.187707] input: SYNA2B3F:00 06CB:8252 Mouse as /devices/platform/AMDI0010:01/i2c-0/i2c-SYNA2B3F:00/0018:06CB:8252.0002/input/input6

[   13.187774] hid-generic 0018:06CB:8252.0002: input,hidraw1: I2C HID v1.00 Mouse [SYNA2B3F:00 06CB:8252] on i2c-SYNA2B3F:00

[   14.314552] input: Synaptics TM3336-002 as /devices/platform/AMDI0010:01/i2c-0/i2c-SYNA2B3F:00/0018:06CB:8252.0002/input/input14

[   14.314711] hid-rmi 0018:06CB:8252.0002: input,hidraw1: I2C HID v1.00 Mouse [SYNA2B3F:00 06CB:8252] on i2c-SYNA2B3F:00
```

(i also have an optical mouse plugged in)

sysrescuecd kernel version is 4.19.24-1-lts

gentoo kernel version is 4.19.27-gentoo-r1Last edited by Gooberpatrol66 on Tue Jun 04, 2019 1:24 am; edited 2 times in total

----------

## The Doctor

I'll roll the dice taking this off the unanswered list.

My first thought is linux-firmware, but probably not.

Then the item that it actually most probable. You probably want INPUT_DEVICES="evdev libinput synaptics" unless you are running wayland. All three should coexist and play nice for xorg. I believe it will default to evdev which has been working out of the box for years. In fact, I don't remember doing any special config to get a touch pad working. Ever.

Or you can play with configuration for libinput. However, as libinput is the new kid on the block and everything in kernel land appears identical I would be suspicious that it isn't playing nicely with everyone else.

----------

## Gooberpatrol66

 *The Doctor wrote:*   

> I'll roll the dice taking this off the unanswered list.
> 
> My first thought is linux-firmware, but probably not.
> 
> Then the item that it actually most probable. You probably want INPUT_DEVICES="evdev libinput synaptics" unless you are running wayland. All three should coexist and play nice for xorg. I believe it will default to evdev which has been working out of the box for years. In fact, I don't remember doing any special config to get a touch pad working. Ever.
> ...

 

Linux-firmware is installed.

Adding evdev didn't work. I suspect it's a kernel issue, as the same touchpad is named different things in /proc depending on the system.

----------

## Gooberpatrol66

In sysrescuecd:

```
I: Bus=0018 Vendor=06cb Product=8252 Version=0100

N: Name="Synaptics TM3336-002"

P: Phys=i2c-SYNA2B3F:00

S: Sysfs=/devices/platform/AMDI0010:01/i2c-0/i2c-SYNA2B3F:00/0018:06CB:8252.0002/input/input14

U: Uniq=

H: Handlers=event6 mouse1 

B: PROP=5

B: EV=b

B: KEY=e520 10000 0 0 0 0

B: ABS=6f3800001000003
```

```
Device:           Synaptics TM3336-002

Kernel:           /dev/input/event6

Group:            9

Seat:             seat0, default

Size:             102x67mm

Capabilities:     pointer gesture

Tap-to-click:     disabled

Tap-and-drag:     enabled

Tap drag lock:    disabled

Left-handed:      disabled

Nat.scrolling:    disabled

Middle emulation: disabled

Calibration:      n/a

Scroll methods:   *two-finger edge 

Click methods:    *button-areas clickfinger 

Disable-w-typing: enabled

Accel profiles:   none

Rotation:         n/a
```

In gentoo: 

```
I: Bus=0011 Vendor=0002 Product=0001 Version=0000

N: Name="PS/2 Generic Mouse"

P: Phys=isa0060/serio1/input0

S: Sysfs=/devices/platform/i8042/serio1/input/input11

U: Uniq=

H: Handlers=mouse1 event10 

B: PROP=1

B: EV=7

B: KEY=70000 0 0 0 0

B: REL=3
```

```
Device:           PS/2 Generic Mouse

Kernel:           /dev/input/event10

Group:            9

Seat:             seat0, default

Capabilities:     pointer 

Tap-to-click:     n/a

Tap-and-drag:     n/a

Tap drag lock:    n/a

Left-handed:      disabled

Nat.scrolling:    disabled

Middle emulation: disabled

Calibration:      n/a

Scroll methods:   *button

Click methods:    none

Disable-w-typing: n/a

Accel profiles:   flat *adaptive

Rotation:         n/a
```

----------

## Jaglover

You need I2C enabled in your kernel. Do lsmod in SysRescue, this will give you clues what to enable.

----------

## Gooberpatrol66

sysrescuecd:

```
2c_algo_bit           16384  1 amdgpu

i2c_piix4              24576  0

i2c_hid                24576  0

hid                   139264  4 i2c_hid,usbhid,hid_generic,hid_rmi
```

gentoo:

```
i2c_algo_bit           16384  1 amdgpu

i2c_piix4              24576  0

i2c_hid                20480  0

hid                   106496  4 i2c_hid,usbhid,hid_generic

i2c_core               53248  8 videodev,i2c_hid,drm_kms_helper,i2c_algo_bit,amdgpu,psmouse,i2c_piix4,drm
```

Modprobing hid_rmi has no effect.

----------

## charles17

 *Gooberpatrol66 wrote:*   

> Lenovo V330 with a synaptics tcm3336 touchpad.

 

Did you follow the libinput article?   *Quote:*   

> If multiple input drivers are ...

 

Do you have CONFIG_INPUT_EVDEV in your kernel?

What's your output of xinput, libinput-list-devices, lsinput?

----------

## Gooberpatrol66

 *charles17 wrote:*   

>  *Gooberpatrol66 wrote:*   Lenovo V330 with a synaptics tcm3336 touchpad. 
> 
> Did you follow the libinput article?   *Quote:*   If multiple input drivers are ... 
> 
> Do you have CONFIG_INPUT_EVDEV in your kernel?
> ...

 

Yes. LIbinput was actually working earlier on another laptop. I switched the hard drive.

```
root@gentoolaptop /home/nathan # zcat /proc/config.gz | grep EVDEV

CONFIG_INPUT_EVDEV=m

root@gentoolaptop /home/nathan # xinput

⎡ Virtual core pointer                          id=2    [master pointer  (3)]

⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]

⎜   ↳ PIXART USB OPTICAL MOUSE                  id=9    [slave  pointer  (2)]

⎣ Virtual core keyboard                         id=3    [master keyboard (2)]

    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]

    ↳ Power Button                              id=6    [slave  keyboard (3)]

    ↳ Video Bus                                 id=7    [slave  keyboard (3)]

    ↳ Power Button                              id=8    [slave  keyboard (3)]

    ↳ Ideapad extra buttons                     id=10   [slave  keyboard (3)]

    ↳ AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]

root@gentoolaptop /home/nathan # libinput list-devices

Device:           Power Button

Kernel:           /dev/input/event3

Group:            1

Seat:             seat0, default

Capabilities:     keyboard 

Tap-to-click:     n/a

Tap-and-drag:     n/a

Tap drag lock:    n/a

Left-handed:      n/a

Nat.scrolling:    n/a

Middle emulation: n/a

Calibration:      n/a

Scroll methods:   none

Click methods:    none

Disable-w-typing: n/a

Accel profiles:   n/a

Rotation:         n/a

Device:           Video Bus

Kernel:           /dev/input/event4

Group:            2

Seat:             seat0, default

Capabilities:     keyboard 

Tap-to-click:     n/a

Tap-and-drag:     n/a

Tap drag lock:    n/a

Left-handed:      n/a

Nat.scrolling:    n/a

Middle emulation: n/a

Calibration:      n/a

Scroll methods:   none

Click methods:    none

Disable-w-typing: n/a

Accel profiles:   n/a

Rotation:         n/a

Device:           Power Button

Kernel:           /dev/input/event2

Group:            3

Seat:             seat0, default

Capabilities:     keyboard 

Tap-to-click:     n/a

Tap-and-drag:     n/a

Tap drag lock:    n/a

Left-handed:      n/a

Nat.scrolling:    n/a

Middle emulation: n/a

Calibration:      n/a

Scroll methods:   none

Click methods:    none

Disable-w-typing: n/a

Accel profiles:   n/a

Rotation:         n/a

Device:           Lid Switch

Kernel:           /dev/input/event1

Group:            4

Seat:             seat0, default

Capabilities:     switch

Tap-to-click:     n/a

Tap-and-drag:     n/a

Tap drag lock:    n/a

Left-handed:      n/a

Nat.scrolling:    n/a

Middle emulation: n/a

Calibration:      n/a

Scroll methods:   none

Click methods:    none

Disable-w-typing: n/a

Accel profiles:   n/a

Rotation:         n/a

Device:           HD-Audio Generic HDMI/DP,pcm=3

Kernel:           /dev/input/event6

Group:            5

Seat:             seat0, default

Capabilities:     

Tap-to-click:     n/a

Tap-and-drag:     n/a

Tap drag lock:    n/a

Left-handed:      n/a

Nat.scrolling:    n/a

Middle emulation: n/a

Calibration:      n/a

Scroll methods:   none

Click methods:    none

Disable-w-typing: n/a

Accel profiles:   n/a

Rotation:         n/a

Device:           PIXART USB OPTICAL MOUSE

Kernel:           /dev/input/event0

Group:            6

Seat:             seat0, default

Capabilities:     pointer 

Tap-to-click:     n/a

Tap-and-drag:     n/a

Tap drag lock:    n/a

Left-handed:      disabled

Nat.scrolling:    disabled

Middle emulation: disabled

Calibration:      n/a

Scroll methods:   button

Click methods:    none

Disable-w-typing: n/a

Accel profiles:   flat *adaptive

Rotation:         n/a

Device:           HD-Audio Generic Mic

Kernel:           /dev/input/event7

Group:            5

Seat:             seat0, default

Capabilities:     

Tap-to-click:     n/a

Tap-and-drag:     n/a

Tap drag lock:    n/a

Left-handed:      n/a

Nat.scrolling:    n/a

Middle emulation: n/a

Calibration:      n/a

Scroll methods:   none

Click methods:    none

Disable-w-typing: n/a

Accel profiles:   n/a

Rotation:         n/a

Device:           HD-Audio Generic Headphone

Kernel:           /dev/input/event8

Group:            5

Seat:             seat0, default

Capabilities:     

Tap-to-click:     n/a

Tap-and-drag:     n/a

Tap drag lock:    n/a

Left-handed:      n/a

Nat.scrolling:    n/a

Middle emulation: n/a

Calibration:      n/a

Scroll methods:   none

Click methods:    none

Disable-w-typing: n/a

Accel profiles:   n/a

Rotation:         n/a

Device:           Ideapad extra buttons

Kernel:           /dev/input/event5

Group:            7

Seat:             seat0, default

Capabilities:     keyboard 

Tap-to-click:     n/a

Tap-and-drag:     n/a

Tap drag lock:    n/a

Left-handed:      n/a

Nat.scrolling:    n/a

Middle emulation: n/a

Calibration:      n/a

Scroll methods:   none

Click methods:    none

Disable-w-typing: n/a

Accel profiles:   n/a

Rotation:         n/a

Device:           AT Translated Set 2 keyboard

Kernel:           /dev/input/event9

Group:            8

Seat:             seat0, default

Capabilities:     keyboard 

Tap-to-click:     n/a

Tap-and-drag:     n/a

Tap drag lock:    n/a

Left-handed:      n/a

Nat.scrolling:    n/a

Middle emulation: n/a

Calibration:      n/a

Scroll methods:   none

Click methods:    none

Disable-w-typing: n/a

Accel profiles:   n/a

Rotation:         n/a

root@gentoolaptop /home/nathan # lsinput

bash: lsinput: command not found

```

----------

## Gooberpatrol66

I disabled the i8042.noloop i8042.nomux i8042.nopnp i8042.reset boot options as they are disabled in sysrescuecd without apparent consequence.

----------

## Ant P.

Enable:

```
Symbol: X86_AMD_PLATFORM_DEVICE [=n]

Type  : bool

Prompt: AMD ACPI2Platform devices support

  Location:

    -> Processor type and features

  Defined at arch/x86/Kconfig:630

  Depends on: ACPI [=y]
```

----------

## Gooberpatrol66

 *Ant P. wrote:*   

> Enable:
> 
> ```
> Symbol: X86_AMD_PLATFORM_DEVICE [=n]
> 
> ...

 

Didn't work.

----------

## duane

Have you tried booting from a copy of the rescue kernel? Just to be sure whether the kernel or something else is at fault.

----------

## Jaglover

Maybe there is something else, you sure you actually boot the kernel you just built? Did you verify with 'uname -v' the build time of running kernel is correct?

----------

## Gooberpatrol66

 *duane wrote:*   

> Have you tried booting from a copy of the rescue kernel? Just to be sure whether the kernel or something else is at fault.

 

You mean recovery mode?

----------

## Gooberpatrol66

 *Jaglover wrote:*   

> Maybe there is something else, you sure you actually boot the kernel you just built? Did you verify with 'uname -v' the build time of running kernel is correct?

 

I verified the option had been enabled with zcat /proc/config.gz.

----------

## duane

 *Gooberpatrol66 wrote:*   

>  *duane wrote:*   Have you tried booting from a copy of the rescue kernel? Just to be sure whether the kernel or something else is at fault. 
> 
> You mean recovery mode?

 

No, I mean copy the kernel and modules from sysrescuecd and boot from them. If everything works, you can be sure it's just a kernel issue.

----------

## Gooberpatrol66

 *duane wrote:*   

>  *Gooberpatrol66 wrote:*    *duane wrote:*   Have you tried booting from a copy of the rescue kernel? Just to be sure whether the kernel or something else is at fault. 
> 
> You mean recovery mode? 
> 
> No, I mean copy the kernel and modules from sysrescuecd and boot from them. If everything works, you can be sure it's just a kernel issue.

 

Are there instructions for doing that kind of thing?

----------

## duane

 *Gooberpatrol66 wrote:*   

>  *duane wrote:*   No, I mean copy the kernel and modules from sysrescuecd and boot from them. If everything works, you can be sure it's just a kernel issue. 
> 
> Are there instructions for doing that kind of thing?

 

Well, I have a copy of sysrescuecd 5.2.2 (iso) on my system. I mount it to /mnt/cd (you could do the same with the actual cd), and take a look at the /mnt/cd/boot/grub/grub-522.cfg. I see that it boots a 64-bit kernel at /mnt/cd/isolinux/rescue64. That's the kernel I'd want to copy into /boot on my system, and I'd name it "vmlinuz-rescuecd" so grub notices it. Then I'd run "grub-mkconfig -o /boot/grub/grub.cfg" to get grub to see it on next boot.

Before I reboot, I "mount /mnt/cd/sysrcd.dat /mnt/sq" to look at the squash file system, where most of the data is, though you could just as easily boot from the cd and copy the files to your hard drive from there. The modules for the 64-bit kernel are in /mnt/sq/lib64/modules/4.14.32-std522-amd64/kernel/. Copy the 4.14.32-std522-amd64 directory to your /lib64/modules/ directory on your hard drive and you'll be able to load modules as well.

If you boot into that kernel, and it and its modules can see the trackpad, then you know that the only thing you need to fix is your kernel/modules. If it's still broken, you know you have at least one configuration error other than the kernel (and the kernel still may be an issue, so leave the copy there until you're sure).

Obviously some of this will be different if you're not using grub or have a newer sysrescuecd.

Just for fun, I'm going to do it myself, to see if I've missed any important points.

Edit: It worked on my system, though that version of rescue didn't support my wifi.

----------

## John R. Graham

This may be related to the touchpad being on an I2C interface. There are specific drivers that bridge I2C HID devices into the kernel's HID infrastructure. Go back to the SystemRescueCD and see what this reveals that you have not accounted for in your Gentoo install:

```
lsmod | grep hid
```

- John

----------

## Jaglover

You may need GPIO and PINCTRL support enabled for I2C to work. There are many, I know. You could build all of them as modules and then check which one is needed. Does lsmod in SysRescue reveal anything?

----------

## Gooberpatrol66

 *duane wrote:*   

>  *Gooberpatrol66 wrote:*    *duane wrote:*   No, I mean copy the kernel and modules from sysrescuecd and boot from them. If everything works, you can be sure it's just a kernel issue. 
> 
> Are there instructions for doing that kind of thing? 
> 
> Well, I have a copy of sysrescuecd 5.2.2 (iso) on my system. I mount it to /mnt/cd (you could do the same with the actual cd), and take a look at the /mnt/cd/boot/grub/grub-522.cfg. I see that it boots a 64-bit kernel at /mnt/cd/isolinux/rescue64. That's the kernel I'd want to copy into /boot on my system, and I'd name it "vmlinuz-rescuecd" so grub notices it. Then I'd run "grub-mkconfig -o /boot/grub/grub.cfg" to get grub to see it on next boot.
> ...

 

booting the sysrescue kernel with gentoo causes a kernel panic.

----------

## Gooberpatrol66

 *John R. Graham wrote:*   

> This may be related to the touchpad being on an I2C interface. There are specific drivers that bridge I2C HID devices into the kernel's HID infrastructure. Go back to the SystemRescueCD and see what this reveals that you have not accounted for in your Gentoo install:
> 
> ```
> lsmod | grep hid
> ```
> ...

 

The modules are the same except for hid_rmi and modprobing that does nothing.

----------

## duane

 *Gooberpatrol66 wrote:*   

> booting the sysrescue kernel with gentoo causes a kernel panic.

 

Well, now that I look at the latest systemrescuecd, I realize that they've "improved" it to the point where it won't boot without the ramdisk. I doubt it would be worth trying to get that to work the way the older one did, just for a bit of trouble-shooting.

Sorry about that.

You might consider trying genkernel, though that's just a work-around.

----------

## Gooberpatrol66

Solved https://github.com/Syniurge/i2c-amd-mp2/issues/11

----------

