- ACPI patches (volume/powerbutton and standby)
- HID driver patches (keyboard functional keys and LEDs)
- Installation on Arch Linux
- Installation on Ubuntu (and possibly other distributions)
- Additional Information
Caution: These steps will modify your computers firmware. This may break your device and/or attached hardware.
For S3 sleep state and the power/volume buttons of the device to work the ACPI DSDT tables must be modified. The patches contained in this repository incorporate the information from the Delta-Xi Blog
Prerequisites:
-
Intel ACPI Source Language compiler which is usually provided by the acpica or acpica-tools package
-
make
-
one of the following BIOS versions:
- N1ZET76W (1.32)
- N1ZET79W (1.35)
other versions may work but may also require changes to the patch. The current BIOS version can be checked via
sudo dmidecode --string "bios-version"
-
A Lenovo X1 Tablet 3rd Generation. To check if you have one of these devices you may run
sudo dmidecode --string "system-product-name"
The output should beginn, according to the lenovo website with "20KJ" or "20KK". The device the patch was tested on returned "20KJ001NGE".
To apply the ACPI patches change to the acpi subdirectory and run make with the appropriate patch for your BIOS version.
Choose between patch132
for version "1.32" and patch135
for version "1.35".
cd acpi
sudo make dsdt.dat
make patch135 compile
sudo make install
The patch should apply cleanly. If not you may patch the dsdt.dsl file by hand. Finally add the acpi_override file as another initrd to your bootloader configuration.
initrd=/boot/acpi_override mem_sleep_default=deep
Caution: These steps will modify your kernel. Doing so might prevent your system from booting.
The attachable keyboard uses non standard keycodes for the functional keys and an additional USB endpoint for control of the LEDs. The provided sourcecode is a patched version of the upstream hid-lenovo module. For reference the patches (for the first generation device?) by Dennis Wassenberg were used. Furhtermore this repository contains a patched version of the upstream hid-multitouch module which fixes the pointstick for kernel versions > 5.4.11 (for details see here).
Prerequisites:
- make
- GCC C compiler
- Linux headers/source for the currently installed kernel
When running Arch Linux you may build the DKMS package and install it via pacman:
cd hid
makepkg .
pacman -U hid-lenovo-tp1gen3-dkms-0.2.0-1-x86_64.pkg.tar.xz
If you install the compiled module keep in mind, that you have to recompile the module every time your kernel is updated.
cd hid
make
sudo make install
As the multitouch module is not an extension but a replacement of the upstream module, the latter must be blacklisted. While the Arch Linux package should add the necessary lines automatically it might be necessary to regenerate the initramfs as the original module also must be replaced there. For details see here.
- download and extract
linux-tp1gen3-master
cd linux-tp1gen3-master
-
edit
./hid/src/dkms.conf
Replace the placeholders @_PKGBASE@ and @VERSION@ with the actual values being hid-lenovo-tp1gen3 and the current version (e.g. 0.2.0). The version can be determined from the PKBUILD file. -
install the DKMS package
sudo apt-get install build-essential dkms
- copy files
sudo mkdir -p /usr/src/hid-lenovo-tp1gen3-<version>
sudo cp -a ./hid/src/* /usr/src/hid-lenovo-tp1gen3-<version>
- build and install
sudo dkms add -m hid-lenovo-tp1gen3 -v <version>
sudo dkms build -m hid-lenovo-tp1gen3 -v <version>
sudo dkms install -m hid-lenovo-tp1gen3 -v <version>
Check if the module was successfully added to dkms
~$ dkms status
hid-lenovo-tp1gen3, 0.2.0, 5.6.14, x86_64: installed
- blacklist the old module
Add
blacklist hid-multitouch
to the file/etc/modprobe.d/blacklist.conf
Then reboot.
Thanks goes to
- bitbacchus for writing the Ubuntu Installation section
- parenthetical for providing the BIOS patch for version 1.35