1
0
Fork 0
mirror of https://github.com/tuxedocomputers/tuxedo-touchpad-switch.git synced 2025-01-18 11:41:10 +01:00
Linux userspace driver to enable and disable the touchpads on TongFang/Uniwill laptops using a HID command.
Find a file
2021-02-02 16:02:31 +01:00
debian Add debian package files 2021-02-01 19:43:11 +01:00
res Add license text to all files and auto detect version from git tags 2021-01-27 18:36:39 +01:00
.gitignore Add debian package files 2021-02-01 19:43:11 +01:00
CMakeLists.txt Automatically set dependencies 2021-01-28 18:36:54 +01:00
LICENSE.txt Cleanup 2020-12-22 12:07:53 +01:00
MunkeiVersionFromGit.cmake Make dev build timestamp utc 2021-02-01 16:48:04 +01:00
ReadMe.md Update ReadMe.md 2020-12-22 15:02:11 +00:00
setup-gnome.cpp Fix double unlock bug and some memory leaks 2021-01-29 18:40:14 +01:00
setup-gnome.h Fix double unlock bug and some memory leaks 2021-01-29 18:40:14 +01:00
setup-kde.cpp Fix double unlock bug and some memory leaks 2021-01-29 18:40:14 +01:00
setup-kde.h Fix double unlock bug and some memory leaks 2021-01-29 18:40:14 +01:00
touchpad-control.cpp Merge GNOME and KDE logic and decide in programm what to run 2021-01-27 16:37:17 +01:00
touchpad-control.h Merge GNOME and KDE logic and decide in programm what to run 2021-01-27 16:37:17 +01:00
tuxedo-touchpad-switch.cpp Fix double unlock bug and some memory leaks 2021-01-29 18:40:14 +01:00
update_version_and_changelog.sh Extend update script 2021-02-02 16:02:31 +01:00

This a proof-of-concept Linux userspace driver to hardware-enable/-disable the touchpads on TongFang/Uniwill laptops. This will also trigger the disabled-led, formerly unfunctional under linux.

It syncs up with the software toggle in the gnome settings deamon.

It comes with some known disfuctionalities:

  • only works on desktop evnironments using gsettings/gio
  • does not work on loginscreen(gdm)
  • needs to be started for every user seperatly
  • every user needs write access to the /dev/hidraw* device for the touchpad (udev *.rules included)
  • switching between 2 users is not detected (on next toggle the software and hardware disable will be in sync again however)

Author: Werner Sembach

Raw i2c communication with the touchpad for reference:

0x22 0x00 0x37 0x03 0x23 0x00 0x04 0x00 0x07 0x03
 [^^   ^^] (?max?) length of report? in little endian
            ^ 2 bits reserved + report type
             ^ report id (defined by touchpad controller?
                 ^ reserved
                  ^ opcode (0x2 = GET_REPORT, 0x3 = SET_REPORT)
                     [^^   ^^   ^^   ^^   ^^] ?i2c-hid stuff?
                                           ^ ?report id again?
                                               ^^ report/payload: defined by touchpad controller? 0x03 enabled (0x02 auch, keine ahnung was das unterste bit tut), 0x00 disabled