tuxedocomputers / tuxedo-control-center

A tool to help you control performance, energy, fan and comfort settings on TUXEDO laptops.
GNU General Public License v3.0
506 stars 67 forks source link

Issue when updating to 2.0.4 on Ubuntu 22.04: `failed to write 'change' to '/sys/devices/virtual/input/input16/uevent'` #295

Open mic-kul opened 1 year ago

mic-kul commented 1 year ago

Hi, I'm trying to update tuxedo-control-center to v. 2.0.4 on my Ubuntu 22.04 on Tuxedo Pulse 14 and getting the following error:

tuxedo-control-center is already the newest version (2.0.4).
0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 1 nieaktualizowanych.
1 nie w pełni zainstalowanych lub usuniętych.
Po tej operacji zostanie dodatkowo użyte 0 B miejsca na dysku.
Kontynuować? [T/n] T
Konfigurowanie pakietu tuxedo-control-center (2.0.4) ...
ln: failed to create symbolic link '/usr/bin/tuxedo-control-center': File exi
sts
mv: cannot stat '/opt/tuxedo-control-center/resources/dist/tuxedo-control-cen
ter/data/dist-data/99-webcam.rules': No such file or directory
input16: Failed to write 'change' to '/sys/devices/virtual/input/input16/ueve
nt': Cannot allocate memory
dpkg: błąd przetwarzania pakietu tuxedo-control-center (--configure):
 podproces zainstalowany pakiet tuxedo-control-center skrypt post-installatio
n zwrócił kod błędu 1
Wystąpiły błędy podczas przetwarzania:
 tuxedo-control-center
E: Sub-process /usr/bin/dpkg returned an error code (1)

Tried creating dummy 99-webcam.rules but then it fails on nput16: Failed to write 'change' to '/sys/devices/virtual/input/input16/uevent': Cannot allocate memory and I have no idea how to resolve or workaround that.

tux:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:    22.04
Codename:   jammy
peter-englmaier commented 1 year ago

I am having the same problem, just the device is slightly different. The errors shows up during the configuration step:

# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up tuxedo-control-center (2.0.5) ...
ln: failed to create symbolic link '/usr/bin/tuxedo-control-center': File exists
mv: cannot stat '/opt/tuxedo-control-center/resources/dist/tuxedo-control-center/data/dist-data/99-webcam.rules': No such file
 or directory
input40: Failed to write 'change' to '/sys/devices/virtual/input/input40/uevent': Cannot allocate memory
dpkg: error processing package tuxedo-control-center (--configure):
 installed tuxedo-control-center package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 tuxedo-control-center
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is a tuxedo BC1510 laptop with Ubuntu 22.04.02. Kernel:

# uname -a
Linux tuxedo 6.2.0-10005-tuxedo #5 SMP PREEMPT_DYNAMIC Wed Mar 22 12:42:40 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
peter-englmaier commented 1 year ago

Just installed tuxedo-control-center (2.0.7) and still get the same problem.

Zekromaster commented 1 year ago

Can confirm, I also get such error on an XP1610, using Tuxedo OS based on Ubuntu 22.04.

peter-englmaier commented 1 year ago

@tuxedochris Can you please assign somebody to his ticket? It seems to be ignored. Thanks!

peter-englmaier commented 1 year ago

This is how I "fixed" the problem in my ubuntu 22.04 system:

  1. comment out or delete the last two lines in /var/lib/dpkg/info/tuxedo-control-center.postinst, like this:
    # set up udev rules
    #mv ${DIST_DATA}/99-webcam.rules /etc/udev/rules.d/99-webcam.rules
    #udevadm control --reload-rules && udevadm trigger
  2. do apt upgrade - and the error message should be gone.

Likely, the next tuxedo-control-center will break my system again.

  1. To prevent this, hold the package (but watch out for security updates for this package) with: apt-mark hold tuxedo-control-center
tuxedoder commented 6 months ago

I wasn't able to reproduce this error. Are there any virtual or external devices? If I go into /sys/devices/virtual/input I only see mice and the logs I see here mention input16 and input40. sudo udevadm control --reload-rules && sudo udevadm trigger just reload udev rules and shouldn't fail. If just running this returns an error, then there might be something wrong with the system regarding udev rules. The move command failing implies that tcc data was not copied properly. The file exists for me at /opt/tuxedo-control-center/resources/dist/tuxedo-control-center/data/dist-data/99-webcam.rules prior to moving.

If the manual reload of udev rules works, the solution may be to run apt purge and then apt install for tcc. Otherwise it may be related to faulty udev rules which are not related to tcc.

peter-englmaier commented 6 months ago

Hi @tuxedoder, yes, I do have another device:

$ ls /sys/devices/virtual/input
input44  mice

I guess the name is dynamic and I may even have situations with even more input devices connected.

This is what happens:

$ sudo udevadm control --reload-rules && sudo udevadm trigger
input44: Failed to write 'change' to '/sys/devices/virtual/input/input44/uevent': Cannot allocate memory

How can I find the faulty udev rule? There is only one, which mentions 'input' below /etc/udev:

# cat /etc/udev/rules.d/50-ica-mtch.rules
KERNEL=="event[0-9]*", SUBSYSTEM=="input", TAG+="uaccess"

When I remove this file, the error in udevadm trigger does not go away.