chestm007/linux_thermaltake_riing

Systemd script points to a non correct destination for ubuntu

Opened this issue · 6 comments

Hello,

I found a bug in the systemd script.

in ubuntu, I installed the driver with the sudo pip3 way

And followed the tutorial to have an automatic start with systemd.

There's 2 bugs. One must copy the systemd file to /etc/systemd/system folder

And activate with systemctl enable linux-thermaltake-rgb

But the original file points to /usr/bin/linux-thermaltake-rgb
I corrected the line by this : ExecStart=/usr/bin/python3 /usr/local/bin/linux-thermaltake-rgb.
And the driver starts automatically. Did a systemctl daemon reload and systemctl enable linux-thermaltake-rgb before the restart.

Regards,

thanks for the bug report!

in regards to the first bug, the readme says to copy the systemd service to /usr/lib/systemd/system/ - as i understand it this is where the default systemd service files are meant to go.

The second issue i dont have a good solution too. I dont understand ubuntu's(and possibly debian's) reasoning for putting python scripts in /usr/local/bin but i dont know of a great way to support /usr/bin (arch linux) and /usr/local/bin/

the best way to handle both of these might be for someone to create a debian package or something...

suggestions and PR's are more then welcome

@s7relok , can you elaborate a little on what you did to get this to work? I am coming over from an arch linux based distro to ubuntu and am having an issue getting it to work. Did you have to move a config file anywhere?

When I run the file directly to try and correct for the architecture mismatch between the 2, I get this error:

Command:
python3 /usr/local/bin/linux-thermaltake-rgb

Output:
initializing thermaltake rgb daemon
Traceback (most recent call last):
File "/usr/local/bin/linux-thermaltake-rgb", line 10, in
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/linux_thermaltake_rgb/daemon/main.py", line 32, in main
daemon = ThermaltakeDaemon()
File "/usr/local/lib/python3.7/dist-packages/linux_thermaltake_rgb/daemon/daemon.py", line 36, in init
self.config = Config()
File "/usr/local/lib/python3.7/dist-packages/linux_thermaltake_rgb/daemon/config.py", line 47, in init
config = self.load_config()
File "/usr/local/lib/python3.7/dist-packages/linux_thermaltake_rgb/daemon/config.py", line 51, in load_config
with open('{}/{}'.format(self.config_dir, self.config_file_name)) as cfg:
AttributeError: 'Config' object has no attribute 'config_dir'

I have a similar issue. I am using Ubuntu 18.04 and running the service and changing the config file does not change my fan settings or lighting. This holds after a reboot as well. I'm happy to provide any additional info.

Same as Cole, only on 19.04.

Edit: Well thats crazy. I ran this sudo /usr/bin/python3 /usr/local/bin/linux-thermaltake-rgb randomly for about the millionth time and suddenly I have working fans and fan controller. Just bumped the speed up to 100 to see how fast they go and I am feeling an appreciable breeze several feet away from my rig. Been messing around with the fan settings and its awesome to finally have control over the lighting effects. Thanks for this!

thank you this helped me out on ubuntu.

Hello everyone
I'm currently on ubuntu 20.10 and can't find a solution to start the service.
Could you help me please.

➜ ~ sudo service linux-thermaltake-rgb status

● linux-thermaltake-rgb.service
Loaded: loaded (/etc/systemd/system/linux-thermaltake-rgb.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2021-03-06 16:45:14 CET; 2s ago
Process: 584335 ExecStart=/usr/local/bin/linux_thermaltake_rgb (code=exited, status=203/EXEC)
Main PID: 584335 (code=exited, status=203/EXEC)
➜ ~ sudo service linux-thermaltake-rgb start

➜ ~ ls /usr/local/bin/linux_thermaltake_rgb

classified_object.py daemon drivers.py globals.py lighting_manager.py
controllers.py devices fan_manager.py init.py pycache