LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Closed Thread
  Search this Thread
Old 01-31-2023, 10:46 PM   #1
a_lameira
LQ Newbie
 
Registered: Jan 2023
Posts: 6

Rep: Reputation: 0
Touchpad not detected on Lenovo 300w gen 3 (82J1)


Recently I bought a Lenovo laptop 300w gen 3 (82J1). This computer comes with Windows pre-installed. When testing the computer with a live usb, I soon noticed that the touchpad was not working. I tested several distros, and in none the touchpad worked. I then installed Debian Sid, preserving the original Windows installation.

My first suspicion was that with a BIOS update the problem would be solved. I installed the latest version (GACN43WW) and disabled Secure Boot, Fast Boot, etc. None of it worked.

As you can see, lspci and lsusb do not list the touchpad (ELAN0642):

Code:
lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] (rev e9)
02:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller
02:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
02:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven2 USB 3.1
02:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor
02:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller
02:00.7 Non-VGA unclassified device: Advanced Micro Devices, Inc. [AMD] Sensor Fusion Hub
Code:
lsusb
Bus 002 Device 003: ID 0bda:0316 Realtek Semiconductor Corp. Card Reader
Bus 002 Device 002: ID 0bc2:2322 Seagate RSS LLC SRD0NF1 Expansion Portable (STEA)
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 30c9:0028 Luxvisions Innotech Limited Integrated Camera
Bus 001 Device 003: ID 0bda:c123 Realtek Semiconductor Corp. Bluetooth Radio
Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I tried adding parameters to the kernel boot that in many cases worked for similar laptops (Lenovo Ideapad). I tried several (pci=nocrs, i8042.nopnp=1, i8042.nomux=1, i8042.reset), but nothing worked.

During boot, before systemd starts, an acpi interface error message appears on the screen. Using journalctl, the following appears:

Code:
Jan 27 14:24:08 kernel: ACPI BIOS Error (bug): Failure creating named object [\CDAT], AE_ALREADY_EXISTS (20220331/dsfield-637)
Jan 27 14:24:08 kernel: ACPI Warning: NsLookup: Type mismatch on CDAT (Integer), searching for (RegionField) (20220331/nsaccess-696)
Jan 27 14:24:08 kernel: ACPI: 9 ACPI AML tables successfully acquired and loaded
Jan 27 14:24:08 kernel: ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
I don't know if this error is related to the problem with the touchpad, but it seems to me that it is.

The kernel module responsible for the touchpad should be elan_i2c. Using modinfo elan_i2c, the following appears:

Code:
sudo modinfo elan_i2c
filename:       /lib/modules/6.1.0-2-amd64/kernel/drivers/input/mouse/elan_i2c.ko
license:        GPL
description:    Elan I2C/SMBus Touchpad driver
author:         Duson Lin <dusonlin@emc.com.tw>
alias:          i2c:elan_i2c
alias:          acpi*:ELAN1000:*
alias:          acpi*:ELAN0637:*
alias:          acpi*:ELAN0636:*
alias:          acpi*:ELAN0635:*
alias:          acpi*:ELAN0634:*
alias:          acpi*:ELAN0633:*
alias:          acpi*:ELAN0632:*
alias:          acpi*:ELAN0631:*
alias:          acpi*:ELAN062F:*
alias:          acpi*:ELAN062E:*
alias:          acpi*:ELAN062D:*
alias:          acpi*:ELAN062C:*
alias:          acpi*:ELAN062B:*
alias:          acpi*:ELAN062A:*
alias:          acpi*:ELAN0629:*
alias:          acpi*:ELAN0628:*
alias:          acpi*:ELAN0627:*
alias:          acpi*:ELAN0626:*
alias:          acpi*:ELAN0625:*
alias:          acpi*:ELAN0624:*
alias:          acpi*:ELAN0623:*
alias:          acpi*:ELAN0622:*
alias:          acpi*:ELAN0621:*
alias:          acpi*:ELAN0620:*
alias:          acpi*:ELAN061F:*
alias:          acpi*:ELAN061E:*
alias:          acpi*:ELAN061D:*
alias:          acpi*:ELAN061C:*
alias:          acpi*:ELAN061A:*
alias:          acpi*:ELAN0619:*
alias:          acpi*:ELAN0618:*
alias:          acpi*:ELAN0617:*
alias:          acpi*:ELAN0616:*
alias:          acpi*:ELAN0615:*
alias:          acpi*:ELAN0612:*
alias:          acpi*:ELAN0611:*
alias:          acpi*:ELAN0610:*
alias:          acpi*:ELAN060F:*
alias:          acpi*:ELAN060C:*
alias:          acpi*:ELAN060B:*
alias:          acpi*:ELAN0609:*
alias:          acpi*:ELAN0608:*
alias:          acpi*:ELAN0607:*
alias:          acpi*:ELAN0606:*
alias:          acpi*:ELAN0605:*
alias:          acpi*:ELAN0604:*
alias:          acpi*:ELAN0603:*
alias:          acpi*:ELAN0602:*
alias:          acpi*:ELAN0601:*
alias:          acpi*:ELAN0600:*
alias:          acpi*:ELAN0100:*
alias:          acpi*:ELAN0000:*
depends:        
retpoline:      Y
intree:         Y
name:           elan_i2c
vermagic:       6.1.0-2-amd64 SMP preempt mod_unload modversions 
sig_id:         PKCS#7
signer:         Debian Secure Boot CA
I noticed that the touchpad hid is not listed in the module. I then downloaded kernel 6.1.8, edited /linux-6.1.8/include/linux/input/elan-i2c-ids.h, which lists the devices, inserting hid ELAN0642, and compiled.

The touchpad didn't work, but the acpi error message changed to ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-95).

Building on what has been done here and here, I've disassembled the acpi table to look for mentions of the touchpad. I found the following entry:

Code:
Name (CDAT, 0x00)
    Scope (_SB.I2CD)
    {
        Device (TPD0)
        {
            Name (_HID, "ELAN0642")  // _HID: Hardware ID
            Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */)  // _CID: Compatible ID
            ICMS = 0x0A
            DCMS = 0x01
            ICMS = 0x20
            CDAT = DCMS /* \DCMS */
            If ((CDAT == 0x02))
            {
                _HID = "SYNA2392"
            }

            If ((CDAT == 0x01))
            {
                _HID = "ELAN0642"
            }

            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If ((CDAT == 0x00))
                {
                    Return (0x00)
                }
                Else
                {
                    Return (0x0F)
                }
            }

            Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
            {
                If ((Arg0 == ToUUID ("3cdff6f7-4267-4555-ad05-b30a3d8938de") /* HID I2C Device */))
                {
                    Switch (ToInteger (Arg2))
                    {
                        Case (0x00)
                        {
                            Switch (ToInteger (Arg1))
                            {
                                Case (0x01)
                                {
                                    Return (Buffer (0x01)
                                    {
                                         0x03                                             // .
                                    })
                                }
                                Default
                                {
                                    Return (Buffer (0x01)
                                    {
                                         0x00                                             // .
                                    })
                                }

                            }
                        }
                        Case (0x01)
                        {
                            If ((^^^PCI0.LPC0.H_EC.ECRD (RefOf (^^^PCI0.LPC0.H_EC.TPTY)) == 0x01))
                            {
                                Return (0x01)
                            }

                            If ((^^^PCI0.LPC0.H_EC.ECRD (RefOf (^^^PCI0.LPC0.H_EC.TPTY)) == 0x02))
                            {
                                Return (0x20)
                            }
                        }
                        Default
                        {
                            Return (0x00)
                        }

                    }
                }
                Else
                {
                    Return (Buffer (0x01)
                    {
                         0x00                                             // .
                    })
                }
            }

            Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
            {
                Name (SBFG, ResourceTemplate ()
                {
                    GpioInt (Level, ActiveLow, ExclusiveAndWake, PullUp, 0x0000,
                        "\\_SB.GPIO", 0x00, ResourceConsumer, ,
                        )
                        {   // Pin list
                            0x0009
                        }
                })
                If ((^^^PCI0.LPC0.H_EC.ECRD (RefOf (^^^PCI0.LPC0.H_EC.TPTY)) == 0x01))
                {
                    Name (SBFB, ResourceTemplate ()
                    {
                        I2cSerialBusV2 (0x0015, ControllerInitiated, 0x00061A80,
                            AddressingMode7Bit, "\\_SB.I2CD",
                            0x00, ResourceConsumer, , Exclusive,
                            )
                    })
                    Return (ConcatenateResTemplate (SBFB, SBFG))
                }

                If ((^^^PCI0.LPC0.H_EC.ECRD (RefOf (^^^PCI0.LPC0.H_EC.TPTY)) == 0x02))
                {
                    Name (SBFC, ResourceTemplate ()
                    {
                        I2cSerialBusV2 (0x002C, ControllerInitiated, 0x00061A80,
                            AddressingMode7Bit, "\\_SB.I2CD",
                            0x00, ResourceConsumer, , Exclusive,
                            )
                    })
                    Return (ConcatenateResTemplate (SBFC, SBFG))
                }
            }
        }
    }
At this point, I'm not sure what to do anymore. I saw that some people have written dkms packages to enable elan touchpads as can be seen here.

Any ideas?
 
Old 02-03-2023, 08:19 AM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,605

Rep: Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Touchpad not detected on Lenovo 300w gen 3 (82J1) a_lameira Linux - Hardware 8 05-07-2024 01:58 PM
[SOLVED] Lenovo X1carbon 8th gen doesn't recognize touchpad on debian 9 lagah Linux - Laptop and Netbook 5 12-02-2020 11:38 PM
LXer: Purism Launches 2nd Gen Librem Mini Linux PC with a 10th Gen Intel Core CPU LXer Syndicated Linux News 0 11-05-2020 11:03 PM
3rd gen CPU in a 2nd Gen Laptop Motherboard benifits are? BW-userx Linux - Hardware 4 05-18-2016 01:56 PM
PSU - New video card really need 300W? lrt2003 Linux - Newbie 10 11-07-2004 01:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration