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
522 stars 69 forks source link

Crash at startup #315

Closed Davidsastresas closed 1 year ago

Davidsastresas commented 1 year ago

Hello, I had this working nicely for almost a year, I recently updated to latest version, building from source, and now it crashes at boot up. Some window appears a few seconds but then it dissapears.

I get same result with package installed using ubuntu repositories, and the same result using your prebuilt .deb packages.

when I run it as npm run start or start-watch I can not see any output that could give any hint.

Can anybody give me a hint of how to keep debugging this? thanks!

Davidsastresas commented 1 year ago

I reinstalled and it seems I now have output when running npm run start, in case that gives any hint:

(node:50159) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'on' of undefined at TccDBusController.onModeReapplyPendingChanged (/home/sas/tuxedo-control-center/dist/tuxedo-control-center/e-app/common/classes/TccDBusController.js:357:24) at /home/sas/tuxedo-control-center/dist/tuxedo-control-center/e-app/e-app/main.js:180:13 at Generator.next () at fulfilled (/home/sas/tuxedo-control-center/node_modules/tslib/tslib.js:164:62) (Use electron --trace-warnings ... to show where the warning was created) (node:50159) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:50159) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

(electron:50159): Gtk-WARNING **: 03:53:26.430: Theme file for DMZ-White has no directories

tuxedoxt commented 1 year ago

Hello, sounds weird, could you provide the output of

journalctl -u tccd -n 30
Davidsastresas commented 1 year ago

Sure! Here it is:

journalctl -u tccd -n 30 -- Logs begin at Fri 2023-03-31 03:00:18 CEST, end at Fri 2023-08-04 11:58:05 CEST. -- Aug 02 16:15:30 sas-PC systemd[1]: Started TUXEDO Control Center Service. Aug 02 16:15:30 sas-PC tccd[1004]: Starting daemon v2.0.8 (node: v14.20.0 arch: x64) Aug 02 16:15:30 sas-PC tccd[1004]: tuxedo-io ver 0.3.6 [ interface: uniwill ] Aug 02 16:15:30 sas-PC tccd[1004]: Additional ycbcr420Workaround card in settings Aug 02 16:15:30 sas-PC tccd[1004]: Additional ycbcr420Workaround port in settings Aug 02 16:15:30 sas-PC tccd[1004]: Additional ycbcr420Workaround port in settings Aug 02 16:15:30 sas-PC tccd[1004]: Additional ycbcr420Workaround port in settings Aug 02 16:15:30 sas-PC tccd[1004]: Missing ycbcr420Workaround port in settings Aug 02 16:15:30 sas-PC tccd[1004]: Missing ycbcr420Workaround port in settings Aug 02 16:15:30 sas-PC tccd[1004]: Filled missing settings with default: /etc/tcc/settings Aug 02 16:15:30 sas-PC tccd[1004]: Applied charging profile 'stationary' Aug 02 16:15:30 sas-PC tccd[1004]: Detected no keyboard backlight Aug 02 16:15:30 sas-PC tccd[1004]: Could not find keyboard backlight. Retrying... Aug 02 16:15:30 sas-PC tccd[1004]: Daemon started Aug 02 16:15:31 sas-PC tccd[1004]: Detected no keyboard backlight Aug 02 16:15:31 sas-PC tccd[1004]: Could not find keyboard backlight. Retrying... Aug 02 16:15:37 sas-PC tccd[1004]: Detected no keyboard backlight Aug 02 16:15:37 sas-PC tccd[1004]: Could not find keyboard backlight. Retrying... Aug 02 16:15:38 sas-PC tccd[1004]: Detected no keyboard backlight Aug 02 16:15:38 sas-PC tccd[1004]: Could not find keyboard backlight. Retrying... Aug 02 16:15:39 sas-PC tccd[1004]: Detected no keyboard backlight Aug 02 16:15:39 sas-PC tccd[1004]: Could not find keyboard backlight. Retrying... Aug 02 16:15:40 sas-PC tccd[1004]: Detected no keyboard backlight Aug 02 15:24:52 sas-PC systemd[1]: Stopping TUXEDO Control Center Service... Aug 02 15:24:52 sas-PC tccd[77962]: Stopping daemon.. Aug 02 15:24:52 sas-PC tccd[1004]: SIGINT - Exiting Aug 02 15:24:52 sas-PC tccd[1004]: DisplayBacklightWorker: Save display brightness 60% (57600) on exit Aug 02 15:24:52 sas-PC tccd[77962]: Daemon is stopped Aug 02 15:24:52 sas-PC systemd[1]: tccd.service: Succeeded. Aug 02 15:24:52 sas-PC systemd[1]: Stopped TUXEDO Control Center Service.

Davidsastresas commented 1 year ago

I uninstall everything completely and tried to reinstall using ubuntu apt install. It seems there is some issue with tuxedo-keyboard. The make logs shows the following:

DKMS make.log for tuxedo-keyboard-3.2.9 for kernel 5.15.0-60-generic (x86_64) Tue 08 Aug 2023 07:47:51 PM CEST make -C /lib/modules/5.15.0-60-generic/build M=/var/lib/dkms/tuxedo-keyboard/3.2.9/build modules make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. make[1]: Entering directory '/usr/src/linux-headers-5.15.0-60-generic' CC [M] /var/lib/dkms/tuxedo-keyboard/3.2.9/build/./src/tuxedo_keyboard.o In file included from /var/lib/dkms/tuxedo-keyboard/3.2.9/build/./src/clevo_keyboard.h:24, from /var/lib/dkms/tuxedo-keyboard/3.2.9/build/./src/tuxedo_keyboard.c:22: /var/lib/dkms/tuxedo-keyboard/3.2.9/build/./src/clevo_leds.h: In function ‘clevo_leds_suspend’: /var/lib/dkms/tuxedo-keyboard/3.2.9/build/./src/clevo_leds.h:420:2: error: label at end of compound statement 420 | default: | ^~~ /var/lib/dkms/tuxedo-keyboard/3.2.9/build/./src/clevo_leds.h: In function ‘clevo_leds_resume’: /var/lib/dkms/tuxedo-keyboard/3.2.9/build/./src/clevo_leds.h:433:2: error: label at end of compound statement 433 | default: | ^~~ make[2]: [scripts/Makefile.build:297: /var/lib/dkms/tuxedo-keyboard/3.2.9/build/./src/tuxedo_keyboard.o] Error 1 make[1]: [Makefile:1904: /var/lib/dkms/tuxedo-keyboard/3.2.9/build] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-60-generic' make: *** [Makefile:29: all] Error 2

which is very weird. Is my kernel not supported? Thanks!

munix9 commented 1 year ago

see https://github.com/tuxedocomputers/tuxedo-keyboard/issues/185 and https://github.com/tuxedocomputers/tuxedo-keyboard/pull/187

MacNetron commented 1 year ago

I've got something similar. Not sure if to hop on this issue or to open a new one. Anyway, when trying to open the tuxedo control center, it opens and then it dissappears as well. This used to work.

From the journalctl but going back some more time:

Jul 13 20:08:26 balrog systemd[1]: Started TUXEDO Control Center Service.
Jul 13 20:08:26 balrog tccd[1019]: Starting daemon v1.1.2 (node: v10.15.3 arch: x64)
Jul 13 20:08:26 balrog tccd[1019]: tuxedo-io ver 0.3.2 [ interface: clevo_acpi ]
Jul 13 20:08:26 balrog tccd[1019]: Set display brightness to 46% (11040) on intel_backlight
Jul 13 20:08:27 balrog tccd[1019]: Set webcam status ON
Jul 13 20:08:28 balrog tccd[1019]: Set ODM profile 'performance'
Jul 13 20:08:28 balrog tccd[1019]: Daemon started

Jul 14 00:22:56 balrog systemd[1]: Stopping TUXEDO Control Center Service...
Jul 14 00:22:56 balrog tccd[50783]: Stopping daemon..
Jul 14 00:22:56 balrog tccd[1019]: SIGINT - Exiting
Jul 14 00:22:56 balrog tccd[1019]: DisplayBacklightWorker: Save display brightness 46% (11040) on exit
Jul 14 00:22:57 balrog tccd[50783]: Daemon is stopped
Jul 14 00:22:57 balrog systemd[1]: tccd.service: Deactivated successfully.
Jul 14 00:22:57 balrog systemd[1]: Stopped TUXEDO Control Center Service.
Jul 14 00:22:57 balrog systemd[1]: tccd.service: Consumed 11min 54.631s CPU time.

I had fancontrol and keyboard lighting/colors at that time.

From today:

-- Boot 0b0018ad8a424ce5baa9d613b7763028 --
Aug 09 08:57:14 balrog systemd[1]: Started TUXEDO Control Center Service.
Aug 09 08:57:14 balrog tccd[1019]: Starting daemon v1.1.2 (node: v10.15.3 arch: x64)
Aug 09 08:57:14 balrog tccd[1019]: No tuxedo-io found on start
Aug 09 08:57:14 balrog tccd[1019]: Set display brightness to 46% (11040) on intel_backlight
Aug 09 08:57:14 balrog tccd[1019]: Daemon started
Aug 09 08:57:15 balrog tccd[1019]: FanControlWorker: Control unavailable

Aug 09 18:44:10 balrog systemd[1]: Stopping TUXEDO Control Center Service...
Aug 09 18:44:10 balrog tccd[127656]: Stopping daemon..
Aug 09 18:44:10 balrog tccd[1019]: SIGINT - Exiting
Aug 09 18:44:10 balrog tccd[1019]: DisplayBacklightWorker: Save display brightness 46% (11040) on exit
Aug 09 18:44:11 balrog tccd[127656]: Daemon is stopped
Aug 09 18:44:11 balrog systemd[1]: tccd.service: Deactivated successfully.
Aug 09 18:44:11 balrog systemd[1]: Stopped TUXEDO Control Center Service.
Aug 09 18:44:11 balrog systemd[1]: tccd.service: Consumed 4min 1.436s CPU time.

And no keyboard lighting colors switching.

I am able to start the tuxedo control center by: tuxedo-control-center --in-process-gpu but then indeed there is no fan control.

Also, trying to make clean && make from the sources of tuxedo-keyboard gives an error in the make.log

➜  ~/Workspaces/sources/tuxedo-keyboard git:(release) ✗ cat /var/lib/dkms/tuxedo-keyboard/3.0.9/build/make.log
DKMS make.log for tuxedo-keyboard-3.0.9 for kernel 6.4.6-76060406-generic (amd64)
Wed  9 Aug 21:12:21 CEST 2023
make -C /lib/modules/6.4.6-76060406-generic/build M=/var/lib/dkms/tuxedo-keyboard/3.0.9/build modules
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/usr/src/linux-headers-6.4.6-76060406-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
  CC [M]  /var/lib/dkms/tuxedo-keyboard/3.0.9/build/./src/tuxedo_keyboard.o
  CC [M]  /var/lib/dkms/tuxedo-keyboard/3.0.9/build/./src/clevo_wmi.o
  CC [M]  /var/lib/dkms/tuxedo-keyboard/3.0.9/build/./src/clevo_acpi.o
/var/lib/dkms/tuxedo-keyboard/3.0.9/build/./src/clevo_acpi.c:183:27: error: initialization of ‘void (*)(struct acpi_device *)’ from incompatible pointer type ‘int (*)(struct acpi_device *)’ [-Werror=incompatible-pointer-types]
  183 |                 .remove = clevo_acpi_remove,
      |                           ^~~~~~~~~~~~~~~~~
/var/lib/dkms/tuxedo-keyboard/3.0.9/build/./src/clevo_acpi.c:183:27: note: (near initialization for ‘clevo_acpi_driver.ops.remove’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:252: /var/lib/dkms/tuxedo-keyboard/3.0.9/build/./src/clevo_acpi.o] Error 1
make[1]: *** [Makefile:2038: /var/lib/dkms/tuxedo-keyboard/3.0.9/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.4.6-76060406-generic'
make: *** [Makefile:29: all] Error 2

Which is exactly an error on the clevo_acpi interface that is missing in the tuxedo-io ??

Again, not sure how things relate to each other and if I'm posting at the correct spot.

tuxedoxt commented 1 year ago

Hello,

https://github.com/tuxedocomputers/tuxedo-keyboard/pull/187 is merged and in latest release (v3.2.10).

Please try the official packages again.

Davidsastresas commented 1 year ago

Hello,

tuxedocomputers/tuxedo-keyboard#187 is merged and in latest release (v3.2.10).

Please try the official packages again.

I just tested, installing from ubuntu from tuxedo ppa, and I can confirm it works for me now.

Thank you very much for the quick solution!

tuxedoxt commented 1 year ago

Great, thanks for confirming!

MacNetron commented 1 year ago

Same for me! Works nicely. The journal report indicates no errors anymore.

Thank you very much! The sound of silence is unbelievable now the Tuxedo Control Center correctly controls the fans of my laptop again :) (and the coloring of the keyboard)