asus-linux-drivers / asus-numberpad-driver

Maintained feature-rich linux driver for NumberPad(2.0) on Asus laptops. NumberPad(2.0) is illuminated numeric keypad integrated to touchpad which appears when is done tap on top right corner of touchpad for atleast 1s by default (configurable) or slide gesture from top right/left corner to the center, the left shows calc app aswell (configurable).
GNU General Public License v2.0
261 stars 19 forks source link

Nothing happens after (successful?) installation #110

Closed sanjibukai closed 1 year ago

sanjibukai commented 1 year ago

Describe the bug

Hello, I'm running a zenbook UX582 on Fedora 37 and I installed that driver.. After installing all the dependencies it seems I got the driver installed correctly as I don't get any error. But after installing nothing particular is happening, when I touch on the top of my touchpad (tapping the icons trying to enable the numpad), the cursor is just moving.. Here is what I did:

git clone https://github.com/asus-linux-drivers/asus-numberpad-driver
cd asus-numberpad-driver
sudo bash ./install.sh

And here is the output:

driver will run under user root
Requirement already satisfied: libevdev in /usr/lib/python3.11/site-packages (from -r requirements.txt (line 1)) (0.11)
Requirement already satisfied: evdev in /usr/local/lib64/python3.11/site-packages (from -r requirements.txt (line 2)) (1.6.1)
Requirement already satisfied: numpy in /usr/lib64/python3.11/site-packages (from -r requirements.txt (line 3)) (1.22.0)
Requirement already satisfied: inotify in /usr/local/lib/python3.11/site-packages (from -r requirements.txt (line 4)) (0.2.10)
Requirement already satisfied: python-xlib in /usr/local/lib/python3.11/site-packages (from -r requirements.txt (line 5)) (0.33)
Requirement already satisfied: nose in /usr/local/lib/python3.11/site-packages (from inotify->-r requirements.txt (line 4)) (1.3.7)
Requirement already satisfied: six>=1.10.0 in /usr/lib/python3.11/site-packages (from python-xlib->-r requirements.txt (line 5)) (1.16.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Testing interface i2c-0 : failed
Testing interface i2c-1 : sucess
Detected laptop: ZenBook Pro Duo UX582ZM_UX582ZM
Automatically recommended numpad layout: ux581l (associated to UX582ZM-OLED032W). You can specify numpad layout later by yourself. When is recommended layout wrong please create an issue (https://github.com/asus-linux-drivers/asus-numberpad-driver/issues). Do you want use recommended numpad layout? [y/N]y
Selected key layout ux581l
Installing asus touchpad service to /etc/systemd/system/
Attempt to stop, disable and remove service from previous implementation (without using user templates @)
X11 is detected
Installing udev rules to /usr/lib/udev/rules.d/
Added 90-numberpad-external-keyboard.rules
Installed default config which can be futher modified here:
/usr/share/asus_touchpad_numpad-driver/asus_touchpad_numpad_dev
gsettings is here
Do you want automatically try install toggling script for XF86Calculator key? Slide from top left icon will then invoke/close detected calculator app. [y/N]y
io.elementary.calculator here
Toggling script for calculator app gnome-calculator has been installed.
Created symlink /etc/systemd/system/graphical.target.wants/asus_touchpad_numpad@root.service → /etc/systemd/system/asus_touchpad_numpad@.service.
Asus touchpad numpad service enabled
Asus touchpad numpad service started
Install finished

I chose y on every questions.

What I'm supposed to do?

Thank you very much!

Expected behavior

After a successful installation, I was expecting to enable/disable the numpad using the icon.

Relevant log output

No response

Desktop

ldrahnik commented 1 year ago

@sanjibukai Hello, could you please attach entire log file of installed driver: /var/log/asus_touchpad_numpad-driver/error.log and also run driver directly without installing with enabled log level DEBUG as is described in Troubleshoting block in README.

sanjibukai commented 1 year ago

could you please attach entire log file of installed driver: /var/log/asus_touchpad_numpad-driver/error.log

Hello @ldrahnik and thanks. Here is the output of the error.log and indeed, it seems to have some errors..

INFO:asus-touchpad-numpad-driver:Detecting keyboard from string: "N: Name="AT Translated Set 2 keyboard""
INFO:asus-touchpad-numpad-driver:Set keyboard 3 from H: Handlers=sysrq kbd leds event3
INFO:asus-touchpad-numpad-driver:Detecting touchpad from string: "N: Name="ELAN9009:00 04F3:4067 Touchpad""
INFO:asus-touchpad-numpad-driver:Set touchpad device id 2 from S: Sysfs=/devices/pci0000:00/0000:00:15.2/i2c_designware.2/i2c-2/i2c-ELAN9009:00/0018:04F3:4067.0003/input/input20
INFO:asus-touchpad-numpad-driver:Set touchpad id 15 from H: Handlers=mouse4 event15
INFO:asus-touchpad-numpad-driver:Touchpad min-max: x 0-3984, y 0-1152
INFO:asus-touchpad-numpad-driver:Numpad min-max: x 80-3904, y 200-1072
INFO:asus-touchpad-numpad-driver:Detecting keyboard from string: "N: Name="AT Translated Set 2 keyboard""
INFO:asus-touchpad-numpad-driver:Set keyboard 3 from H: Handlers=sysrq kbd leds event3
INFO:asus-touchpad-numpad-driver:Detecting touchpad from string: "N: Name="ELAN9009:00 04F3:4067 Touchpad""
INFO:asus-touchpad-numpad-driver:Set touchpad device id 2 from S: Sysfs=/devices/pci0000:00/0000:00:15.2/i2c_designware.2/i2c-2/i2c-ELAN9009:00/0018:04F3:4067.0003/input/input20
INFO:asus-touchpad-numpad-driver:Set touchpad id 15 from H: Handlers=mouse4 event15
INFO:asus-touchpad-numpad-driver:Touchpad min-max: x 0-3984, y 0-1152
INFO:asus-touchpad-numpad-driver:Numpad min-max: x 80-3904, y 200-1072
INFO:asus-touchpad-numpad-driver:System numlock activated
INFO:asus-touchpad-numpad-driver:Numpad activated
INFO:asus-touchpad-numpad-driver:Setting up for config file key: "enabled" with value: "True"
Error: Sending messages failed: Remote I/O error
INFO:asus-touchpad-numpad-driver:Detecting keyboard from string: "N: Name="AT Translated Set 2 keyboard""
INFO:asus-touchpad-numpad-driver:Set keyboard 3 from H: Handlers=sysrq kbd leds event3
INFO:asus-touchpad-numpad-driver:Detecting touchpad from string: "N: Name="ELAN9009:00 04F3:4067 Touchpad""
INFO:asus-touchpad-numpad-driver:Set touchpad device id 2 from S: Sysfs=/devices/pci0000:00/0000:00:15.2/i2c_designware.2/i2c-2/i2c-ELAN9009:00/0018:04F3:4067.0003/input/input20
INFO:asus-touchpad-numpad-driver:Set touchpad id 15 from H: Handlers=mouse4 event15
INFO:asus-touchpad-numpad-driver:Touchpad min-max: x 0-3984, y 0-1152
INFO:asus-touchpad-numpad-driver:Numpad min-max: x 80-3904, y 200-1072
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:Getting Device Enabled via xinput failed
Traceback (most recent call last):
  File "/usr/share/asus_touchpad_numpad-driver/asus_touchpad.py", line 406, in is_device_enabled
    propData = subprocess.check_output(cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xinput', '--list-props', 'ELAN9009:00 04F3:4067 Touchpad']' returned non-zero exit status 1.
INFO:asus-touchpad-numpad-driver:System numlock activated
INFO:asus-touchpad-numpad-driver:Numpad activated
INFO:asus-touchpad-numpad-driver:Setting up for config file key: "enabled" with value: "True"
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:b''
Error: Sending messages failed: Remote I/O error
INFO:asus-touchpad-numpad-driver:Setting up for config file key: "enabled" with value: "False"
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:b''
Error: Sending messages failed: Remote I/O error
INFO:asus-touchpad-numpad-driver:Numpad deactivated
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:Getting Device Enabled via xinput failed
Traceback (most recent call last):
  File "/usr/share/asus_touchpad_numpad-driver/asus_touchpad.py", line 406, in is_device_enabled
    propData = subprocess.check_output(cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xinput', '--list-props', 'ELAN9009:00 04F3:4067 Touchpad']' returned non-zero exit status 1.
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:Getting Device Enabled via xinput failed
Traceback (most recent call last):
  File "/usr/share/asus_touchpad_numpad-driver/asus_touchpad.py", line 406, in is_device_enabled
    propData = subprocess.check_output(cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xinput', '--list-props', 'ELAN9009:00 04F3:4067 Touchpad']' returned non-zero exit status 1.
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:Getting Device Enabled via xinput failed
Traceback (most recent call last):
  File "/usr/share/asus_touchpad_numpad-driver/asus_touchpad.py", line 406, in is_device_enabled
    propData = subprocess.check_output(cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xinput', '--list-props', 'ELAN9009:00 04F3:4067 Touchpad']' returned non-zero exit status 1.
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:Getting Device Enabled via xinput failed
Traceback (most recent call last):
  File "/usr/share/asus_touchpad_numpad-driver/asus_touchpad.py", line 406, in is_device_enabled
    propData = subprocess.check_output(cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xinput', '--list-props', 'ELAN9009:00 04F3:4067 Touchpad']' returned non-zero exit status 1.
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:Getting Device Enabled via xinput failed
Traceback (most recent call last):
  File "/usr/share/asus_touchpad_numpad-driver/asus_touchpad.py", line 406, in is_device_enabled
    propData = subprocess.check_output(cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xinput', '--list-props', 'ELAN9009:00 04F3:4067 Touchpad']' returned non-zero exit status 1.
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:Getting Device Enabled via xinput failed
Traceback (most recent call last):
  File "/usr/share/asus_touchpad_numpad-driver/asus_touchpad.py", line 406, in is_device_enabled
    propData = subprocess.check_output(cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xinput', '--list-props', 'ELAN9009:00 04F3:4067 Touchpad']' returned non-zero exit status 1.
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:Getting Device Enabled via xinput failed
Traceback (most recent call last):
  File "/usr/share/asus_touchpad_numpad-driver/asus_touchpad.py", line 406, in is_device_enabled
    propData = subprocess.check_output(cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xinput', '--list-props', 'ELAN9009:00 04F3:4067 Touchpad']' returned non-zero exit status 1.
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:Getting Device Enabled via xinput failed
Traceback (most recent call last):
  File "/usr/share/asus_touchpad_numpad-driver/asus_touchpad.py", line 406, in is_device_enabled
    propData = subprocess.check_output(cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xinput', '--list-props', 'ELAN9009:00 04F3:4067 Touchpad']' returned non-zero exit status 1.
Unable to connect to X server
ERROR:asus-touchpad-numpad-driver:Getting Device Enabled via xinput failed
Traceback (most recent call last):
  File "/usr/share/asus_touchpad_numpad-driver/asus_touchpad.py", line 406, in is_device_enabled
    propData = subprocess.check_output(cmd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xinput', '--list-props', 'ELAN9009:00 04F3:4067 Touchpad']' returned non-zero exit status 1.
INFO:asus-touchpad-numpad-driver:Getting Device Enabled via xinput disabled because failed more then: "9" times in row
sanjibukai commented 1 year ago

I also ran with the debug mode by doing the following:

sudo systemctl stop asus_touchpad_numpad@root.service
cd asus-numberpad-driver
LOG=DEBUG sudo -E ./asus_touchpad.py "ux581l" ""

And here is the output:

INFO:asus-touchpad-numpad-driver:Detecting keyboard from string: "N: Name="AT Translated Set 2 keyboard""
INFO:asus-touchpad-numpad-driver:Set keyboard 3 from H: Handlers=sysrq kbd leds event3
INFO:asus-touchpad-numpad-driver:Detecting touchpad from string: "N: Name="ELAN9009:00 04F3:4067 Touchpad""
INFO:asus-touchpad-numpad-driver:Set touchpad device id 2 from S: Sysfs=/devices/pci0000:00/0000:00:15.2/i2c_designware.2/i2c-2/i2c-ELAN9009:00/0018:04F3:4067.0003/input/input20
INFO:asus-touchpad-numpad-driver:Set touchpad id 15 from H: Handlers=mouse4 event15
INFO:asus-touchpad-numpad-driver:Touchpad min-max: x 0-3984, y 0-1152
INFO:asus-touchpad-numpad-driver:Numpad min-max: x 80-3904, y 200-1072
DEBUG:asus-touchpad-numpad-driver:Writting to config file: "<_io.TextIOWrapper name='asus_touchpad_numpad_dev' mode='w' encoding='UTF-8'>"

It seems it still running as the command didn't return (I stopped doing ctrl+c) but nothing happens.. I tried to use the touchpad to see if additional log would be outputted but nothing else appears.

ldrahnik commented 1 year ago

@sanjibukai Please, run command $ cat /proc/bus/input/devices and post output here.

sanjibukai commented 1 year ago

@ldrahnik Hi again.. Here is the output (fairly long, I hope it's okay, otherwise tell me if there is a better way to share outputs (like pastebin etc.)

I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:09/PNP0C09:01/PNP0C0D:01/input/input0
U: Uniq=
H: Handlers=event0 
B: PROP=0
B: EV=21
B: SW=1

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
U: Uniq=
H: Handlers=kbd event1 
B: PROP=0
B: EV=3
B: KEY=10000000000000 0

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
U: Uniq=
H: Handlers=kbd event2 
B: PROP=0
B: EV=3
B: KEY=10000000000000 0

I: Bus=0011 Vendor=0001 Product=0001 Version=ab83
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input3
U: Uniq=
H: Handlers=sysrq kbd leds event3 
B: PROP=0
B: EV=120013
B: KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7

I: Bus=0018 Vendor=04f3 Product=4067 Version=0100
N: Name="ELAN9009:00 04F3:4067"
P: Phys=i2c-ELAN9009:00
S: Sysfs=/devices/pci0000:00/0000:00:15.2/i2c_designware.2/i2c-2/i2c-ELAN9009:00/0018:04F3:4067.0003/input/input14
U: Uniq=
H: Handlers=mouse2 event11 
B: PROP=2
B: EV=1b
B: KEY=400 0 0 0 0 0
B: ABS=3273800000000003
B: MSC=20

I: Bus=0018 Vendor=04f3 Product=4067 Version=0100
N: Name="ELAN9009:00 04F3:4067 UNKNOWN"
P: Phys=i2c-ELAN9009:00
S: Sysfs=/devices/pci0000:00/0000:00:15.2/i2c_designware.2/i2c-2/i2c-ELAN9009:00/0018:04F3:4067.0003/input/input15
U: Uniq=
H: Handlers=event12 
B: PROP=0
B: EV=9
B: ABS=10000000000

I: Bus=0018 Vendor=04f3 Product=4067 Version=0100
N: Name="ELAN9009:00 04F3:4067 UNKNOWN"
P: Phys=i2c-ELAN9009:00
S: Sysfs=/devices/pci0000:00/0000:00:15.2/i2c_designware.2/i2c-2/i2c-ELAN9009:00/0018:04F3:4067.0003/input/input16
U: Uniq=
H: Handlers=event13 
B: PROP=0
B: EV=100001

I: Bus=0018 Vendor=04f3 Product=4067 Version=0100
N: Name="ELAN9009:00 04F3:4067 Stylus"
P: Phys=i2c-ELAN9009:00
S: Sysfs=/devices/pci0000:00/0000:00:15.2/i2c_designware.2/i2c-2/i2c-ELAN9009:00/0018:04F3:4067.0003/input/input17
U: Uniq=
H: Handlers=mouse3 event14 
B: PROP=2
B: EV=1b
B: KEY=c03 0 0 0 0 0
B: ABS=1000d000003
B: MSC=10

I: Bus=0018 Vendor=04f3 Product=4067 Version=0100
N: Name="ELAN9009:00 04F3:4067 Touchpad"
P: Phys=i2c-ELAN9009:00
S: Sysfs=/devices/pci0000:00/0000:00:15.2/i2c_designware.2/i2c-2/i2c-ELAN9009:00/0018:04F3:4067.0003/input/input20
U: Uniq=
H: Handlers=mouse4 event15 
B: PROP=5
B: EV=1b
B: KEY=e520 10000 0 0 0 0
B: ABS=2e0800000000003
B: MSC=20

I: Bus=0018 Vendor=04f3 Product=4064 Version=0100
N: Name="ELAN9008:00 04F3:4064"
P: Phys=i2c-ELAN9008:00
S: Sysfs=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN9008:00/0018:04F3:4064.0002/input/input22
U: Uniq=
H: Handlers=mouse0 event4 
B: PROP=2
B: EV=1b
B: KEY=400 0 0 0 0 0
B: ABS=3273800000000003
B: MSC=20

I: Bus=0018 Vendor=04f3 Product=4064 Version=0100
N: Name="ELAN9008:00 04F3:4064 UNKNOWN"
P: Phys=i2c-ELAN9008:00
S: Sysfs=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN9008:00/0018:04F3:4064.0002/input/input23
U: Uniq=
H: Handlers=event5 
B: PROP=0
B: EV=9
B: ABS=10000000000

I: Bus=0018 Vendor=04f3 Product=4064 Version=0100
N: Name="ELAN9008:00 04F3:4064 UNKNOWN"
P: Phys=i2c-ELAN9008:00
S: Sysfs=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN9008:00/0018:04F3:4064.0002/input/input24
U: Uniq=
H: Handlers=event6 
B: PROP=0
B: EV=100001

I: Bus=0018 Vendor=04f3 Product=4064 Version=0100
N: Name="ELAN9008:00 04F3:4064 Stylus"
P: Phys=i2c-ELAN9008:00
S: Sysfs=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN9008:00/0018:04F3:4064.0002/input/input25
U: Uniq=
H: Handlers=mouse1 event7 
B: PROP=2
B: EV=1b
B: KEY=c03 0 0 0 0 0
B: ABS=1000d000003
B: MSC=10

I: Bus=0018 Vendor=04f3 Product=4064 Version=0100
N: Name="ELAN9008:00 04F3:4064 UNKNOWN"
P: Phys=i2c-ELAN9008:00
S: Sysfs=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN9008:00/0018:04F3:4064.0002/input/input27
U: Uniq=
H: Handlers=event8 
B: PROP=0
B: EV=9
B: ABS=10000000000

I: Bus=0018 Vendor=04f3 Product=4064 Version=0100
N: Name="ELAN9008:00 04F3:4064 UNKNOWN"
P: Phys=i2c-ELAN9008:00
S: Sysfs=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN9008:00/0018:04F3:4064.0002/input/input28
U: Uniq=
H: Handlers=event9 
B: PROP=0
B: EV=9
B: ABS=10000000000

I: Bus=0018 Vendor=04f3 Product=4064 Version=0100
N: Name="ELAN9008:00 04F3:4064 UNKNOWN"
P: Phys=i2c-ELAN9008:00
S: Sysfs=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN9008:00/0018:04F3:4064.0002/input/input29
U: Uniq=
H: Handlers=event10 
B: PROP=0
B: EV=9
B: ABS=10000000000

I: Bus=0018 Vendor=04f3 Product=3101 Version=0100
N: Name="ASUE1406:00 04F3:3101 Mouse"
P: Phys=i2c-ASUE1406:00
S: Sysfs=/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ASUE1406:00/0018:04F3:3101.0005/input/input31
U: Uniq=
H: Handlers=mouse5 event16 
B: PROP=0
B: EV=17
B: KEY=30000 0 0 0 0
B: REL=1943
B: MSC=10

I: Bus=0018 Vendor=04f3 Product=3101 Version=0100
N: Name="ASUE1406:00 04F3:3101 Touchpad"
P: Phys=i2c-ASUE1406:00
S: Sysfs=/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ASUE1406:00/0018:04F3:3101.0005/input/input32
U: Uniq=
H: Handlers=mouse6 event17 
B: PROP=5
B: EV=1b
B: KEY=6420 10000 0 0 0 0
B: ABS=2e0800000000003
B: MSC=20

I: Bus=0018 Vendor=04f3 Product=3101 Version=0100
N: Name="ASUE1406:00 04F3:3101 Keyboard"
P: Phys=i2c-ASUE1406:00
S: Sysfs=/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ASUE1406:00/0018:04F3:3101.0005/input/input33
U: Uniq=
H: Handlers=sysrq kbd leds event18 
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff800000000007ff febeffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=1f

I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/LNXVIDEO:00/input/input34
U: Uniq=
H: Handlers=kbd event19 
B: PROP=0
B: EV=3
B: KEY=3e000b00000000 0 0 0

I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/input/input35
U: Uniq=
H: Handlers=kbd event20 
B: PROP=0
B: EV=3
B: KEY=3e000b00000000 0 0 0

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/devices/platform/pcspkr/input/input36
U: Uniq=
H: Handlers=kbd event21 
B: PROP=0
B: EV=40001
B: SND=6

I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="Asus WMI hotkeys"
P: Phys=asus-nb-wmi/input0
S: Sysfs=/devices/platform/asus-nb-wmi/input/input37
U: Uniq=
H: Handlers=kbd event22 rfkill 
B: PROP=0
B: EV=100013
B: KEY=1000000080000 400000 0 0 0 81606f00900c00 c780027801701000 e000000000000 0
B: MSC=10

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA NVidia HDMI/DP,pcm=3"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input38
U: Uniq=
H: Handlers=event23 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA NVidia HDMI/DP,pcm=7"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input39
U: Uniq=
H: Handlers=event24 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA NVidia HDMI/DP,pcm=8"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input40
U: Uniq=
H: Handlers=event25 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA NVidia HDMI/DP,pcm=9"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input41
U: Uniq=
H: Handlers=event26 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="sof-hda-dsp HDMI/DP,pcm=3"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input42
U: Uniq=
H: Handlers=event27 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="sof-hda-dsp HDMI/DP,pcm=4"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input43
U: Uniq=
H: Handlers=event28 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="sof-hda-dsp HDMI/DP,pcm=5"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input44
U: Uniq=
H: Handlers=event29 
B: PROP=0
B: EV=21
B: SW=140

I: Bus=0003 Vendor=13d3 Product=56eb Version=1964
N: Name="USB2.0 HD UVC WebCam: USB2.0 HD"
P: Phys=usb-0000:00:14.0-9/button
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9:1.0/input/input45
U: Uniq=
H: Handlers=kbd event30 
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0003 Vendor=13d3 Product=56eb Version=1964
N: Name="USB2.0 HD UVC WebCam: USB2.0 IR"
P: Phys=usb-0000:00:14.0-9/button
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9:1.2/input/input46
U: Uniq=
H: Handlers=kbd event31 
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0005 Vendor=054c Product=0df0 Version=0113
N: Name="WH-1000XM5 (AVRCP)"
P: Phys=98:43:fa:94:ff:8d
S: Sysfs=/devices/virtual/input/input50
U: Uniq=
H: Handlers=kbd event257 
B: PROP=0
B: EV=100007
B: KEY=2fc800 145200000000 0 10300 49e800000c00 e16800000000f f810000010000ffc
B: REL=0

I: Bus=0005 Vendor=046d Product=b034 Version=0003
N: Name="MX Master 3S Mouse"
P: Phys=98:43:fa:94:ff:8d
S: Sysfs=/devices/virtual/misc/uhid/0005:046D:B034.0008/input/input51
U: Uniq=d3:27:97:f3:b7:f8
H: Handlers=mouse7 event258 
B: PROP=0
B: EV=17
B: KEY=ffff0000 0 0 0 0
B: REL=1943
B: MSC=10
ldrahnik commented 1 year ago

@sanjibukai You have 2 touchpad devices and this driver was trying to connect to the wrong one. git pull and try install latest master, should be OK for your laptop. Let me know so I can close an issue.

ldrahnik commented 1 year ago

@sanjibukai In case brightness change/activation /deactivation will not work for you but keys you will be able to press, please look at this thread, similar laptop to yours (https://github.com/asus-linux-drivers/asus-numberpad-driver/issues/95), we need to get values which change via I2C the brightness for you. The way how to get these values is by brute forcing all possible values (1-255) to control registry using python file python3 tests/test_brightness.py, also read, in that case, Readme.md file text in troubleshoting and text above Touchpad models heading.

sanjibukai commented 1 year ago

@ldrahnik Wow! It works! Seems I need to tap and hold a few seconds (I guess that's the intended behavior in order to not activate it when using the touchpad I guess, I just never used it on windows lol) The top right "button" (calculator or numpad icon) is switching on the light and then I'm able to input numbers.. And it seems the top left "button" (triangle with dots) is changing the dimming..

I have two questions though:

Many thanks!

ldrahnik commented 1 year ago

@sanjibukai Default activation is press calc icon at least for 1s, configurable. Also is possible to activate/disable NumberPad with a slide gesture with one finger from calc icon on top right corner to the center (30% width & height atleast), then is NumberPad activated immediately.

sanjibukai commented 1 year ago

@ldrahnik Thank you for these detailed explanations! Indeed swiping from the top right corner toward the middle is switching on right away. Regarding the sleep, after a minute or so, only the lights (of the numpad) is turning off, and when I touch the touchpad, the lights does not come back but the touchpad is working as usual.

And, regarding the Calculator, when I do xdotool key XF86Calculator nothing happens.. I tried with controlling the volume e.g. xdotool key XF86AudioRaiseVolume and that correctly triggered the increase of the volume (with the overlay of Gnome etc.)

When I tried to see the input using sudo libinput debug-events, I'm able to switch the numpad with the swipe to the left from the calculator icon, but I don't see the XF86Calculator being triggered: This is what I'm seeing:

...
 event17  POINTER_MOTION          +1.068s    -0.23/ -0.46 ( -1.00/ -2.00)
 event17  POINTER_MOTION          +1.096s    -0.21/ -0.42 ( -1.00/ -2.00)
 event17  GESTURE_HOLD_BEGIN      +2.495s   1
 event17  POINTER_MOTION          +2.503s    -3.25/ -0.89 (-11.00/ -3.00)
 event17  POINTER_MOTION          +2.510s    -1.36/ -0.34 ( -4.00/ -1.00)
 event17  GESTURE_HOLD_END        +2.510s   1 cancelled
 event17  POINTER_MOTION          +2.517s    -1.36/ -0.34 ( -4.00/ -1.00)
 event17  POINTER_MOTION          +2.524s    -1.36/  0.00 ( -4.00/ +0.00)
...

Using an actual media key displays correctly the following for example:

-event3   KEYBOARD_KEY            +4294967.295s KEY_VOLUMEUP (115) pressed
 event3   KEYBOARD_KEY            +0.049s   KEY_VOLUMEUP (115) released

Regarding the xdotool command I can tell I don't have any shortcut setup.. But OTOH, it seems the Calculator key is also not triggering (so I don't know how I can setup a custom shortcut in Gnome settings without triggering the key.. I tried doing the following in the shortcut dialog settings sleep 5 ; xdotool key XF86Calculator (and switching back into the dialog so the triggered key is captured for the shortcut) but it doesn't worked..

sanjibukai commented 1 year ago

Something interesting.. I was able to see some existing custom shortcuts (I guess generated from your install script).. The command is bash /usr/share/asus_touchpad_numpad-driver/scripts/calculator_toggle.sh I looked into that file and here is the content:

#!/bin/bash

if [[ $(ps aux | grep io.elementary.calculator | grep -v grep) ]]; then
    flatpak kill io.elementary.calculator &>/dev/null &
else
    flatpak run io.elementary.calculator &>/dev/null &
fi

Now it makes sebes that this was not working since I don't have that program (even less as a flatpak)..

I replaced it with the following:

#!/bin/bash

if [[ $(ps aux | grep gnome-calculator | grep -v grep) ]]; then
    killall gnome-calculator  &>/dev/null &
else
    gnome-calculator &>/dev/null &
fi

That script now is working, but the shortcut is still not triggering unfortunately..

sanjibukai commented 1 year ago

@ldrahnik Do you know if it's possible to trigger the numpad from the commandline?

Edit: Asking because, I just noticed that the keys above my touchpad (in windows they control the fan, move windows from/to the screenpad, disable the screenpad)... I used the libinput command above and those are regular keys (Launch5 for example).. And I guess I can make a script using one of those key to launch the calculator and switch on at the same time the numpad.. That will be great! I can also do the same (switching on the numpad) for other programs like spreadsheet etc.

ldrahnik commented 1 year ago

@sanjibukai From your install script I see following line: io.elementary.calculator here (that is why was selected elementary calculator - is prioritized atm, in this feature request is planned during install script pick up program when is more calculators installed - not implemented yet). How I detect in install script elementary calculator is installed and flatpack aswell? With this line if [[ $(type flatpak 2>/dev/null && flatpak list | grep io.elementary.calculator 2>/dev/null) ]]; then. It does not work for you?

sanjibukai commented 1 year ago

@ldrahnik Hello and thanks.. Sorry for the confusion, but I somehow fixed the command.. But nothing is triggered actually... In my first message just above, I put the output of the command you told me to run (xdotool key XF86Calculator and libinput debug-events) and it seems the XF86Calculator key is never triggered.. I'm trying to trigger by swiping starting from the top right corner (calculator icon) towards the left.. And around the third of the width the numpad is switching on (so the numpad works) but there is nothing triggered (on libinput nothing shows up)

Also, do you know if it's possible to trigger programmatically the numpad using CLI?

Many thanks!

ldrahnik commented 1 year ago

@sanjibukai

About possibility of activating NumberPad using CLI

# enabling NumberPad via command line
sudo sed -i "s/enabled = 0/enabled = 1/g" asus_touchpad_numpad_dev
sudo sed -i "s/enabled = 0/enabled = 1/g" /usr/share/asus_touchpad_numpad-driver/asus_touchpad_numpad_dev
# disabling
sudo sed -i "s/enabled = 1/enabled = 0/g" asus_touchpad_numpad_dev
sudo sed -i "s/enabled = 1/enabled = 0/g" /usr/share/asus_touchpad_numpad-driver/asus_touchpad_numpad_dev

Tested on latest master.

ldrahnik commented 1 year ago

@sanjibukai

About toggling script for calculator

Please, try the latest master, I hope I fixed all bugs regarding to toggling calculator script. I tried a clean installation for running under root/user and looks like it works. Remember every time when manipulating with keybindings is required at least log out (driver at the end of installation now say that too). Also, I hope I have not missed any point you asked etc. Thank you for letting me know.

sanjibukai commented 1 year ago

Hello @ldrahnik I don't know why but activating the numpad is never triggering the XF86Calculator key event. But indeed with the correct configuration, now I'm able to enable the numpad by doing xdotool key Num_Lock which somehow solve my problem. I just bound one of the physical key to Num_Lock so now it's working (even if I lost one physical key now).

sanjibukai commented 1 year ago

Can you confirm me if activating the numpad (swiping from the calculator icon at the right toward the left) SHOULD send a NumLock event or even a XF86Calculator event? Also, last question, I saw in the configuration file there is also a configuration from swiping from the left (three connected circles icon) toward the right... Does this action should trigger something? If not, is it possible to bind a key to that action? Thanks.

ldrahnik commented 1 year ago

Hello @ldrahnik I don't know why but activating the numpad is never triggering the XF86Calculator key event. But indeed with the correct configuration, now I'm able to enable the numpad by doing xdotool key Num_Lock which somehow solve my problem. I just bound one of the physical key to Num_Lock so now it's working (even if I lost one physical key now).

Slide gestures from top left icon to center is prepared for toggling Calculator, first rows in README, described how can be configurable others key, defaults is key "calc" which Is translated to XF86Calculator key. Top right icon slide gestures does not send Calculator key, only activates NumberPad And send NumLock key when is not already enabled.

Clear?

sanjibukai commented 1 year ago

Thanks (I've missed that in the README.. I'm going to try) Quick question, when I hchange the config file, how can I make the settings to be updated? I tried to stop and restart the service but still not taken into account.. I guess restarting will help..

sanjibukai commented 1 year ago

Just checked and indeed this time, swiping from right is sending a KEY_EVENT (the num_lock key).. I remember a couple of days ago it was not the case (log above).

But now I tried with the left side, and indeed there is still no KEY_EVENT triggered. I did reset the gsettings as you can see:

$gsettings set org.gnome.settings-daemon.plugins.media-keys calculator [\'\']
$ gsettings set org.gnome.settings-daemon.plugins.media-keys calculator-static [\'\']
$gsettings get org.gnome.settings-daemon.plugins.media-keys calculator-static
['']
$gsettings get org.gnome.settings-daemon.plugins.media-keys calculator
['']

Doing one of the following launch correctly the calculator:

xdotool key XF86Calculator 
sudo bash /usr/share/asus_touchpad_numpad-driver/scripts/calculator_toggle.sh
# -> Here I modified the script to manage gnome-calculator

But the left swipe is still doing nothing..

As there is nothing shown in sudo libinput debug-events I wonder if it's because simply nothing is triggered?

(Again many thanks for the follow up)

ldrahnik commented 1 year ago

@sanjibukai

Quick question, when I hchange the config file, how can I make the settings to be updated? I tried to stop and restart the service but still not taken into account.. I guess restarting will help..

How do you change the config file? Which value is not changed immediately? How do you change config file? In the driver is implemented inotify which should load config changes immediately. (git pull latest master is necessary). Example below works for me:

# installed as 
$ sudo bash ./install.sh

# enabling NumberPad via command line
# debugging in repository
sudo sed -i "s/enabled = 0/enabled = 1/g" asus_touchpad_numpad_dev
# installed config file
sudo sed -i "s/enabled = 0/enabled = 1/g" /usr/share/asus_touchpad_numpad-driver/asus_touchpad_numpad_dev

# disabling (the same)
sudo sed -i "s/enabled = 1/enabled = 0/g" asus_touchpad_numpad_dev
sudo sed -i "s/enabled = 1/enabled = 0/g" /usr/share/asus_touchpad_numpad-driver/asus_touchpad_numpad_dev

# installed as --user
$ sudo bash ./install.sh --user (the same as above but without sudo)

sed -i "s/enabled = 0/enabled = 1/g" asus_touchpad_numpad_dev
...

When you install the driver again, is installed correct script for the calculator? I mean for gnome. In case you do not have installed flatpak and io.elementary.calculator under flatpak. Should be. Try latest master.

For running the calculator toggle script you should run bash script as non sudo in both cases (installed as root and even as user):

bash /usr/share/asus_touchpad_numpad-driver/scripts/calculator_toggle.sh

image

Just checked and indeed this time, swiping from right is sending a KEY_EVENT (the num_lock key).. I remember a couple of days ago it was not the case (log above).

NumLock Key is not send when is system NumLock already enabled before activation.

When listening events via $ sudo libinput debug-events you should see default key KEY_CALC (configurable) for slide gesture from top left icon (works only when is NumberPad enabled):

$ sudo libinput debug-events
...
-event22  KEYBOARD_KEY            +9.067s   KEY_CALC (140) pressed
 event22  KEYBOARD_KEY            +9.067s   KEY_CALC (140) released
...

(Again many thanks for the follow up)

Np. You are pushing the driver forward. Of course, you can buy me coffee or beer.

ldrahnik commented 1 year ago

@sanjibukai More about changing values in config for example when is connected external keyboard, is installed by default udev script which uses sed for changing config values aswell. Tested now and it works. Not connected external keyboard, you can activate NumberPad with xdotool key Num_Lock, with connected external keyboard you can not activate NumberPad via pressing NumLock physical key. Link to doc.

ldrahnik commented 1 year ago

@sanjibukai ping

ldrahnik commented 1 year ago

@sanjibukai Can be reopened.