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
486 stars 63 forks source link

Error starting tccd: "Pkg: Error reading from file." #376

Closed t-taylor closed 2 months ago

t-taylor commented 3 months ago

Tuxedo Pulse 14 gen 3 running arch with 6.8.2-zen2-1-zen with tcc 2.1.7

When running tccd from systemd or cli root or user, it always returns the error: Pkg: Error reading from file.

Tried running with --start, --stop & --version. As a result the control center also fails with some arbitrary message, but basically saying that tccd isn't running.

t-taylor commented 3 months ago

My best guess why this is happening is because this config handler object gets instantiated in the main method before anything gets run, and doesn't handle files not being there. (Which is why passing --version as a arg doesn't print the version)

https://github.com/tuxedocomputers/tuxedo-control-center/blob/master/src/service-app/classes/TuxedoControlCenterDaemon.ts#L85

I've tried creating the files associated with the constants passed into that config object, but there is no change in the behavior.

https://github.com/tuxedocomputers/tuxedo-control-center/blob/3006a3a4df7baeeb5a9abe817a94358ae2f903eb/src/common/classes/TccPaths.ts#L25-L32

OrestisTzourmpakis commented 3 months ago

same issue for me

t-taylor commented 3 months ago

After looking a little more into the error message: the Pkg: part of the message is referring to the packaging lib https://github.com/vercel/pkg. Searching round github for similar issues, there's two that stand out: https://github.com/getsolus/packages/issues/940 & https://github.com/emacs-eask/cli/issues/215.

To try and see if it is an issue with the packaging I've tried to build the package from source but since it uses an ancient nodejs version & I'm generally not familiar with any js stuff I've been having trouble.

dimitarkolevdtd commented 3 months ago

+1 on the Stellaris 17, on a fresh Arch Linux install. I am currently running linux-zen, but I have the same issue on both linux and linux-lts too.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.2-zen2-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 32 × 13th Gen Intel® Core™ i9-13900HX
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: TUXEDO
Product Name: TUXEDO Stellaris Intel Gen5
arwie commented 3 months ago

Same on my Gemini 16 with Arch Linux after last system update.

/opt/tuxedo-control-center/resources/dist/tuxedo-control-center/data/service/tccd --start
Pkg: Error reading from file.

tuxedo-control-center-bin 2.1.8-1

arwie commented 3 months ago

Reverting to tuxedo-control-center-bin 2.1.7 does not solve the problem

jacobrsv commented 3 months ago

Experiencing the same here on the Pulse 14 Gen3, running Archlinux, KDE Plasma 6

Apr 04 19:26:38 pulse systemd[1]: tccd.service: Main process exited, code=exited, status=1/FAILURE
Apr 04 19:26:38 pulse systemd[1]: tccd.service: Failed with result 'exit-code'.

Seems like more people are having the same problem with the package from AUR

jacobrsv commented 3 months ago

Extracted the deb file for Ubuntu https://deb.tuxedocomputers.com/ubuntu/tuxedo-control-center.deb and replaced /opt/tuxedo-control-center Screenshot_20240404_193926

Now it seems to work, so maybe there is something wrong with the rpm package?

FreeFull commented 2 months ago

Seems like the problem has been found: makepkg has been truncating the tccd executable. The PKGBUILD has been updated to work around the issue.

t-taylor commented 2 months ago

Seems to be working on mine with the new PKGBUILD. Nice job 👍 I'll wait for a few others to confirm this is fixed for them as well and then I'll close the issue

arwie commented 2 months ago

Seems to be working on mine with the new PKGBUILD. Nice job 👍 I'll wait for a few others to confirm this is fixed for them as well and then I'll close the issue

Works for me too!

dimitarkolevdtd commented 2 months ago

Seems like the issue was fixed.

crissi-tuxedo commented 2 months ago

yep it was an issue with the makepkg script that seems to truncate binaries when you don't specify !debug in the options. As it's not an issue with TCC I opened an Issue on arch linux gitlab and hopefully they will resolve it.

Until then it might be nessesary to use !debug in the options of your PKGBUILDs.

it mostly happened in fresh / untouched Arch installs, where users have not modified the makepkg.conf file to customize their building of AUR packages and for one of my colleagues who had this file customized this problem did not occur...

But like I said: Arch devs turn to fix it :)

best regards, Crissi