glorang / nwfermi

NextWindow Touchscreen on Ubuntu 22.04
MIT License
20 stars 3 forks source link

dkms build can't find binary #5

Closed friscodelrosario closed 1 year ago

friscodelrosario commented 1 year ago

friscodelrosario@friscodelrosario-520-1047c:/usr/src$ sudo dkms build nwfermi/0.7.0.1

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area... make -j4 KERNELRELEASE=5.4.0-144-generic module KERNDIR=/lib/modules/5.4.0-144-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.4.0-144-generic/build...(bad exit status: 2) ERROR (dkms apport): binary package for nwfermi: 0.7.0.1 not found Error! Bad return status for module build on kernel: 5.4.0-144-generic (x86_64) Consult /var/lib/dkms/nwfermi/0.7.0.1/build/make.log for more information. friscodelrosario@friscodelrosario-520-1047c:/usr/src$

glorang commented 1 year ago

Are you sure you copied nwfermi-0.7.0.1 to /usr/src ?

What is the output of /var/lib/dkms/nwfermi/0.7.0.1/build/make.log ?

friscodelrosario commented 1 year ago

Yes.

DKMS make.log for nwfermi-0.7.0.1 for kernel 5.4.0-144-generic (x86_64) Sun 05 Mar 2023 08:44:42 AM PST make -C /lib/modules/5.4.0-144-generic/build M=/var/lib/dkms/nwfermi/0.7.0.1/build modules make[1]: Entering directory '/usr/src/linux-headers-5.4.0-144-generic' CC [M] /var/lib/dkms/nwfermi/0.7.0.1/build/nw-fermi.o In file included from /var/lib/dkms/nwfermi/0.7.0.1/build/nw-fermi.c:21: ./arch/x86/include/asm/uaccess.h: In function ‘set_fs’: ./arch/x86/include/asm/uaccess.h:31:9: error: dereferencing pointer to incomplete type ‘struct task_struct’ 31 | current->thread.addr_limit = fs; | ^~ make[2]: [scripts/Makefile.build:270: /var/lib/dkms/nwfermi/0.7.0.1/build/nw-fermi.o] Error 1 make[1]: [Makefile:1767: /var/lib/dkms/nwfermi/0.7.0.1/build] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-144-generic' make: *** [Makefile:11: module] Error 2

friscodelrosario commented 1 year ago

I was successful with this before, but on a different kernel: 5.4.0-65-generic

glorang commented 1 year ago

(As a test) could you change asm/uaccess.h to linux/uaccess.h on L21 in nw-fermi.c ?

nwfermi was updated from 0.6 to 0.7 recently, I'm guessing this is more the issue than your kernel version.

friscodelrosario commented 1 year ago

DKMS: build completed !!

friscodelrosario commented 1 year ago

evtest works, none of the other debug steps do

glorang commented 1 year ago

If lsmod does not list the module as loaded try modprobe or reboot

friscodelrosario commented 1 year ago

Weird. Touching the screen anywhere behaves like a click wherever the mouse cursor is, but that's all.

glorang commented 1 year ago

And this worked previously on the same hardware ?

friscodelrosario commented 1 year ago

And this worked previously on the same hardware ?

It did, It was awesome. =)

friscodelrosario commented 1 year ago

And this worked previously on the same hardware ?

Two questions:

1) lsmod includes nwfermi on the list of modules, but there's nothing in the 'Used by' column. Is that significant?

2) Will the evtest output help?

glorang commented 1 year ago

Weird. Touching the screen anywhere behaves like a click wherever the mouse cursor is, but that's all.

I remember now this is similar to what was seen in issue #4. (I don't seem to get any touches in the areas that I touch (e.g. icons to open applications) unless the pointer is over that icon.). In this case Wayland was not disabled.

Can you double check you disabled Wayland and are running on X.org ?

lsmod includes nwfermi on the list of modules, but there's nothing in the 'Used by' column. Is that significant?

Yes, this is normal. The module has no dependencies / no other module depends on nwfermi. The use count should be 1 though.

Will the evtest output help?

If it generates events when you press the screen you should be good. Maybe provide Xorg log if it still doesn't work

friscodelrosario commented 1 year ago

Can you double check you disabled Wayland and are running on X.org ?

WaylandEnable=false

The use count should be 1 though.

Check.

Will the evtest output help?

If it generates events when you press the screen you should be good. Maybe provide Xorg log if it still doesn't work

friscodelrosario@friscodelrosario-520-1047c:~$ grep -i fermi .local/share/xorg/Xorg.0.log [ 48.077] (II) config/udev: Adding input device Nextwindow Fermi Touchscreen (/dev/input/event15) [ 48.077] () Nextwindow Fermi Touchscreen: Applying InputClass "evdev pointer catchall" [ 48.077] () Nextwindow Fermi Touchscreen: Applying InputClass "libinput pointer catchall" [ 48.077] (II) Using input driver 'libinput' for 'Nextwindow Fermi Touchscreen' [ 48.077] () Nextwindow Fermi Touchscreen: always reports core events [ 48.078] (II) event15 - Nextwindow Fermi Touchscreen: is tagged by udev as: Mouse [ 48.078] (II) event15 - Nextwindow Fermi Touchscreen: device is a pointer [ 48.078] (II) event15 - Nextwindow Fermi Touchscreen: device removed [ 48.079] (II) XINPUT: Adding extended input device "Nextwindow Fermi Touchscreen" (type: MOUSE, id 19) [ 48.079] () Nextwindow Fermi Touchscreen: (accel) selected scheme none/0 [ 48.079] () Nextwindow Fermi Touchscreen: (accel) acceleration factor: 2.000 [ 48.079] () Nextwindow Fermi Touchscreen: (accel) acceleration threshold: 4 [ 48.079] (II) event15 - Nextwindow Fermi Touchscreen: is tagged by udev as: Mouse [ 48.079] (II) event15 - Nextwindow Fermi Touchscreen: device is a pointer [ 48.080] (II) config/udev: Adding input device Nextwindow Fermi Touchscreen (/dev/input/js0) [ 48.080] (II) config/udev: Adding input device Nextwindow Fermi Touchscreen (/dev/input/mouse3) [ 124.591] (II) event15 - Nextwindow Fermi Touchscreen: Enabling spurious button debouncing, see https://wayland.freedesktop.org/libinput/doc/1.15.5/button-debouncing.html for details [ 924.499] (II) event15 - Nextwindow Fermi Touchscreen: device removed f

glorang commented 1 year ago

Did you reboot and/or restart gdm ? Your log still suggest you are running Wayland here:

[ 124.591] (II) event15 - Nextwindow Fermi Touchscreen: Enabling spurious button debouncing, see https://wayland.freedesktop.org/libinput/doc/1.15.5/button-debouncing.html for details

What is the output of ps faux |grep -i wayland and ps faux |grep Xorg ?

In your output you can see:

[ 48.077] () Nextwindow Fermi Touchscreen: Applying InputClass "evdev pointer catchall"
[ 48.077] () Nextwindow Fermi Touchscreen: Applying InputClass "libinput pointer catchall"
[ 48.077] (II) Using input driver 'libinput' for 'Nextwindow Fermi Touchscreen'

but that should be:

[  1131.536] (**) Nextwindow Fermi Touchscreen: Applying InputClass "evdev pointer catchall"
[  1131.536] (**) Nextwindow Fermi Touchscreen: Applying InputClass "libinput pointer catchall"
[  1131.536] (**) Nextwindow Fermi Touchscreen: Applying InputClass "Nextwindow Fermi Touchscreen"
[  1131.536] (II) Using input driver 'nextwindow' for 'Nextwindow Fermi Touchscreen'

So either you are still using Wayland, /etc/X11/xorg.conf.d/10-nwfermi.conf is missing or you didn't copy the nextwindow_drv.* files to /usr/lib/xorg/modules/input/

friscodelrosario commented 1 year ago

/etc/X11/xorg.conf.d/10-nwfermi.conf is missing

That's it. I'm searching for how to make xorg.conf.d writable.

friscodelrosario commented 1 year ago

Aha. Somewhere along the line I overwrote the xorg.conf.d directory with the 10-nwfermi.conf file. Recreated the directory, re-copied the config file, done!

Thank you!