LinuxQuestions.org
Help answer threads with 0 replies.
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


Reply
  Search this Thread
Old 01-31-2023, 04:59 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), which I think is a bug with the Display Port USB-C

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?

Last edited by a_lameira; 02-01-2023 at 10:05 AM.
 
Old 02-02-2023, 04:45 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,052

Rep: Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632
Using Windows to discover the devices may need to be looked at. This is where I'd start. Find a working install then discover how it works.

I get the feeling that the device is on a daughter board. Also in this deal is you mentioned uefi. That brings me to question the usb drive type like uhci or ohci or xhci. Then it makes me question if the way you are booting allows this device in the uefi mode or legacy mode.

Unless the bios errata exactly says it fixes this issue then I'd tend to avoid it. I might be temped to update if I wasn't worried about bricking the thing.

The acpi could be an issue if it is blocking resources you need but in this case I currently doubt it.
"
Compute Express Link (CXL) and other industry standard coherent interconnects enable coherent
switches, coherent memory devices or coherent accelerator devices to be attached to one or more
processors." Then we are back to uefi

https://uefi.org/sites/default/files...Table_1.01.pdf
 
Old 02-02-2023, 05:54 PM   #3
a_lameira
LQ Newbie
 
Registered: Jan 2023
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the reply! On Windows the touchpad is connected to the AMD I2C interface. I got some information from the Device Manager:

Code:
Device description

	ELAN pointing device

Device instance path

	HID\ELAN0642&COL01\4&2E996A7F&0&0000

Hardware Ids

	HID\VEN_ELAN&DEV_0642&Col01
	HID\ELAN0642&Col01
	HID\*ELAN0642&Col01
	HID\VID_04F3&UP:0001_U:0002
	HID_DEVICE_SYSTEM_MOUSE
	HID_DEVICE_UP:0001_U:0002
	HID_DEVICE

Capabilities

	000000A0
	CM_DEVCAP_SILENTINSTALL
	CM_DEVCAP_SURPRISEREMOVALOK

Status

	0180200A
	DN_DRIVER_LOADED
	DN_STARTED
	DN_DISABLEABLE
	DN_NT_ENUMERATOR
	DN_NT_DRIVER

Problem code

	00000000

Config flags

	00000000

Class

	Mouse

Class guid

	{4d36e96f-e325-11ce-bfc1-08002be10318}

Inf name

	oem41.inf

Driver date

	9/23/2020

Driver version

	27.4.10.3

Provider

	ELAN

Inf section

	ETD_HID_PTP_WIN10_Group1_Inst

Included infs

	msmouse.inf

Matching device Id

	HID\VEN_ELAN&DEV_0642&Col01

Rank of driver

	00F90000

Service

	mouhid

Upper filters

	ETD

Address

	00000001

Base container Id

	{00000000-0000-0000-ffff-ffffffffffff}

Bus number

	00000001

Bus type Guid

	{eeaf37d0-1963-47c4-aa48-72476db7cf49}

Configuration Id

	oem41.inf:HID\VEN_ELAN&DEV_0642&Col01,ETD_HID_PTP_WIN10_Group1_Inst

Container Id

	{00000000-0000-0000-ffff-ffffffffffff}

Device stack

	\Driver\mouclass
	\Driver\ETD
	\Driver\mouhid
	\Driver\mshidkmdf

Display name

	ELAN pointing device

Driver description

	ELAN pointing device

Driver key

	{4d36e96f-e325-11ce-bfc1-08002be10318}\0000

Driver node strong name

	oem41.inf:4777d1a3604f6974:ETD_HID_PTP_WIN10_Group1_Inst:27.4.10.3:HID\VEN_ELAN&DEV_0642&Col01

Enumerator

	HID

First install date

	12/25/2021 3:22:44 AM

Has problem

	<false>

In root container

	<true>

Install date

	12/25/2021 3:27:32 AM

Install state

	00000000

Is connected

	<true>

Is present

	<true>

Is reboot required

	<false>

Last arrival date

	1/29/2023 8:05:13 PM

Last known parent

	ACPI\ELAN0642\3&31ff937c&1

Legacy bus type

	0000000F

Manufacturer

	ELAN

Parent

	ACPI\ELAN0642\3&31ff937c&1

Physical device object name

	\Device\0000004f

Power data

	Current power state:
	D0

	Power capabilities:
	00000009
	PDCAP_D0_SUPPORTED
	PDCAP_D3_SUPPORTED

	Power state mappings:
	S0 -> D0
	S1 -> Unspecified
	S2 -> Unspecified
	S3 -> D3
	S4 -> D3
	S5 -> D3

Removal policy

	00000001

Removal policy default

	00000001

Reported device Ids hash

	1AD58B6D

Rollback driver node strong name

	msmouse.inf:c67c9e42728cee7a:HID_Mouse_Inst.NT:10.0.19041.1:HID_DEVICE_SYSTEM_MOUSE

Safe removal required

	<false>

Siblings

	HID\ELAN0642&Col02\4&2e996a7f&0&0001
	HID\ELAN0642&Col03\4&2e996a7f&0&0002
	HID\ELAN0642&Col04\4&2e996a7f&0&0003

Class default service

	i8042prt

Class description

	Mouse

Class icon path

	%SystemRoot%\System32\setupapi.dll,-2

Class name

	Mice and other pointing devices

Class upper filters

	mouclass

Display name

	Mice and other pointing devices


No install class

	<true>
I got some info from the Windows driver too:

Code:
;============================================================================ 
; Installation file (.inf) for Windows 10.
;
; All Rights Reserved, Copyright(C) ELAN Microelectronics Corp. 2003-2020
;============================================================================

[Version]
Signature="$Windows NT$"
Provider=%VenderName%
ClassGUID={4D36E96F-E325-11CE-BFC1-08002BE10318}
Class=Mouse
CatalogFile=ETD.cat
DriverVer=09/23/2020, 27.4.10.3

[SourceDisksNames]
1=%DiskName%,,

[SourceDisksFiles]
ETD.sys = 1
ETDCtrl.exe = 1
ETDApix.dll = 1
ETDCmds.dll = 1
ETDService.exe = 1
ETDUn_inst.exe = 1

;----------------------------------------------------------------------------
; Manufacturer Sections
;----------------------------------------------------------------------------

[Manufacturer]
%VenderName%   = ELAN.Mfg, NTamd64, NTamd64.10.0 

[ELAN.Mfg.NTamd64]

[ELAN.Mfg.NTamd64.10.0]
%ELANHIDDeviceDesc%		= ETD_HID_PTP_WIN10_Group2_Inst, HID\VEN_ELAN&DEV_0660&Col01		; ClickPad for Capela 14e Windows
%ELANHIDDeviceDesc%		= ETD_HID_PTP_WIN10_Group1_Inst, HID\VEN_ELAN&DEV_0661&Col01		; ClickPad for Windows 100e/300e
%ELANHIDDeviceDesc%		= ETD_HID_PTP_WIN10_Group3_Inst, HID\VEN_ELAN&DEV_066C&Col01		; ClickPad for 100e/300e AMD Pollock
%ELANHIDDeviceDesc%		= ETD_HID_PTP_WIN10_Group1_Inst, HID\VEN_ELAN&DEV_066E&Col01		; ClickPad for 100W&300W Gen3 AMD Pollock
%ELANHIDDeviceDesc%		= ETD_HID_PTP_WIN10_Group1_Inst, HID\VEN_ELAN&DEV_066F&Col01		; ClickPad for 300W Gen3 Intel JasperLake
%ELANHIDDeviceDesc%		= ETD_HID_PTP_WIN10_Group1_Inst, HID\VEN_ELAN&DEV_0641&Col01		; ClickPad for 14W
%ELANHIDDeviceDesc%		= ETD_HID_PTP_WIN10_Group1_Inst, HID\VEN_ELAN&DEV_0642&Col01		; ClickPad for 100W/300W AMD Pollock

;----------------------------------------------------------------------------
; Install Sections
;----------------------------------------------------------------------------
[DestinationDirs]
DefaultDestDir 		= 12			; Driver directory
ETDSys.CopyFiles 	= 12			; Driver directory
ETDApp.CopyFiles 	= 11			; System directory

[ETD_Service_Inst]
DisplayName    = %PS2DeviceDesc%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 0                  ; SERVICE_ERROR_IGNORE
ServiceBinary  = %12%\ETD.sys
LoadOrderGroup = Pointer Port

[ETD_APP_Service_Inst]
DisplayName    = "ELAN Service"
ServiceType    = 0x00000010         ; SERVICE_WIN32_OWN_PROCESS
StartType      = 0x00000002         ; SERVICE_AUTO_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %11%\ETDService.exe
;LoadOrderGroup = ""								; System determines automatically

;----------------------------------------------------------------------------
; Common File Copy and Registry Operations
;----------------------------------------------------------------------------

[ETDSys.CopyFiles]
ETD.sys,,,0x00000001

[ETDApp.CopyFiles]
ETDCtrl.exe,,,0x00004000
ETDApix.dll,,,0x00004000
ETDCmds.dll,,,0x00004000
ETDService.exe,,,0x00000001
ETDUn_inst.exe,,,0x00004000

;----------------------------------------------------------------------------
[ETD_HID_PTP_WIN10_Inst]
FeatureScore=F9
Include = msmouse.inf
Needs = HID_Mouse_Inst.NT
CopyFiles=ETDSys.CopyFiles, ETDApp.CopyFiles
AddReg=ETD_HID_System_Win10.AddReg, ETD_HID_HKR_OtherSetting.AddReg
CopyINF=ETDHCF.inf
Reboot

[ETD_HID_PTP_WIN10_Inst.Services]
Include = msmouse.inf
Needs = HID_Mouse_Inst.NT.Services
AddService = ETD,0x00000000, ETD_Service_Inst
AddService = ETDService,0x00000800, ETD_APP_Service_Inst

[ETD_HID_PTP_WIN10_Inst.HW]
AddReg = ETD_AddReg.HW

[ETD_HID_PTP_WIN10_Inst.Wdf]
KmdfService = ETD, HIDDevice_WdfSect

;----------------------------------------------------------------------------

[ETD_HID_PTP_WIN10_Group1_Inst]
FeatureScore=F9
Include = msmouse.inf
Needs = HID_Mouse_Inst.NT
CopyFiles=ETDSys.CopyFiles, ETDApp.CopyFiles
AddReg=ETD_HID_System_Win10.AddReg, ETD_HID_HKR_OtherSetting_Group1.AddReg
CopyINF=ETDHCF.inf
Reboot

[ETD_HID_PTP_WIN10_Group1_Inst.Services]
Include = msmouse.inf
Needs = HID_Mouse_Inst.NT.Services
AddService = ETD,0x00000000, ETD_Service_Inst
AddService = ETDService,0x00000800, ETD_APP_Service_Inst

[ETD_HID_PTP_WIN10_Group1_Inst.HW]
AddReg = ETD_AddReg.HW

[ETD_HID_PTP_WIN10_Group1_Inst.Wdf]
KmdfService = ETD, HIDDevice_WdfSect

;----------------------------------------------------------------------------

[ETD_HID_PTP_WIN10_Group2_Inst]
FeatureScore=F9
Include = msmouse.inf
Needs = HID_Mouse_Inst.NT
CopyFiles=ETDSys.CopyFiles, ETDApp.CopyFiles
AddReg=ETD_HID_System_Win10.AddReg, ETD_HID_HKR_OtherSetting_Group2.AddReg
CopyINF=ETDHCF.inf
Reboot

[ETD_HID_PTP_WIN10_Group2_Inst.Services]
Include = msmouse.inf
Needs = HID_Mouse_Inst.NT.Services
AddService = ETD,0x00000000, ETD_Service_Inst
AddService = ETDService,0x00000800, ETD_APP_Service_Inst

[ETD_HID_PTP_WIN10_Group2_Inst.HW]
AddReg = ETD_AddReg.HW

[ETD_HID_PTP_WIN10_Group2_Inst.Wdf]
KmdfService = ETD, HIDDevice_WdfSect

;----------------------------------------------------------------------------
[ETD_HID_PTP_WIN10_Group3_Inst]
FeatureScore=F9
Include = msmouse.inf
Needs = HID_Mouse_Inst.NT
CopyFiles=ETDSys.CopyFiles, ETDApp.CopyFiles
AddReg=ETD_HID_System_Win10.AddReg, ETD_HID_HKR_OtherSetting_Group3.AddReg
CopyINF=ETDHCF.inf
Reboot

[ETD_HID_PTP_WIN10_Group3_Inst.Services]
Include = msmouse.inf
Needs = HID_Mouse_Inst.NT.Services
AddService = ETD,0x00000000, ETD_Service_Inst
AddService = ETDService,0x00000800, ETD_APP_Service_Inst

[ETD_HID_PTP_WIN10_Group3_Inst.HW]
AddReg = ETD_AddReg.HW

[ETD_HID_PTP_WIN10_Group3_Inst.Wdf]
KmdfService = ETD, HIDDevice_WdfSect

;----------------------------------------------------------------------------
; Entry point for Uninstallation.
; This section is executed as part of Uninstallation.
;----------------------------------------------------------------------------

;----------------------------------------------------------------------------
; Uninstall Section
;----------------------------------------------------------------------------


;----------------------------------------------------------------------------
; System Section
;----------------------------------------------------------------------------
[ETD_HID_System_Win10.AddReg]
HKLM,%ServiceRoot%"\Elantech",Version,%REG_SZ%,"%DriverVersion%"
HKLM,%ServiceRoot%"\Elantech",DriverVersion,%REG_SZ%,"ELAN Touchpad %DriverVersion%_HIDI2C_%DriverBit%_%DriverVersionExtend%"
HKLM,%ServiceRoot%"\Elantech",ScreenOrientation,%REG_DWORD%,0

;----------------------------------------------------------------------------
; DeviceInfo Section
;----------------------------------------------------------------------------

[ETD_HID_HKR_OtherSetting.AddReg]
HKR,"OtherSetting",DetectTouchPadSMBusProtocol,%REG_DWORD%,0			; 0 = Not Detect, 1 = Detect
HKR,"OtherSetting",DetectTouchPadI2CProtocol,%REG_DWORD%,1			; 0 = Not Detect, 1 = Detect
HKR,"OtherSetting",LidStatusControlFunction_Enable,%REG_DWORD%,1		; 0: Close Function , 1: Open Function
HKR,"OtherSetting",LidStatusNotifyFW_Enable,%REG_DWORD%,1			; 0: Close Function , 1: Open Function
HKR,"OtherSetting",CustomerDefinition,%REG_DWORD%,8
HKR,"OtherSetting",ToggleFunction_Enable,%REG_DWORD%,0				; Toggle Function Key Enable
HKR,"OtherSetting",ToggleScanCode,%REG_DWORD%,0xE073				; Toggle Scan Code
HKR,"OtherSetting",SwitchFunction_Enable,%REG_DWORD%,0				; Switch Function Key Enable
HKR,"OtherSetting",Switch_On_Key,%REG_DWORD%,0xE03E					; Switch On Key
HKR,"OtherSetting",Switch_Off_Key,%REG_DWORD%,0xE03F				; Switch Off Key
HKR,"OtherSetting",ShowTopIconWhenDeviceOnOff,%REG_DWORD%,0
HKR,"OtherSetting",PTPChangeStatusByLidControl,%REG_DWORD%,0

[ETD_HID_HKR_OtherSetting_Group1.AddReg]
HKR,"OtherSetting",DetectTouchPadSMBusProtocol,%REG_DWORD%,0			; 0 = Not Detect, 1 = Detect
HKR,"OtherSetting",DetectTouchPadI2CProtocol,%REG_DWORD%,1			; 0 = Not Detect, 1 = Detect
HKR,"OtherSetting",LidStatusControlFunction_Enable,%REG_DWORD%,1		; 0: Close Function , 1: Open Function
HKR,"OtherSetting",LidStatusNotifyFW_Enable,%REG_DWORD%,1			; 0: Close Function , 1: Open Function
HKR,"OtherSetting",CustomerDefinition,%REG_DWORD%,8
HKR,"OtherSetting",ToggleFunction_Enable,%REG_DWORD%,0				; Toggle Function Key Enable
HKR,"OtherSetting",ToggleScanCode,%REG_DWORD%,0xE073				; Toggle Scan Code
HKR,"OtherSetting",SwitchFunction_Enable,%REG_DWORD%,1				; Switch Function Key Enable
HKR,"OtherSetting",Switch_On_Key,%REG_DWORD%,0x62					; Switch On Key
HKR,"OtherSetting",Switch_Off_Key,%REG_DWORD%,0x63					; Switch Off Key
HKR,"OtherSetting",Send97CommandEnable,%REG_DWORD%,0
HKR,"OtherSetting",ShowTopIconWhenDeviceOnOff,%REG_DWORD%,0
HKR,"OtherSetting",HardwareID,%REG_DWORD%,0x0600
HKR,"OtherSetting",PTPChangeStatusByLidControl,%REG_DWORD%,1


[ETD_HID_HKR_OtherSetting_Group2.AddReg]
HKR,"OtherSetting",DetectTouchPadSMBusProtocol,%REG_DWORD%,0			; 0 = Not Detect, 1 = Detect
HKR,"OtherSetting",DetectTouchPadI2CProtocol,%REG_DWORD%,1			; 0 = Not Detect, 1 = Detect
HKR,"OtherSetting",LidStatusControlFunction_Enable,%REG_DWORD%,1		; 0: Close Function , 1: Open Function
HKR,"OtherSetting",LidStatusNotifyFW_Enable,%REG_DWORD%,1			; 0: Close Function , 1: Open Function
HKR,"OtherSetting",CustomerDefinition,%REG_DWORD%,8
HKR,"OtherSetting",ToggleFunction_Enable,%REG_DWORD%,1				; Toggle Function Key Enable
HKR,"OtherSetting",ToggleScanCode,%REG_DWORD%,0xE073				; Toggle Scan Code
HKR,"OtherSetting",SwitchFunction_Enable,%REG_DWORD%,0				; Switch Function Key Enable
HKR,"OtherSetting",Switch_On_Key,%REG_DWORD%,0x62					; Switch On Key
HKR,"OtherSetting",Switch_Off_Key,%REG_DWORD%,0x63					; Switch Off Key
HKR,"OtherSetting",EC_Notify_Enable,%REG_DWORD%,1
HKR,"OtherSetting",EC_Notify_Inhibit_WhenForceEnable,%REG_DWORD%,0	; Send cmd after force enable
HKR,"OtherSetting",EC_Notify_On_Port,%REG_DWORD%,0x97				; To 64h
HKR,"OtherSetting",EC_Notify_On_Data,%REG_DWORD%,0x02				; To 60h
HKR,"OtherSetting",EC_Notify_Off_Port,%REG_DWORD%,0x97				; To 64h
HKR,"OtherSetting",EC_Notify_Off_Data,%REG_DWORD%,0x01				; To 60h
HKR,"OtherSetting",Send97CommandEnable,%REG_DWORD%,1 
HKR,"OtherSetting",ECChannel,%REG_DWORD%,1
HKR,"OtherSetting",ResumeNeedSend97Command,%REG_DWORD%,1
HKR,"OtherSetting",ShowTopIconWhenDeviceOnOff,%REG_DWORD%,0
HKR,"OtherSetting",HardwareID,%REG_DWORD%,0x0600
HKR,"OtherSetting",PTPChangeStatusByLidControl,%REG_DWORD%,0


[ETD_HID_HKR_OtherSetting_Group3.AddReg]
HKR,"OtherSetting",DetectTouchPadSMBusProtocol,%REG_DWORD%,0			; 0 = Not Detect, 1 = Detect
HKR,"OtherSetting",DetectTouchPadI2CProtocol,%REG_DWORD%,1			; 0 = Not Detect, 1 = Detect
HKR,"OtherSetting",LidStatusControlFunction_Enable,%REG_DWORD%,1		; 0: Close Function , 1: Open Function
HKR,"OtherSetting",LidStatusNotifyFW_Enable,%REG_DWORD%,1			; 0: Close Function , 1: Open Function
HKR,"OtherSetting",CustomerDefinition,%REG_DWORD%,8
HKR,"OtherSetting",ToggleFunction_Enable,%REG_DWORD%,0				; Toggle Function Key Enable
HKR,"OtherSetting",ToggleScanCode,%REG_DWORD%,0xE073				; Toggle Scan Code
HKR,"OtherSetting",SwitchFunction_Enable,%REG_DWORD%,1				; Switch Function Key Enable
HKR,"OtherSetting",Switch_On_Key,%REG_DWORD%,0x62					; Switch On Key
HKR,"OtherSetting",Switch_Off_Key,%REG_DWORD%,0x63					; Switch Off Key
HKR,"OtherSetting",EC_Notify_Enable,%REG_DWORD%,1
HKR,"OtherSetting",EC_Notify_Inhibit_WhenForceEnable,%REG_DWORD%,0	; Send cmd after force enable
HKR,"OtherSetting",EC_Notify_On_Port,%REG_DWORD%,0x97				; To 64h
HKR,"OtherSetting",EC_Notify_On_Data,%REG_DWORD%,0x02				; To 60h
HKR,"OtherSetting",EC_Notify_Off_Port,%REG_DWORD%,0x97				; To 64h
HKR,"OtherSetting",EC_Notify_Off_Data,%REG_DWORD%,0x01				; To 60h
HKR,"OtherSetting",Send97CommandEnable,%REG_DWORD%,0
HKR,"OtherSetting",Send97CommandEnableWhenInit,%REG_DWORD%,1
HKR,"OtherSetting",ShowTopIconWhenDeviceOnOff,%REG_DWORD%,0
HKR,"OtherSetting",HardwareID,%REG_DWORD%,0x0600
HKR,"OtherSetting",PTPChangeStatusByLidControl,%REG_DWORD%,1
HKR,"OtherSetting",LidCloseBeforeD0Exit,%REG_DWORD%,1
HKR,"OtherSetting",ECChannel,%REG_DWORD%,2

[ETD_AddReg.HW]
HKR,,"UpperFilters",0x00010000,"ETD"

[HIDDevice_WdfSect]
KmdfLibraryVersion = 1.11

;----------------------------------------------------------------------------
; String Table
;----------------------------------------------------------------------------

[Strings]
PS2DeviceDesc 		= "ELAN PS/2 Port Input Device"
ELANHIDDeviceDesc 	= "ELAN pointing device"
Publisher 		= "ELAN Microelectronic Corp."
TargetDir		= "Elantech"
NewTargetDir		= "NewElantech"
DiskName  		= "ETDWare Driver Disk"
VenderName		= "ELAN"
ServiceRoot 		= "System\CurrentControlSet\Control"

; Registry Type
REG_EXPAND_SZ		= 0x00020000 
REG_DWORD		= 0x00010001 
REG_MULTI_SZ		= 0x00010000
REG_BINARY		= 0x00000001
REG_SZ			= 0x00000000

; ELAN Driver Information
ELANStringName		= "ELAN Input Device Driver"
ThinkPadStringName	= "ThinkPad UltraNav Driver"
ThinkPadStringNameNew	= "ELAN pointing device"
LenovoStringName 	= "ELAN pointing device"
ELANProgamName		= "ELAN Pointing Driver"
DriverDate		= "09/23/2020"
DriverVersion		= "27.4.10.3"
DriverBit		= "X64"
DriverVersionExtend	= "WHQL"        ; Beta or WHQL
I am not familiar with UEFI modification. The Legacy BIOS option has been blocked by Lenovo. I don't know if it is because of Intel's decision to no longer support this type of BIOS or if it is because of an agreement with Microsoft, which has occurred in the past, to block BIOS options that are not of interest to the company. In any case, I think Ryzen chips still support legacy boot.

I am not sure how the BIOS would block touchpad detection. When running the command "sudo i2cdetect -l", nothing is detected, which suggests to me that it might be a problem with AMD's i2c interface. Anyway, I am a bit lost amidst so many questions.
 
Old 02-03-2023, 09:04 PM   #4
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora, Centos, Manjaro
Posts: 317

Rep: Reputation: 70
I have a six year old Lenovo Ideapad. To get the touchpad working I had to blacklist elan_i2c.

To do this create a conf file with the following in it:-

blacklist elan_i2c

Put this file in /etc/modprobe.d and reboot your computer.

For example:-

sudo vi /etc/modprobe.d/elan_i2c_not_needed.conf (use your editor of choice) which contains

blacklist elan_i2c

Now reboot your computer. It should now work.
 
Old 02-03-2023, 10:21 PM   #5
a_lameira
LQ Newbie
 
Registered: Jan 2023
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ArfaSmif View Post
To do this create a conf file with the following in it:-

blacklist elan_i2c
Thanks for the reply! Unfortunately, I have tried a large number of variations of kernel modules, blacklisting, force-loading, compiling custom kernels with additional modules, etc. It seems to me that the problem in question is something along the lines of this: ( https://bugzilla.kernel.org/show_bug.cgi?id=215101 ) and this ( https://bugs.launchpad.net/ubuntu/+s...x/+bug/1853277 )

My hypothesis at the moment is that a bug in the acpi table is preventing the touchpad and the i2c interface from operating correctly. The evidence that leads me to this conclusion is the fact that the i2c interface is not working properly (the command 'sudo i2cdetect -l' produces no output) and a critical bug in the acpi interface is in the CDAT structure. Examining the DSDT table I noticed that the only mentions of CDAT are in the touchpad description.

Using the fwts tool, I got the following output:

Code:
klog: Scan kernel log for errors and warnings.
--------------------------------------------------------------------------------
Test 1 of 1: Kernel log error check.
FAILED [HIGH] KlogAcpiBadAmlCode: Test 1, HIGH Kernel message: [ 0.256849] ACPI
Warning: NsLookup: Type mismatch on CDAT (Integer), searching for (RegionField)
(20220331/nsaccess-696)

ADVICE: ACPI AML interpreter has found some non-conforming AML code. This should
be investigated and fixed.
So I think that if the bug in this table is discovered and fixed, probably either the problem will be solved, or it can be solved with simpler measures.

I believe that the bug is in this part of the table:

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))
                }
            }
        }
    }
 
Old 02-05-2023, 09:55 AM   #6
a_lameira
LQ Newbie
 
Registered: Jan 2023
Posts: 6

Original Poster
Rep: Reputation: 0
Some updates on the touchpad issue.

Apparently, the implementation of this touchpad has been done following a new specification, Coherent Device Attribute Table (CDAT). https://uefi.org/sites/default/files...Table_1.01.pdf

In order for CDAT to work, first the implementation of CXL (Compute Express Link) in the kernel must be completed. According to the documentation at https://docs.kernel.org/driver-api/c...y-devices.html ,
Quote:
"Similar to how a RAID driver takes disk objects and assembles them into a new logical device, the CXL subsystem is tasked to take PCIe and ACPI objects and assemble them into a CXL.mem decode topology. The need for runtime configuration of the CXL.mem topology is also similar to RAID in that different environments with the same hardware configuration may decide to assemble the topology in contrasting ways."
Luckily for me, and for people who have devices running on newly implemented interfaces, some Intel engineers are working to implement CXL RAM support for the next kernel release (6.3), as reported at https://www.phoronix.com/news/CXL-RAM-Region-Linux-6.3 .

According to Dan Williams, the engineer working on it,

Quote:
CXL drivers need various data which are provided through generic DOE mailboxes
as defined in the PCIe 6.0 spec.[1]

One such data is the Coherent Device Attribute Table (CDAT). CDAT data provides
coherent information about the various devices in the system. It was developed
because systems no longer have a priori knowledge of all coherent devices
within a system. CDAT describes the coherent characteristics of the
components on the CXL bus separate from system configurations. The OS can
then, for example, use this information to form correct interleave sets.

To begin reading the CDAT the OS must have support to access the DOE mailboxes
provided by the CXL devices.

(Available at https://lwn.net/Articles/901373/ )
My knowledge in this area is very limited, but basically, from what I can understand, until CXL Data Object Exchange (CXL DOE Mailbox) support is properly implemented in the kernel, it will be difficult to make this device work out of the box.

In the meantime, I will keep trying to make the device work in other ways, not least because I might be wrong about this CDAT issue. I would appreciate it very much if someone who understands the subject could clarify the matter.
 
Old 02-06-2023, 06:18 AM   #7
a_lameira
LQ Newbie
 
Registered: Jan 2023
Posts: 6

Original Poster
Rep: Reputation: 0
Okay, I have studied a little more about the problem, and it seems to me that a considerable part of the problem is a firmware bug. Reading the ACPI table it became very clear to me that there are strange things in this code, like undeclared objects, etc.

This CDAT error is a syntax error, as I could find out with the acpica utility compiler (iasl). So what I can say is that the Lenovo engineers wrote bad code and did not even bother to test the computer they produced.

Windows performs horribly on this laptop. When compared to the performance of any linux distribution, Windows looks like the purest bloatware.

It annoys me to have to redo the half-baked work of software engineers. I am not qualified for this and have to spend many hours studying to solve the problem. I know, freedom has its price, and the price we pay to use GNU/Linux on our machines is sometimes to have to take an informal degree in computer science. But still, it makes me sad and outraged to see the amount of shoddy work done by multi-billion dollar companies. At the end of the day, we are the ones who get screwed.
 
Old 11-08-2023, 03:31 PM   #8
rocks722
LQ Newbie
 
Registered: Nov 2023
Posts: 2

Rep: Reputation: 0
@a_lameira did you ever figure this out?

Running into the same issue on my Lenovo 100e 2nd Gen (82GJ). It runs xubuntu great, except the damned trackpad still doesn't work...
 
Old 05-07-2024, 01:58 PM   #9
rocks722
LQ Newbie
 
Registered: Nov 2023
Posts: 2

Rep: Reputation: 0
In case anyone else needs hand-holding to figure this out, here's the exact steps I took to solve it for my Lenovo 100e 2nd Gen (82GJ): https://gist.github.com/mgd722/436bf...a9eef2d9c31fae
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 1 02-03-2023 08:19 AM
[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 12:49 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