Package Details: linux-thermaltake-rgb 0.2.0-1

Git Clone URL: https://aur.archlinux.org/linux-thermaltake-rgb.git (read-only, click to copy)
Package Base: linux-thermaltake-rgb
Description: Python usb daemon and controller for thermaltake rgb watercooling devices
Upstream URL: https://github.com/chestm007/linux_thermaltake_riing
Licenses: GPL2
Submitter: chestm007
Maintainer: chestm007
Last Packager: chestm007
Votes: 2
Popularity: 0.000000
First Submitted: 2018-12-02 10:42 (UTC)
Last Updated: 2019-03-06 11:03 (UTC)

Latest Comments

mleivagomez commented on 2024-04-29 21:38 (UTC)

Amending my previous comment as Python 3.12 has since been released...

The file to edit now is in /usr/lib/python3.12/site-packages/linux_thermaltake_rgb/daemon/config.py

Line is line 42 at this point.

As before,

config = yaml.load(cfg)

must become

config = yaml.full_load(cfg)

mleivagomez commented on 2023-05-08 02:33 (UTC)

Since it's been a while since this package has been updated by the maintainer, I'd like to point out that yaml.load(cfg) no longer properly loads the configuration for the daemon. You may have had issues with this if you got the error:

TypeError: load() missing 1 required positional argument: 'Loader'

This can be rectified by simply editing /usr/lib/python3.11/linux_thermaltake_rgb/daemon/config.py on line 41 so that

config = yaml.load(cfg)

Becomes

config = yaml.full_load(cfg)

As of more recent versions of pyyaml, load() no longer takes one single argument.

The active version on the master branch last edited 9 months ago works just fine as he introduces two arguments (cfg, yaml.FullLoader) to yaml.load().

Either what the developer did or what I did is in essence fine.

insanemal commented on 2022-03-14 04:47 (UTC)

I've forked the repo and added the required YAML fix.

This fixes my issues with my hardware. Lighting and fan control now work

https://github.com/insanemal/linux_thermaltake_riing/releases/tag/0.2.1

Feel free to look at my fork. I've only one commit with the YAML fixes.

Probably time to switch to a fixed fork as it looks like the actual project is abandoned.

Ayy-Zee commented on 2020-06-09 13:39 (UTC) (edited on 2020-06-09 13:42 (UTC) by Ayy-Zee)

I assume I am using the G3 controller. I get this in dmesg when I unplug and replug it:


    [13735.045764] usb 1-7: new high-speed USB device number 11 using xhci_hcd
    [13735.194382] usb 1-7: New USB device found, idVendor=0424, idProduct=2512, bcdDevice= b.b3
    [13735.194385] usb 1-7: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [13735.201411] hub 1-7:1.0: USB hub found
    [13735.204371] hub 1-7:1.0: 2 ports detected
    [13735.515770] usb 1-7.1: new full-speed USB device number 12 using xhci_hcd
    [13735.865451] usb 1-7.1: New USB device found, idVendor=264a, idProduct=2135, bcdDevice= 0.02
    [13735.865454] usb 1-7.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [13735.865456] usb 1-7.1: Product:                     
[13735.865457] usb 1-7.1: Manufacturer:
[13735.900580] hid-generic 0003:264A:2135.0008: hiddev3,hidraw6: USB HID v1.11 Device [ ] on usb-0000:03:00.0-7.1/input0
And I get a crap ton of these in demsg:

    [13918.248997] audit: type=1131 audit(1591735402.998:1228): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=linux-thermaltake-rgb comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    [13918.248999] audit: type=1130 audit(1591735402.998:1229): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=linux-thermaltake-rgb comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
    [13918.538912] audit: type=1131 audit(1591735403.288:1230): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=linux-thermaltake-rgb comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
They are still fillling up even after disabling the daemon.

After installing numpy and gobject through either pacman or pip without root(first mistake), When trying to run the daemon through systemd using the command:

systemctl enable --now linux-thermaltake-rgb

as root

and checking with systemctl status linux-thermaltake-rgb

the following output is given:


    ● linux-thermaltake-rgb.service
        Loaded: loaded (/usr/lib/systemd/system/linux-thermaltake-rgb.service; enabled; vendor preset: disabled)
        Active: activating (auto-restart) (Result: exit-code) since Wed 2020-06-10 04:21:46 +08; 3s ago
        Process: 28073 ExecStart=/usr/bin/linux-thermaltake-rgb (code=exited, status=1/FAILURE)
    Main PID: 28073 (code=exited, status=1/FAILURE)
When trying to run only the program regardless of root or not, this output is given:

    /usr/lib/python3.8/site-packages/linux_thermaltake_rgb/daemon/config.py:42: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    config = yaml.load(cfg)
    initializing FullLightingEffect light controller
    Traceback (most recent call last):
    File "/usr/bin/linux-thermaltake-rgb", line 11, in <module>
        load_entry_point('linux-thermaltake-rgb==0.2.0', 'console_scripts', 'linux-thermaltake-rgb')()
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/daemon/main.py", line 32, in main
        daemon = ThermaltakeDaemon()
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/daemon/daemon.py", line 46, in init
        self.controllers[controller['unit']] = controller_factory(controller['type'], controller['unit'])
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/controllers.py", line 37, in controller_factory
        return ThermaltakeG3Controller(unit)
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/controllers.py", line 10, in init
        self.init()
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/controllers.py", line 27, in init
        self.driver = drivers.ThermaltakeG3ControllerDriver(self.unit)
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/drivers.py", line 32, in init
        self._initialize_device()
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/drivers.py", line 38, in _initialize_device
        self.device.reset()
    AttributeError: 'NoneType' object has no attribute 'reset'
After editing the source and using the non-deprecated method of loading the yaml file, this output shows:

    initializing FullLightingEffect light controller
    Traceback (most recent call last):
    File "/usr/bin/linux-thermaltake-rgb", line 11, in <module>
        load_entry_point('linux-thermaltake-rgb==0.2.0', 'console_scripts', 'linux-thermaltake-rgb')()
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/daemon/main.py", line 32, in main
        daemon = ThermaltakeDaemon()
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/daemon/daemon.py", line 46, in init
        self.controllers[controller['unit']] = controller_factory(controller['type'], controller['unit'])
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/controllers.py", line 37, in controller_factory
        return ThermaltakeG3Controller(unit)
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/controllers.py", line 10, in init
        self.init()
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/controllers.py", line 27, in init
        self.driver = drivers.ThermaltakeG3ControllerDriver(self.unit)
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/drivers.py", line 32, in init
        self._initialize_device()
    File "/usr/lib/python3.8/site-packages/linux_thermaltake_rgb/drivers.py", line 38, in _initialize_device
        self.device.reset()
    AttributeError: 'NoneType' object has no attribute 'reset'
ok. after fiddeling around a bit more, I installed numpy and gobject with pip as superuser (su) and I hardcoded the device product id and vendor id in the source(bad way to fix this because IDs might change.) in drivers.py(line 35 and 36). And oh my god. I finally got this running.

this is the output of systemctl status:


    ● linux-thermaltake-rgb.service
        Loaded: loaded (/usr/lib/systemd/system/linux-thermaltake-rgb.service; enabled; vendor preset: disabled)
        Active: active (running) since Wed 2020-06-10 05:17:13 +08; 2min 47s ago
    Main PID: 47048 (linux-thermalta)
        Tasks: 4 (limit: 19130)
        Memory: 23.3M
        CGroup: /system.slice/linux-thermaltake-rgb.service
                └─47048 /usr/bin/python /usr/bin/linux-thermaltake-rgb

Jun 10 05:17:13 es systemd[1]: Started linux-thermaltake-rgb.service.
Jun 10 05:17:13 es linux-thermaltake-rgb[47048]: initializing FullLightingEffect light controller
Jun 10 05:17:13 es linux-thermaltake-rgb[47048]: Starting fan manager (locked speed 100%)...

The only package who can talk to this stupid controller on linux. Massive props chestm007. So far, only the speed control works. I can't be bothered to troubleshoot the RGB for now. Let me know if anyone got that running. It runs as a daemon and also a normal program as long as it has root.

Cheers.

rkmax commented on 2020-05-22 19:54 (UTC) (edited on 2020-05-22 19:54 (UTC) by rkmax)

after install python-numpy

Traceback (most recent call last):
  File "/usr/bin/linux-thermaltake-rgb", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3253, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3236, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3265, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'GObject' distribution was not found and is required by linux-thermaltake-rgb

python-gobject is present on my system

rkmax commented on 2020-05-22 19:52 (UTC) (edited on 2020-05-22 19:53 (UTC) by rkmax)

installed recently with the following problem

Traceback (most recent call last):
  File "/usr/bin/linux-thermaltake-rgb", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3253, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3236, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3265, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'numpy' distribution was not found and is required by linux-thermaltake-rgb

nicoulaj commented on 2019-02-21 14:08 (UTC)

Thanks, I don't think there are explicit rules about this. The Arch philosophy is to provide "vanilla" packages (as few modifications as possible), so this actually goes against my request. But this package already does this by deploying the config files to their intended locations in /etc anyway.

Maybe a cleaner solution would be that the upstream project provide a Makefile so that package() is reduced to just something like make install PREFIX=$pkgdir and packaging is straightforward for all distros.

chestm007 commented on 2019-02-20 21:33 (UTC)

Hey, i've addressed everything except:

the whole $pkgdir/usr/share directory could be deleted from the package since files are deployed to their proper location anyway

I'm still a little new to packaging and cant find any documentation stating the correct way of doing that - if you can point me somewhere that would be amazing!

nicoulaj commented on 2019-02-15 13:30 (UTC) (edited on 2019-02-15 13:32 (UTC) by nicoulaj)

Thanks for packaging !

I have a few requests:

  • Can you add backup=('etc/linux_thermaltake_rgb/config.yml') ? otherwise the config will be overwritten with every update
  • A makedepends on git is needed, or it can't build in a clean chroot
  • Actually it would be even better to fetch a source tarball instead of using git to avoid a full clone of the repository, eg: source=('<https://github.com/chestm007/linux_thermaltake_riing/archive/>${pkgver}.tar.gz')
  • Last minor thing: the whole $pkgdir/usr/share directory could be deleted from the package since files are deployed to their proper location anyway