glorang / nwfermi

NextWindow Touchscreen on Ubuntu 22.04
MIT License
21 stars 4 forks source link

NextWindow Touchscreen on Ubuntu 22.04

This is a guide for installing / configuring a NextWindow Touchscreen on Ubuntu 22.04.

The files in this repo will install nwfermi 0.7.0.1.

It is based on the files provided by HP as SUSE drivers for the "HP Compaq Elite 8300 All-in-One Desktop PC". HP Support Link | Direct Link

The HP driver has not been updated anymore since 2013, I've made following enhancements:

For models 1926:1846 and 1926:1878 you need to install the additional "fwprod" daemon. Its usage is unclear but seems to work according to #4. See additional steps as required outlined below.

Licensing

Install required packages

apt-get install dkms build-essential autoconf xutils-dev libtool xserver-xorg-dev libc6-i386 pkg-config evtest

Install additional packages (models 1926:1846 and 1926:1878)

Install libudev1 and symlink it to libudev0 (no longer available as i386)

apt-get install libudev1:i386
ln -s /usr/lib/i386-linux-gnu/libudev.so.1 /usr/lib/i386-linux-gnu/libudev.so.0

Get source files from this Git repo

# wget https://github.com/glorang/nwfermi/archive/refs/heads/master.zip
# unzip master.zip
# cd nwfermi-master

All following chapters assume you are executing the steps as outlined from within the nwfermi-master folder.

Build and install nwfermi driver

Install required nwfermi files

Install optional nwfermi files (models 1926:1846 and 1926:1878)

Build xf86-input-nextwindow Xorg module

# cd usr/src/xf86-input-nextwindow-0.3.4
# chmod +x autogen.sh ; ./autogen.sh
# make
# make install

Disable Wayland / Enable Xorg

Edit /etc/gdm3/custom.conf and set WaylandEnable=false in the [daemon] section.

Add your local user to the input group

To be able to read the input device your local user must be part of the input group. You should add the gdm user to this group as well.

# usermod -a -G input gdm
# usermod -a -G input your_username

Reboot

Reboot and everything should work! Enjoy.

Debugging

Use following steps for some general debugging hints:

# /usr/sbin/nwfermi_daemon /instanceid 1
StartThreads
Starting bulk thread
Starting tl thread

After touching the screen:

state: 1, X: 14893, Y: 22044
state: 2, X: 14893, Y: 22044
state: 2, X: 14893, Y: 22044
# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:

...
/dev/input/event8:      Nextwindow Fermi Touchscreen
...

Select the device event number [0-21]: 8
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "Nextwindow Fermi Touchscreen"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 261 (BTN_5)
    Event code 272 (BTN_LEFT)
    Event code 273 (BTN_RIGHT)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value  15028
      Min        0
      Max    32767
    Event code 1 (ABS_Y)
      Value  18035
      Min        0
      Max    32767
    Event code 48 (ABS_MT_TOUCH_MAJOR)
      Value      0
      Min        0
      Max    32767
    Event code 49 (ABS_MT_TOUCH_MINOR)
      Value      0
      Min        0
      Max    32767
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max    32767
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max    32767
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max      255
Properties:
Testing ... (interrupt to exit)

After touching the screen:

Event: time 1673258489.763882, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1673258489.763882, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 16527
Event: time 1673258489.763882, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 12131
Event: time 1673258489.763882, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 1000
Event: time 1673258489.763882, type 3 (EV_ABS), code 49 (ABS_MT_TOUCH_MINOR), value 1000
Event: time 1673258489.763882, ++++++++++++++ SYN_MT_REPORT ++++++++++++
Event: time 1673258489.763882, type 1 (EV_KEY), code 272 (BTN_LEFT), value 1
Event: time 1673258489.763882, type 3 (EV_ABS), code 0 (ABS_X), value 16527
Event: time 1673258489.763882, type 3 (EV_ABS), code 1 (ABS_Y), value 12131
Event: time 1673258489.763882, -------------- SYN_REPORT ------------
Event: time 1673258489.784821, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1673258489.784821, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 16527
Event: time 1673258489.784821, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 12131
Event: time 1673258489.784821, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 1000
Event: time 1673258489.784821, type 3 (EV_ABS), code 49 (ABS_MT_TOUCH_MINOR), value 1000
$ grep -i fermi /home/glorang/.local/share/xorg/Xorg.1.log
[    52.662] (II) config/udev: Adding input device Nextwindow Fermi Touchscreen (/dev/input/event9)
[    52.662] (**) Nextwindow Fermi Touchscreen: Applying InputClass "libinput pointer catchall"
[    52.662] (**) Nextwindow Fermi Touchscreen: Applying InputClass "Nextwindow Fermi Touchscreen"
[    52.662] (II) Using input driver 'nextwindow' for 'Nextwindow Fermi Touchscreen'
[    52.662] (**) Nextwindow Fermi Touchscreen: always reports core events
[    52.662] (**) Nextwindow Fermi Touchscreen: always reports core events
[    52.662] (II) Nextwindow Fermi Touchscreen: Using device /dev/input/event9.
[    52.662] (II) Nextwindow Fermi Touchscreen: Using touch help.
[    52.718] (II) XINPUT: Adding extended input device "Nextwindow Fermi Touchscreen" (type: UNKNOWN, id 16)
[    52.718] (**) Nextwindow Fermi Touchscreen: (accel) keeping acceleration scheme 1
[    52.718] (**) Nextwindow Fermi Touchscreen: (accel) acceleration profile 0
[    52.718] (**) Nextwindow Fermi Touchscreen: (accel) acceleration factor: 2.000
[    52.718] (**) Nextwindow Fermi Touchscreen: (accel) acceleration threshold: 4
[    52.718] (II) Nextwindow Fermi Touchscreen: On.
[    52.718] (II) config/udev: Adding input device Nextwindow Fermi Touchscreen (/dev/input/js0)
[    52.718] (**) Nextwindow Fermi Touchscreen: Applying InputClass "Nextwindow Fermi Touchscreen"
[    52.718] (II) Using input driver 'nextwindow' for 'Nextwindow Fermi Touchscreen'
[    52.718] (**) Nextwindow Fermi Touchscreen: always reports core events
[    52.718] (**) Nextwindow Fermi Touchscreen: always reports core events
[    52.718] (II) Nextwindow Fermi Touchscreen: Using device /dev/input/js0.
[    52.718] (II) Nextwindow Fermi Touchscreen: Using touch help.
[    52.770] (II) XINPUT: Adding extended input device "Nextwindow Fermi Touchscreen" (type: UNKNOWN, id 17)
[    52.770] (**) Nextwindow Fermi Touchscreen: (accel) keeping acceleration scheme 1
[    52.770] (**) Nextwindow Fermi Touchscreen: (accel) acceleration profile 0
[    52.770] (**) Nextwindow Fermi Touchscreen: (accel) acceleration factor: 2.000
[    52.770] (**) Nextwindow Fermi Touchscreen: (accel) acceleration threshold: 4
[    52.770] (II) Nextwindow Fermi Touchscreen: On.
[    52.770] (II) config/udev: Adding input device Nextwindow Fermi Touchscreen (/dev/input/mouse3)
[    52.770] (**) Nextwindow Fermi Touchscreen: Applying InputClass "Nextwindow Fermi Touchscreen"
[    52.770] (II) Using input driver 'nextwindow' for 'Nextwindow Fermi Touchscreen'
[    52.770] (**) Nextwindow Fermi Touchscreen: always reports core events
[    52.770] (**) Nextwindow Fermi Touchscreen: always reports core events
[    52.770] (II) Nextwindow Fermi Touchscreen: Using device /dev/input/mouse3.
[    52.770] (II) Nextwindow Fermi Touchscreen: Using touch help.
[    52.826] (II) XINPUT: Adding extended input device "Nextwindow Fermi Touchscreen" (type: UNKNOWN, id 18)
[    52.826] (**) Nextwindow Fermi Touchscreen: (accel) keeping acceleration scheme 1
[    52.826] (**) Nextwindow Fermi Touchscreen: (accel) acceleration profile 0
[    52.826] (**) Nextwindow Fermi Touchscreen: (accel) acceleration factor: 2.000
[    52.826] (**) Nextwindow Fermi Touchscreen: (accel) acceleration threshold: 4
[    52.826] (II) Nextwindow Fermi Touchscreen: On.