Coder Social home page Coder Social logo

liquidctl / liquidctl Goto Github PK

View Code? Open in Web Editor NEW
2.1K 38.0 207.0 4.12 MB

Cross-platform CLI and Python drivers for AIO liquid coolers and other devices

License: GNU General Public License v3.0

Python 94.25% Shell 3.27% Roff 2.48%
corsair evga nzxt liquid-cooler fan-controller power-supply led-controller gigabyte asus dram

liquidctl's Introduction

liquidctl – liquid cooler control

Cross-platform tool and drivers for liquid coolers and other devices

Status of the tests Developer's Discord server CII Best Practices


Notice: please check out our open invitation for new team members.


$ liquidctl list
Device #0: Corsair Vengeance RGB DIMM2
Device #1: Corsair Vengeance RGB DIMM4
Device #2: NZXT Smart Device (V1)
Device #3: NZXT Kraken X (X42, X52, X62 or X72)

# liquidctl initialize all
NZXT Smart Device (V1)
├── Firmware version             1.7
├── LED accessories                2
├── LED accessory type    HUE+ Strip
└── LED count (total)             20

NZXT Kraken X (X42, X52, X62 or X72)
└── Firmware version    6.2

# liquidctl status
NZXT Smart Device (V1)
├── Fan 1 speed            1499  rpm
├── Fan 1 voltage         11.91  V
├── Fan 1 current          0.05  A
├── Fan 1 control mode      PWM
├── Fan 2 [...]
├── Fan 3 [...]
└── Noise level              61  dB

NZXT Kraken X (X42, X52, X62 or X72)
├── Liquid temperature    34.7  °C
├── Fan speed              798  rpm
└── Pump speed            2268  rpm

# liquidctl status --match vengeance --unsafe=smbus,vengeance_rgb
Corsair Vengeance RGB DIMM2
└── Temperature    37.5  °C

Corsair Vengeance RGB DIMM4
└── Temperature    37.8  °C

# liquidctl --match kraken set fan speed  20 30  30 50  34 80  40 90  50 100
# liquidctl --match kraken set pump speed 70
# liquidctl --match kraken set sync color fixed 0080ff
# liquidctl --match "smart device" set led color moving-alternating "hsv(30,98,100)" "hsv(30,98,10)" --speed slower

Contents

  1. Supported devices
  2. Installation
    1. Linux distributions
    2. macOS Homebrew
    3. FreeBSD and DragonFly BSD Ports
    4. Manual installation
      1. Linux dependencies
      2. macOS system dependencies
      3. Windows system dependencies
      4. Creating a virtual environment
      5. Installing from PyPI or GitHub
      6. Allowing access to the devices
      7. Additional files
    5. Working locally
  3. The command-line interface
    1. Listing and selecting devices
    2. Initializing and interacting with devices
    3. Supported color specification formats
  4. Using liquidctl in other programs and scripts
  5. Automation and running at boot
    1. Set up Linux using systemd
    2. Set up Windows using Task Scheduler
    3. Set up macOS using various methods
  6. Troubleshooting
  7. Additional documentation
  8. License
  9. Related projects

Supported devices

The following devices are supported by liquidctl. In the table, MRLV stands for the minimum recommended liquidctl version. The linked documents contain specific usage instructions and other useful information.

Type Device family and specific documentation Notes MRLV
AIO liquid cooler ASUS Ryujin II 360 p git
AIO liquid cooler Corsair Hydro H110i GT p git
AIO liquid cooler Corsair Hydro H80i GT, H100i GTX, H110i GTX Z 1.9.1
AIO liquid cooler Corsair Hydro H80i v2, H100i v2, H115i Z 1.9.1
AIO liquid cooler Corsair Hydro Pro H100i, H115i, H150i Z 1.9.1
AIO liquid cooler Corsair Hydro Platinum H100i, H100i SE, H115i 1.8.1
AIO liquid cooler Corsair Hydro Pro XT H60i, H100i, H115i, H150i 1.8.1
AIO liquid cooler Corsair iCUE Elite Capellix H100i, H115i, H150i Bp 1.11.1
AIO liquid cooler Corsair iCUE Elite RGB H100i, H150i 1.13.0
AIO liquid cooler Corsair iCUE Elite RGB H115i git
AIO liquid cooler EVGA CLC 120 (CL12), 240, 280, 360 Z 1.9.1
AIO liquid cooler MSI MPG Coreliquid K360 p git
AIO liquid cooler NZXT Kraken M22 1.10.0
AIO liquid cooler NZXT Kraken X40, X60 LZ 1.9.1
AIO liquid cooler NZXT Kraken X31, X41, X61 LZ 1.9.1
AIO liquid cooler NZXT Kraken X42, X52, X62, X72 h 1.11.1
AIO liquid cooler NZXT Kraken X53, X63, X73 h 1.11.1
AIO liquid cooler NZXT Kraken Z53, Z63, Z73 h 1.11.1
AIO liquid cooler NZXT Kraken 2023 Standard, Elite B git
Pump controller Aquacomputer D5 Next hp 1.11.1
Fan/LED controller Aquacomputer Octo hp 1.11.1
Fan/LED controller Aquacomputer Quadro hp 1.11.1
Fan/LED controller Corsair Commander Pro h 1.11.1
Fan/LED controller Corsair Commander Core, Core XT Bp 1.11.1
Fan/LED controller Corsair Commander ST Bp 1.12.1
Fan/LED controller Corsair Lighting Node Core, Pro 1.8.1
Fan/LED controller Corsair Obsidian 1000D 1.9.1
Fan/LED controller NZXT Grid+ V3 h 1.11.1
Fan/LED controller NZXT HUE 2, HUE 2 Ambient 1.7.2
Fan/LED controller NZXT RGB & Fan Controller h 1.11.1
Fan/LED controller NZXT RGB & Fan Controller (3+6 channels) hp 1.12.1
Fan/LED controller NZXT Smart Device h 1.11.1
Fan/LED controller NZXT Smart Device V2 h 1.11.1
Fan/LED controller NZXT H1 V2 1.10.0
DDR4 memory Corsair Vengeance RGB Uax 1.7.2
DDR4 memory Generic DDR4 temperature sensor Uax 1.8.1
Power supply Corsair HX750i, HX850i, HX1000i, HX1200i h 1.12.1
Power supply Corsair HX1000i (2022), HX1500i h 1.13.0
Power supply Corsair RM650i, RM750i, RM850i, RM1000i h 1.12.1
Power supply NZXT E500, E650, E850 p 1.7.2
LED controller Aquacomputer Farbwerk 360 hp 1.11.1
Graphics card RGB Select ASUS GTX and RTX cards Ux 1.9.1
Graphics card RGB Select EVGA GTX 1070, 1070 Ti and 1080 cards Ux 1.9.1
Motherboard RGB ASUS Aura LED motherboards 1.10.0
Motherboard RGB Gigabyte RGB Fusion 2.0 motherboards 1.5.2

B Known to be currently broken in at least one major way.
L Requires the --legacy-690lc flag.
U Requires --unsafe features.
Z Requires replacing the device driver on Windows.
a Architecture-specific limitations.
h Can leverage hwmon driver.
p Only partially supported.
x Only supported on Linux.

Installation

The following sections cover the various methods to set up liquidctl.

Linux distributions

A considerable number of Linux distributions already package liquidctl, generally at fairly recent versions.

# Alpine
sudo apk add liquidctl

# Arch/Artix/[Manjaro]/Parabola
sudo pacman -S liquidctl

# Fedora
sudo dnf install liquidctl

# Manjaro
sudo pamac install liquidctl

# Nix
nix-env -iA nixos.liquidctl

liquidctl is also available in some non-official/community-based repositories, as well as, at older versions, for more distributions. Repology shows more information about the packaging status in various distributions.

macOS Homebrew

For macOS, liquidctl is available on Homebrew, generally at the most recent version. It is also easy to install the latest development snapshot from the official source code repository.

# latest stable version
brew install liquidctl

# or latest development snapshot from the official source code repository
brew install liquidctl --HEAD

FreeBSD and DragonFly BSD Ports

On FreeBSD and DragonFly BSD, liquidctl is maintained in the Ports Collections, and is available as a pre-built binary package.

pkg install py39-liquidctl

Manual installation

Warning: on systems that still default to Python 2, replace python with python3.

Changed in 1.9.0: liquidctl now uses a PEP 517 build system.

liquidctl can be manually installed from the Python Package Index (PyPI), or directly from the source code repository.

In order to manually install it, certain system-level dependencies must be satisfied first. In some cases it may also be preferable to use the Python libraries already provided by the operating system.

Linux dependencies

On Linux, the following dependencies are required at runtime (common package names are listed in parenthesis):

  • Python 3.8 or later (python3, python)
  • pkg_resources Python package (python3-setuptools, python3-pkg-resources, python-setuptools)
  • PyUSB (python3-pyusb, python3-usb, python-pyusb)
  • colorlog (python3-colorlog, python-colorlog)
  • crcmod 1.7 (python3-crcmod, python-crcmod)
  • cython-hidapi (python3-hidapi, python3-hid, python-hidapi)
  • docopt (python3-docopt, python-docopt)
  • pillow (python-pillow, python3-pil)
  • smbus Python package (python3-i2c-tools, python3-smbus, i2c-tools)
  • LibUSB 1.0 (libusb-1.0, libusb-1.0-0, libusbx)

Additionally, to build, install and test liquidctl, the following are also needed:

  • setuptools_scm Python package (python3-setuptools-scm, python3-setuptools_scm, python-setuptools-scm)
  • pip (optional) (python3-pip, python-pip)
  • pytest (optional) (python3-pytest, pytest, python-pytest)

macOS system-level dependencies

On macOS, Python (3.8 or later) and LibUSB 1.0 must be installed beforehand.

brew install python libusb

Windows system-level dependencies

On Windows, Python (3.8 or later) must be installed beforehand, which can be done from the official website. It is recommended to select the option to add python and other tools to the PATH.

A LibUSB 1.0 DLL is also necessary, but it will generally be provided automatically by liquidctl. In case that's not possible, and a USB "No backend available" error is shown, the suitable DLL from an official LibUSB release should be copied into C:\Windows\System32\. The DLL must match your Python installation: in most cases it will be latest VS build for x64 in the archive from LibUSB (e.g. VS2015-x64/dll/libusb-1.0.dll).

Additionally, products that are not Human Interface Devices (HIDs), or that do not use the Microsoft HID Driver, require a libusb-compatible driver (these are listed in Supported devices with a Z note). In most cases of these cases the Microsoft WinUSB driver is recommended, and it can easily be set up for a device using Zadig: open Zadig, select your device from the dropdown list and, finally, click "Replace Driver".

Warning: replacing the driver for a device where that is not necessary will likely cause it to become inaccessible from liquidctl.

Changed in 1.9.0: a LibUSB 1.0 DLL is now provided by libusb-package, provided there are suitable wheels available at the time of installation.

Creating a virtual environment

Setting up a virtual environment is an optional step. Even so, installing Python packages directly in the global environment is not generally advised.

Instead, it is usual to first set up a virtual environment:

# create virtual enviroment at <path>
python -m venv <path>

Once set up, the virtual environment can be activated on the current shell (more information in the official documentation). Alternatively, the virtual environment can also be used directly, without activation, by prefixing all python invocations with the environment's bin directory.

# Linux/macOS/BSDs (POSIX)
<path>/bin/python [arguments]

# Windows
<path>\Scripts\python [arguments]

Installing from PyPI or GitHub

pip can be used to install liquidctl from the Python Package Index (PyPI). This will also install the necessary Python libraries.

# the latest stable version
python -m pip install liquidctl

# a specific version (e.g. 1.13.0)
python -m pip install liquidctl==1.13.0

If git is installed, pip can also install the latest snapshot of the official liquidctl source code repository on GitHub.

# the latest snapshot of the official source code repository (requires git)
python -m pip install git+https://github.com/liquidctl/liquidctl#egg=liquidctl

To set up rootless access to devices on Linux and BSDs, install documentation and completions, or to learn more about auxiliary scripts, continue reading for the next few sections.

Allowing access to the devices

Access permissions are not a concern on platforms like macOS or Windows, where unprivileged access is already allowed by default. However, devices are not generally accessible by unprivileged users on Linux, FreeBSD or DragonFly BSD.

For Linux, we provide a set of udev rules in 71-liquidctl.rules that can be used to allow unprivileged read and write access to all devices supported by liquidctl. These rules are generally already included in downstream Linux packages of liquidctl.

Alternatively, sudo, doas and similar mechanisms can be used to invoke liquidctl as the super user, on both Linux and BSDs.

Additional files

Other files and tools are included in the source tree, which may be of use in certain scenarios:

Working locally

Changed in 1.9.0: liquidctl now uses a PEP 517 build system.

When working on the project itself, it is sometimes useful to set up a local development environment, making it possible to directly run the CLI and the test suite, without first building and installing a local package.

For this, start by installing git and any system-level dependencies mentioned in Manual installation. Then, clone the repository and change into the created directory:

git clone https://github.com/liquidctl/liquidctl
cd liquidctl

Optionally, set up a virtual environment.

Finally, if the necessary Python build, test and runtime libraries are not already installed on the environment (virtual or global), manually install them:

python -m pip install --upgrade pip setuptools setuptools_scm wheel
python -m pip install --upgrade colorlog crcmod==1.7 docopt hidapi pillow pytest pyusb
python -m pip install --upgrade "libusb-package; sys_platform == 'win32' or sys_platform == 'cygwin'"
python -m pip install --upgrade "smbus; sys_platform == 'linux'"
python -m pip install --upgrade "winusbcdc>=1.5; sys_platform == 'win32'"

At this point, the environment is set up. To run the test suite, execute:

python -m pytest

To run the CLI directly, without building and installing a local package, execute:

python -m liquidctl [arguments]

And to install liquidctl into the environment:

python -m pip install .

Introducing the command-line interface

The complete list of commands and options can be found in liquidctl --help and in the man page, but the following topics cover the most common operations.

Brackets [ ], parenthesis ( ), less than/greater than < > and ellipsis ... are used to describe, respectively, optional, required, positional and repeating elements. Example commands are prefixed with a number sign #, which also serves to indicate that on Linux root permissions (or suitable udev rules) may be required.

The --verbose option will print some extra information, like automatically made adjustments to user-provided settings. And if there is a problem, the --debug flag will make liquidctl output more information to help identify its cause; be sure to include this when opening a new issue.

Note: in addition to --debug, setting the PYUSB_DEBUG=debug and LIBUSB_DEBUG=4 environment variables can be helpful with problems suspected to relate to PyUSB or LibUSB.

Listing and selecting devices

A good place to start is to ask liquidctl to list all recognized devices.

$ liquidctl list
Device #0: NZXT Smart Device (V1)
Device #1: NZXT Kraken X (X42, X52, X62 or X72)

In case more than one supported device is found, one them can be selected with --match <substring>, where <substring> matches part of the desired device's description using a case insensitive comparison.

$ liquidctl --match kraken list
Result #0: NZXT Kraken X (X42, X52, X62 or X72)

More device properties can be show by passing --verbose to liquidctl list. Any of those can also be used to select a particular product.

$ liquidctl --bus hid --address /dev/hidraw4 list
Result #0: NZXT Smart Device (V1)

$ liquidctl --serial 1234567890 list
Result #0: NZXT Kraken X (X42, X52, X62 or X72)

Ambiguities for any given filter can be solved with --pick <number>.

Initializing and interacting with devices

Devices will usually need to be initialized before they can be used, though each device has its own requirements and limitations. This and other information specific to a particular device will appear on the documentation linked from the Supported devices section.

Devices can be initialized individually or all at once.

# liquidctl [options] initialize [all]

Most devices provide some status information, like fan speeds and liquid temperatures. This can be queried for all devices or using the filtering methods mentioned before.

# liquidctl [options] status

Fan and pump speeds can be set to fixed values or, if the device supports them, custom profiles. The specific documentation for each device will list the available modes, as well as which sensor is used for custom profiles. In general, liquid coolers only support custom profiles that are based on the internal liquid temperature probe.

# liquidctl [options] set <channel> speed (<temperature> <percentage>) ...
# liquidctl [options] set <channel> speed <percentage>

Lighting is controlled in a similar fashion. The specific documentation for each device will list the available channels, modes and additional options.

# liquidctl [options] set <channel> color <mode> [<color>] ...

Supported color specification formats

When configuring lighting effects, colors can be specified in different representations and formats:

  • as an implicit hexadecimal RGB triple, either with or without the 0x prefix: e.g. ff7f3f
  • as an explicit RGB triple: e.g. rgb(255, 127, 63)
  • as a HSV (hue‑saturation‑value) triple: e.g. hsv(20, 75, 100)
    • hue ∊ [0, 360] (degrees); saturation, value ∊ [0, 100] (percent)
    • note: this is sometimes called HSB (hue‑saturation‑brightness)
  • as a HSL (hue‑saturation‑lightness) triple: e.g. hsl(20, 100, 62)
    • hue ∊ [0, 360] (degrees); saturation, lightness ∊ [0, 100] (percent)

Color arguments containing spaces, parenthesis or commas need to be quoted, as these characters can have special meaning on the command-line; the easiest way to do this on all supported platforms is with double quotes.

# liquidctl --match kraken set ring color fading "hsv(0,80,100)" "hsv(180,80,100)"

On Linux it is also possible to use single-quotes and \(, \), \ escape sequences.

Using liquidctl in other programs and scripts

The liquidctl driver APIs can be used to build Python programs that monitor or control the devices, and offer features beyond the ones provided by the CLI.

The APIs are documented, and this documentation can be accessed through pydoc, or directly read from the source files.

from liquidctl import find_liquidctl_devices

# Find all connected and supported devices.
devices = find_liquidctl_devices()

for dev in devices:

    # Connect to the device. In this example we use a context manager, but
    # the connection can also be manually managed. The context manager
    # automatically calls `disconnect`; when managing the connection
    # manually, `disconnect` must eventually be called, even if an
    # exception is raised.
    with dev.connect():
        print(f'{dev.description} at {dev.bus}:{dev.address}:')

        # Devices should be initialized after every boot. In this example
        # we assume that this has not been done before.
        print('- initialize')
        init_status = dev.initialize()

        # Print all data returned by `initialize`.
        if init_status:
            for key, value, unit in init_status:
                print(f'- {key}: {value} {unit}')

        # Get regular status information from the device.
        status = dev.get_status()

        # Print all data returned by `get_status`.
        print('- get status')
        for key, value, unit in status:
            print(f'- {key}: {value} {unit}')

        # For a particular device, set the pump LEDs to red.
        if 'Kraken' in dev.description:
            print('- set pump to radical red')
            radical_red = [0xff, 0x35, 0x5e]
            dev.set_color(channel='pump', mode='fixed', colors=[radical_red])

More examples can be found in the scripts in extra/.

In addition to the APIs, the liquidctl CLI is friendly to scripting: errors cause it to exit with non-zero codes and only functional output goes to stdout, everything else (error messages, warnings and other auxiliary information) going to stderr.

The list, initialize and status commands also support a --json flag to switch the output to JSON, a more convenient format for machines and scripts. In --json mode, setting LANG=C on the environment causes non-ASCII characters to be escaped.

# liquidctl --match kraken list --json | jq
[
  {
    "description": "NZXT Kraken X (X42, X52, X62 or X72)",
    "vendor_id": 7793,
    "product_id": 5902,
    "release_number": 512,
    "serial_number": "49874481333",
    "bus": "hid",
    "address": "/dev/hidraw3",
    "port": null,
    "driver": "Kraken2",
  },
  ...
]

# liquidctl --match kraken status --json | jq
[
  {
    "bus": "hid",
    "address": "/dev/hidraw3",
    "description": "NZXT Kraken X (X42, X52, X62 or X72)",
    "status": [
      {
        "key": "Liquid temperature",
        "value": 30.1,
        "unit": "°C"
      },
      {
        "key": "Fan speed",
        "value": 1014,
        "unit": "rpm"
      },
      ...
    ]
  },
  ...
]

Note that the examples above pipe the output to jq, as the original output has no line breaks or indentation. An alternative to jq is to use python -m json.tool, which is already included in standard Python distributions.

Finally, the stability of both the APIs and the CLI commands is documented in our stability guarantee. In particular, the specific keys, values and units returned by the commands above, as well as their API equivalents, are subject to changes. Consumers should verify that the returned data matches their expectations, and react accordingly.

Automation and running at boot

In most cases you will want to automatically apply your settings when the system boots. Generally a simple script or a basic service is enough, and some specifics about this are given in the following sections.

For even more flexibility, you can also write a Python program that calls the driver APIs directly.

Set up Linux using systemd

On systems running Linux and systemd a service unit can be used to configure liquidctl devices. A simple example is provided bellow, which you can edit to match your preferences. Save it to /etc/systemd/system/liquidcfg.service.

[Unit]
Description=AIO startup service

[Service]
Type=oneshot
ExecStart=liquidctl initialize all
ExecStart=liquidctl --match kraken set pump speed 90
ExecStart=liquidctl --match kraken set fan speed  20 30  30 50  34 80  40 90  50 100
ExecStart=liquidctl --match "smart device" set sync speed 55
ExecStart=liquidctl --match kraken set sync color fading 350017 ff2608

[Install]
WantedBy=default.target

After reloading the configuration, the new unit can be started manually or set to automatically run during boot using standard systemd tools.

# systemctl daemon-reload
# systemctl start liquidcfg
# systemctl enable liquidcfg

A slightly more complex example can be seen at jonasmalacofilho/dotfiles, which includes dynamic adjustments of the lighting depending on the time of day.

If necessary, it is also possible to have the service unit explicitly wait for the device to be available: see making systemd units wait for devices.

Set up Windows using Task Scheduler

The configuration of devices can be automated by writing a batch file and setting up a new task for (every) login using Windows Task Scheduler. The batch file can be really simple and only needs to contain the invocations of liquidctl that would otherwise be done manually.

liquidctl initialize all
liquidctl --match kraken set pump speed 90
liquidctl --match kraken set fan speed  20 30  30 50  34 80  40 90  50 100
liquidctl --match "smart device" set sync speed 55
liquidctl --match kraken set sync color fading 350017 ff2608

Make sure that liquidctl is available in the context where the batch file will run: in short, liquidctl --version should work within a normal Command Prompt window.

You may need to install Python with the option to set the PATH variable enabled, or manually add the necessary folders to the PATH.

A slightly more complex example can be seen in issue #14 ("Can I autostart liquidctl on Windows?"), that uses the LEDs to convey progress or eventual errors. Chris' guide on Replacing NZXT’s CAM software on Windows for Kraken is also a good read.

As an alternative to using Task Scheduler, the batch file can simply be placed in the startup folder; you can run shell:startup to find out where that is.

Set up macOS using various methods

You can follow either or both of the guides below to automatically configure your devices during login or after waking from sleep. The guides are hosted on tonymacx86:

  • This guide is for controllers that lose their state during sleep (e.g. Gigabyte RGB Fusion 2.0) and need to be reinitialized after wake-from-sleep. This guide uses Automator to initialize supported devices at login, and sleepwatcher to initialize supported devices after wake-from-sleep.
  • This guide is for controllers that do not lose their state during sleep (e.g. ASUS Aura LED). This driver uses the launchctl method to initialize supported devices at login.

Troubleshooting

Device not listed (Windows)

This is likely caused by having replaced the standard driver of a USB HID. If the device in question is not marked in Supported devices as requiring a special driver, try uninstalling the custom driver.

Device not listed (Linux)

First, check that the liquidctl version (liquidctl --version) you're running supports the device in question. An overview of supported devices and minimum recommended versions for them are available in Supported devices. Support for new devices can happen to be available only in Git for some time.

If the device is supported, this is usually caused by having an unexpected kernel driver bound to a USB HID. In most cases this is the result of having used a program that accessed the device (directly or indirectly) via libusb-1.0, but failed to reattach the original driver before terminating.

This can be temporarily solved by manually rebinding the device to the kernel usbhid driver. Replace <bus> and <port> with the correct values from lsusb -vt (also assumes there is only HID interface, adjust if necessary):

echo '<bus>-<port>:1.0' | sudo tee /sys/bus/usb/drivers/usbhid/bind

A more permanent solution is to politely ask the authors of the program that is responsible for leaving the kernel driver detached to use libusb_attach_kernel_driver or libusb_set_auto_detach_kernel_driver.

Access denied or open failed (Linux)

These errors are usually caused by a lack of permission to access the device. On Linux distros that normally requires root privileges.

Alternatively to running liquidctl as root (or with sudo), you can install the udev rules provided in extra/linux/71-liquidctl.rules to allow unprivileged access to the devices supported by liquidctl.

Other problems

If your problem is not listed here, try searching the issues. If no issue matches your problem, you still need help, or you have found a bug, please open one.

When commenting on an issue, please describe the problem in as much detail as possible. List your operating system and the specific devices you own.

Also include the arguments and output of all relevant/failing liquidctl commands, using the --debug option to enable additional debug information.

Additional documentation

Be sure to browse docs/ for additional documentation, and extra/ for some example scripts and other possibly useful things.

You are also encouraged to contribute to the documentation and to these examples, including adding new files that cover your specific use cases or solutions.

License

Copyright 2018–2023 Jonas Malaco, Marshall Asch, CaseySJ, Tom Frey, Andrew Robertson, ParkerMc, Aleksa Savic, Shady Nawara and contributors

Some modules also incorporate or use as reference work by leaty, Ksenija Stanojevic, Alexander Tong, Jens Neumaier, Kristóf Jakab, Sean Nelson, Chris Griffith, notaz, realies and Thomas Pircher. This is mentioned in the module docstring, along with appropriate additional copyright notices.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Related projects

Sibling project of Linux kernel hwmon drivers for devices supported by liquidctl.

Graphical interface to monitor and control cooling devices supported by liquidctl.

Graphical interface to control many different types of RGB devices.

liquidctl's People

Contributors

aapo-kossi avatar aleksamagicka avatar alexberryman avatar andytank123 avatar caseysj avatar cdgriffith avatar codifryed avatar gking53 avatar historical-theology avatar icedterminal avatar intelfx avatar jarrettgilliam avatar jonasmalacofilho avatar keton avatar kevinlester avatar macgyvernl avatar marshallasch avatar mburgholte avatar mediocrescientist avatar meriemi-git avatar nightblade avatar parkermc avatar pde avatar possibly-not avatar sbilo avatar serphentas avatar shadynawara avatar shawnanastasio avatar smammy avatar tomaculum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

liquidctl's Issues

NZXT Kraken X61

I have NZXT Kraken X61, which is not supported. Can I help somehow to get this one on the list?

Support for NZXT Hue 2 Ambient V2

I have NZXT Hue 2 Ambient kit V2.
I played around with code from #61 and #64 and it's very straightforward to add my device to liquidctl.

Protocol is the same as for HUE2. The only difference seems to be in USB id, it's 1e71:2002 instead of 1e71:2001 for HUE2.

So if you add code below to https://github.com/jonasmalacofilho/liquidctl/blob/add-support-for-hue2/liquidctl/driver/nzxt_smart_device.py#L320 it just works at least for basic LED color settings.

       (0x1e71, 0x2002, None, 'NZXT HUE 2 Ambient (experimental)', {
            'speed_channel_count': 0,
            'color_channel_count': 2
        }),

I don't want to open pull request to ongoing pull request so I'm posting it here. I can help with testing experimental code on Windows and Linux.

Resource busy errors when simultaneously accessing 690LC devices

Simultaneously running

# extra/liquiddump --product 0xb200 --interval 3
# extra/tests/asetek_modern

in different shells causes the second to exit (first) with Resource busy.

Next, the other one fails as well with Operation timed out. That happens even if --interval is set to a high value and everything else clearly happens when it's time.sleep-ing.

# extra/liquiddump --product 0xb200 --interval 3
{"Asetek 690LC (assuming EVGA CLC)": [["Liquid temperature", 28.8, "\u00b0C"], ["Fan speed", 420, "rpm"], ["Pump speed", 2670, "rpm"], ["Firmware version", "2.10.0.0", ""]]}
{"Asetek 690LC (assuming EVGA CLC)": [["Liquid temperature", 28.8, "\u00b0C"], ["Fan speed", 480, "rpm"], ["Pump speed", 2610, "rpm"], ["Firmware version", "2.10.0.0", ""]]}
{"Asetek 690LC (assuming EVGA CLC)": [["Liquid temperature", 28.8, "\u00b0C"], ["Fan speed", 420, "rpm"], ["Pump speed", 2640, "rpm"], ["Firmware version", "2.10.0.0", ""]]}
Unexpected error
Traceback (most recent call last):
  File "extra/liquiddump", line 92, in <module>
    status[d.description] = d.get_status()
  File "/usr/lib/python3.7/site-packages/liquidctl/driver/asetek.py", line 221, in get_status
    msg = self._end_transaction_and_read()
  File "/usr/lib/python3.7/site-packages/liquidctl/driver/asetek.py", line 140, in _end_transaction_and_read
    msg = self.device.read(_READ_ENDPOINT, _READ_LENGTH, _READ_TIMEOUT)
  File "/usr/lib/python3.7/site-packages/liquidctl/driver/usb.py", line 260, in read
    return self.usbdev.read(endpoint, length, timeout=timeout)
  File "/usr/lib/python3.7/site-packages/usb/core.py", line 988, in read
    self.__get_timeout(timeout))
  File "/usr/lib/python3.7/site-packages/usb/backend/libusb1.py", line 833, in bulk_read
    timeout)
  File "/usr/lib/python3.7/site-packages/usb/backend/libusb1.py", line 936, in __read
    _check(retval)
  File "/usr/lib/python3.7/site-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 110] Operation timed out

$ echo $?
0

and on shell B:

# extra/tests/asetek_modern
+ DEVICE='--vendor 0x2433 --product 0xb200'
+ liquidctl --vendor 0x2433 --product 0xb200 list --verbose
Device 0, Asetek 690LC (assuming EVGA CLC)
  Vendor ID: 0x2433
  Product ID: 0xb200
  Release number: 0x0100
  Serial number: CCVI_1.0
  Bus: usb1
  Address: 10
  Port: 12
  Hierarchy: AsetekDriver, CommonAsetekDriver, UsbDeviceDriver, BaseDriver; PyUsbDevice=usb

+ liquidctl --vendor 0x2433 --product 0xb200 initialize
+ sleep 2
+ liquidctl --vendor 0x2433 --product 0xb200 status
Device 0, Asetek 690LC (assuming EVGA CLC)
usb.core.USBError: [Errno 16] Resource busy

$ echo $?
1

Additional issue: shell A exists with code 0 (fixed in a0a9834)
Reported by: @source83

Unhandled action '[un]bind' errors in syslog when using udev rules

More information in this ticket: https://gitlab.com/leinardi/gkraken/issues/14

Xubuntu 18.04
Kraken X62
Firmware version 6.0.2
liquidctl v1.2.0 (0524801)

Every time I issue a command in liquidctl these 2 lines are repeated in syslog:

Sep 29 15:29:29 xff0c upowerd[2668]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11:1.0/0003:1E71:170E.0025
Sep 29 15:29:29 xff0c upowerd[2668]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11:1.0
Sep 29 15:29:29 xff0c upowerd[2668]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11:1.0/0003:1E71:170E.0025
Sep 29 15:29:29 xff0c upowerd[2668]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11:1.0
Sep 29 15:29:29 xff0c upowerd[2668]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11:1.0
Sep 29 15:29:29 xff0c upowerd[2668]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11:1.0

Need liquidctl to work with EVGA CLC 280 AIO

I think that the NZXT AIO's use Asetek hardware like the EVGA. So is it possible to get support for the EVGA CLC 280?

I just put this onto one of my 2700X Linux hosts because my normal choice for the Corsair H110i was not available. I am thinking I made a big mistake. The H110i runs the pump at full speed off SATA power.

I have the CLC 280 hooked to the AIO header with disabled control which should give it 12V for full speed. But I am only getting 1400 rpm out of the pump and my radiator temps are not good.

Provide man pages

I would like to provide man pages for Linux, BSD and other systems where those can be used.

One way could be to migrate and adapt all current documentation to Sphinx, and then use that to generate man pages. This method has the advantage of keeping all the documentation in a single place and avoiding duplication of efforts to maintain it, but could be harder to set up.

Anyway, I'm open to ideas and contributions, even if just for a basic man page displaying the same information that --help already provides.

Device identifiers on subsequent calls on macOS

The listing order changes on subsequent calls on macOS, making the device ID unusable.

$ liquidctl list
Device ID 0: NZXT Kraken X (X42, X52, X62 or X72)
Device ID 1: NZXT Smart Device V2 (experimental)

$ liquidctl list
Device ID 0: NZXT Smart Device V2 (experimental)
Device ID 1: NZXT Kraken X (X42, X52, X62 or X72)
With `--debug`
$ liquidctl --debug list
[DEBUG] liquidctl.cli: running liquidctl v1.2.0
[DEBUG] liquidctl.driver.usb: searching GenericHidBus (api=hid, drivers=[CommonSmartDeviceDriver, CorsairHidPsuDriver, KrakenTwoDriver, SeasonicEDriver, SmartDeviceDriver, SmartDeviceDriverV2])
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x1e71:0x2006
[DEBUG] liquidctl.driver.usb: instanced driver for NZXT Smart Device V2 (experimental)
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x1e71:0x170e
[DEBUG] liquidctl.driver.usb: instanced driver for NZXT Kraken X (X42, X52, X62 or X72)
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x46d:0xc52b
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x46d:0xc52b
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x5ac:0x256
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x46d:0xc52b
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x5ac:0x256
[DEBUG] liquidctl.driver.usb: searching PyUsbBus (drivers=[AsetekDriver, CommonAsetekDriver, CorsairAsetekDriver, LegacyAsetekDriver])
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x1e71:0x170e
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x1e71:0x2006
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x5e3:0x608
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x46d:0x82d
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x5e3:0x608
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x46d:0xc52b
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x5ac:0x256
Device ID 0: NZXT Smart Device V2 (experimental)
├── Vendor ID: 0x1e71
├── Product ID: 0x2006
├── Release number: 0x0200
├── Serial number: 00000000001A
├── Bus: hid
├── Address: IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/BXBR@1,2/IOPP/BYUP@0/IOPP/BYD8@8/IOPP/XHC0@0,3/XHC0@61000000/PRT6@61500000/USB2.0 Hub@61500000/AppleUSB20Hub@61500000/AppleUSB20HubPort@61510000/NZXT USB Device@61510000/IOUSBHostInterface@0/IOUSBHostHIDDevice@61510000,0
└── Driver: SmartDeviceDriverV2 using module hid
[DEBUG] liquidctl.cli: hierarchy: CommonSmartDeviceDriver, UsbHidDriver, BaseUsbDriver, BaseDriver; HidapiDevice

Device ID 1: NZXT Kraken X (X42, X52, X62 or X72)
├── Vendor ID: 0x1e71
├── Product ID: 0x170e
├── Release number: 0x0200
├── Serial number: 6D73078C495
├── Bus: hid
├── Address: IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/BXBR@1,2/IOPP/BYUP@0/IOPP/BYD8@8/IOPP/XHC0@0,3/XHC0@61000000/PRT6@61500000/USB2.0 Hub@61500000/AppleUSB20Hub@61500000/AppleUSB20HubPort@61540000/NZXT USB Device@61540000/IOUSBHostInterface@0/IOUSBHostHIDDevice@61540000,0
└── Driver: KrakenTwoDriver using module hid
[DEBUG] liquidctl.cli: hierarchy: UsbHidDriver, BaseUsbDriver, BaseDriver; HidapiDevice

$ liquidctl --debug list
[DEBUG] liquidctl.cli: running liquidctl v1.2.0
[DEBUG] liquidctl.driver.usb: searching GenericHidBus (api=hid, drivers=[CommonSmartDeviceDriver, CorsairHidPsuDriver, KrakenTwoDriver, SeasonicEDriver, SmartDeviceDriver, SmartDeviceDriverV2])
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x1e71:0x170e
[DEBUG] liquidctl.driver.usb: instanced driver for NZXT Kraken X (X42, X52, X62 or X72)
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x46d:0xc52b
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x5ac:0x256
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x1e71:0x2006
[DEBUG] liquidctl.driver.usb: instanced driver for NZXT Smart Device V2 (experimental)
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x46d:0xc52b
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x5ac:0x256
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x46d:0xc52b
[DEBUG] liquidctl.driver.usb: searching PyUsbBus (drivers=[AsetekDriver, CommonAsetekDriver, CorsairAsetekDriver, LegacyAsetekDriver])
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x1e71:0x170e
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x1e71:0x2006
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x5e3:0x608
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x46d:0x82d
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x5e3:0x608
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x46d:0xc52b
[DEBUG] liquidctl.driver.usb: probing drivers for device 0x5ac:0x256
Device ID 0: NZXT Kraken X (X42, X52, X62 or X72)
├── Vendor ID: 0x1e71
├── Product ID: 0x170e
├── Release number: 0x0200
├── Serial number: 6D73078C495
├── Bus: hid
├── Address: IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/BXBR@1,2/IOPP/BYUP@0/IOPP/BYD8@8/IOPP/XHC0@0,3/XHC0@61000000/PRT6@61500000/USB2.0 Hub@61500000/AppleUSB20Hub@61500000/AppleUSB20HubPort@61540000/NZXT USB Device@61540000/IOUSBHostInterface@0/IOUSBHostHIDDevice@61540000,0
└── Driver: KrakenTwoDriver using module hid
[DEBUG] liquidctl.cli: hierarchy: UsbHidDriver, BaseUsbDriver, BaseDriver; HidapiDevice

Device ID 1: NZXT Smart Device V2 (experimental)
├── Vendor ID: 0x1e71
├── Product ID: 0x2006
├── Release number: 0x0200
├── Serial number: 00000000001A
├── Bus: hid
├── Address: IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/BXBR@1,2/IOPP/BYUP@0/IOPP/BYD8@8/IOPP/XHC0@0,3/XHC0@61000000/PRT6@61500000/USB2.0 Hub@61500000/AppleUSB20Hub@61500000/AppleUSB20HubPort@61510000/NZXT USB Device@61510000/IOUSBHostInterface@0/IOUSBHostHIDDevice@61510000,0
└── Driver: SmartDeviceDriverV2 using module hid
[DEBUG] liquidctl.cli: hierarchy: CommonSmartDeviceDriver, UsbHidDriver, BaseUsbDriver, BaseDriver; HidapiDevice

This appears to be a regression, and is probably related to the new implementation of device discovery.

Reported by: @CaseySJ (in #64/comment)

Grid+ V3 Duty Cycle

I note that for the Grid+ V3 Fan speeds can only be set to fixed duty values. Is this a limitation of the Grid+ or do you have plans to allow speed scaling based on temperature?

Build dev11 breaks usb backend

Using dev10 it works flawlessly. I uninstalled dev10, installed dev11 and Terminal reports No back-end. I rolled back to dev10 and it works again.

Here's a demo for you https://youtu.be/EUKUuAwrGRo

If this is just a temporary thing, ignore me and close this. If not, let me know what I can do to help.

MacOS Support

Have you managed to get this working on MacOS? I'm getting the following error:

$ liquidctl status
Device 0, NZXT Kraken X (X42, X52, X62 or X72)
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

Apparently this is an issue with libusb and the fact that MacOS loads a HID driver. I don't know much about USB, though. I've also tried running this as root and get the same error.

Improve support for Seasonic/NZXT E-series PSUs

Basic monitoring support has been added with #44, but several features are still missing in the NzxtEPsu driver:

  • device ID for the E650 (99ea723)
  • device ID for the E850 (#53)
  • identify the 12V rails
  • monitor total uptime
  • read firmware version (af807c3)
  • fan control
  • 12V multirail OCP configuration

Replaces: #31 ("Support for nzxt e series digital power supplies")

Also see:

Note: captures provide by Jon in #31 and #44.

Device IDs

Done.

Use lsusb (Linux) or search for hardware IDs in Device Manager (Windows).

The Vendor ID is probably the same as the E500: 0x7793. Searching for it online yields 0x5912 and 0x2500 as possible product IDs for the remaining SKUs.

Trivia: NZXT's official vendor ID is 0x1e71, which in decimal is 7793.


Identify the 12V rails

Done.

The device reports data for three 12V rails. Figure out what should be their correct labels (CPU; GPU/PCI-e aux; other).

Total uptime

Seems to part of the the response for the later writes in a update cycle. Since this depends on writes, it's important to first figure out what those do.

command bytes                    | response bytes           | decoded (r|w: command: response)
-------------------------------- | ------------------------ | ------------------------------------------------------------------
af 00 ef 01 60 dc 02 04 8c 00... | aa ef 00 00 00 00 00...  | r: MFR_SPECIFIC(???): 0xaaef_...
ae 01 ef 01 60 dc 02 04 8c 00... | aa 2f ed 00 00 00 00...¹ | w: MFR_SPECIFIC(???): 0xaa2f_0000d0de0100_...
ae 02 ef 01 60 dc 02 04 8c 00... | aa 26 00 00 00 00 00...¹ | w: MFR_SPECIFIC(???): 0xaa26_0000d0de0100_...
ae 03 ef 01 60 dc 02 04 8c 00... | aa 26 00 00 00 00 00...¹ | w: MFR_SPECIFIC(???): 0xaa26_0000d0de0100_...
ae 04 ef 01 60 dc 02 04 8c 00... | aa 26 00 00 00 00 00...¹ | w: MFR_SPECIFIC(???): 0xaa26_0000d0de0100_...
ae 05 ef 01 60 dc 02 04 8c 00... | aa 26 00 00 00 00 00...¹ | w: MFR_SPECIFIC(???): 0xaa26_0000d0de0100_...
ae 06 ef 01 60 dc 02 04 8c 00... | aa 28 00 00 00 00 00...¹ | w: MFR_SPECIFIC(???): 0xaa28_2e00d0de0100_...
                                                                                               ^^^^^^^^
                                                                                             offset: 0x2b
¹ Some non-zero bytes appear later.

Current hypothesis: minutes, encoded as a 4-byte big endian integer from offset 0x2b.

Firmware version

Done.

Likely related to command 0xFC:

command bytes                    | response bytes           | decoded (r|w: command: response)
-------------------------------- | ------------------------ | ------------------------------------------------------------------
ad 00 03 01 60 fc 02 04 8c 00... | aa 03 11 41 d0 00 00...  | r: MFR_SPECIFIC(firmware???): ???
               ^^                        ^^ ^^

Figure out how 0x1141 translates into version number "40983.00".

Fan control

Apparently uses PMBus FAN_COMMAND_1 (0x3b), passing the desired duty cycle encoded in LINEAR11.

An initial implementation was attempted in #55 (see for relevant comments and archived patch), but was reportedly incomplete.

command bytes                    | response bytes           | decoded (r|w: command: response)
-------------------------------- | ------------------------ | ------------------------------------------------------------------
ac 04 60 3b 17 00 9b 04 8c 00... | aa 28 00 00 00 00 00...¹ | w: FAN_COMMAND_1(duty: 23%)
         ^^ ^^ ^^

12V multirail OCP configuration

Unknown.

High reported RPM variation

Hi and thanks for all your work!

I'm using an NZXT X52 to cool an 1080 Ti w/ a g12 bracket on my Windows 10 Home. I followed Chris Griffith's guide here https://codecalamity.com/replacing-nzxts-cam-software-on-windows-for-kraken/#using-liquidctl to install and I'm using a startup script to set the following values:

liquidctl --device 0 set pump speed 60

liquidctl --device 0 set fan speed 30 36  38 40  45 49  53 66  60 100

The issue is I'm seeing quite a bit of variation in fan and pump speeds as reported by HWInfo 6.04 even under no load. The pump speed is 2060 rpm one moment and 2180 rpm the next (min. 2052, max. 2348 over about 10 minutes) . The fan speed varies less, but for a fixed fan speed a variation between 720-785 (min. 722, max. 778 over the same period) is more than I'd expect. Again, under 0 load. For comparison, over the same period the fans of the other AIO in my system have varied by a single rpm and the pump has a range of 8 rpm. Is this expected behavior?

Input/Output error when reading from Smart Device V2

(venv) C:\Users\me\venv\Scripts>liquidctl initialize

(venv) C:\Users\me\venv\Scripts>liquidctl set fan1 speed 0

(venv) C:\Users\me\venv\Scripts>liquidctl --debug status
[DEBUG] __main__: liquidctl v1.2.0 (AppVeyor; liquidctl-75df4346227f-bin-windows-x86_64)
Device 0, NZXT Smart Device V2 (experimental)
[DEBUG] liquidctl.driver.nzxt_smart_device: write 10 01 (and 62 padding bytes)
[DEBUG] liquidctl.driver.nzxt_smart_device: write 20 03 (and 62 padding bytes)
[ERROR] __main__: Unexpected error
Traceback (most recent call last):
  File "liquidctl\cli.py", line 185, in _device_get_status
  File "liquidctl\driver\nzxt_smart_device.py", line 406, in get_status
  File "liquidctl\driver\usb.py", line 334, in read
  File "site-packages\pyusb-1.0.2-py3.6.egg\usb\core.py", line 988, in read
  File "site-packages\pyusb-1.0.2-py3.6.egg\usb\backend\libusb1.py", line 851, in intr_read
  File "site-packages\pyusb-1.0.2-py3.6.egg\usb\backend\libusb1.py", line 936, in __read
  File "site-packages\pyusb-1.0.2-py3.6.egg\usb\backend\libusb1.py", line 595, in _check
usb.core.USBError: [Errno 5] Input/Output Error
[DEBUG] liquidctl.driver.usb: ensure interface is released

Reported by: @flyweight in #32 (comment)
Reported by: /u/B0bbySmile in Reddit comment

pip install -U liquidctl==1.2.0 fails on Ubuntu

I'm trying to update on one venv liquidctl from 1.1.0 to 1.2.0 but it fails with this error:

$ pip install -U liquidctl==1.2.0
Collecting liquidctl==1.2.0
  Using cached https://files.pythonhosted.org/packages/dd/fb/7dedead18957a8fa1d937055fb435c85a611a7eacaad11818caa716ef86d/liquidctl-1.2.0-py3-none-any.whl
Collecting hidapi (from liquidctl==1.2.0)
  Using cached https://files.pythonhosted.org/packages/c1/86/89df0e8890f96eeb5fb68d4ccb14cb38e2c2d2cfd7601ba972206acd9015/hidapi-0.7.99.post21.tar.gz
Requirement already satisfied, skipping upgrade: pyusb in ./venv/lib/python3.7/site-packages (from liquidctl==1.2.0) (1.0.2)
Requirement already satisfied, skipping upgrade: appdirs in ./venv/lib/python3.7/site-packages (from liquidctl==1.2.0) (1.4.3)
Requirement already satisfied, skipping upgrade: docopt in ./venv/lib/python3.7/site-packages (from liquidctl==1.2.0) (0.6.2)
Requirement already satisfied, skipping upgrade: setuptools>=19.0 in ./venv/lib/python3.7/site-packages/setuptools-40.8.0-py3.7.egg (from hidapi->liquidctl==1.2.0) (40.8.0)
Installing collected packages: hidapi, liquidctl
  Running setup.py install for hidapi ... error
    Complete output from command /home/leinardi/Workspace/gitlab/gkraken/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ihfxsw5r/hidapi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-vnjfgh9k/install-record.txt --single-version-externally-managed --compile --install-headers /home/leinardi/Workspace/gitlab/gkraken/venv/include/site/python3.7/hidapi:
    running install
    running build
    running build_ext
    cythoning hid.pyx to hid.c
    /tmp/pip-install-ihfxsw5r/hidapi/.eggs/Cython-0.29.13-py3.7-linux-x86_64.egg/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-ihfxsw5r/hidapi/hid.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    building 'hid' extension
    creating build
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/hidapi
    creating build/temp.linux-x86_64-3.7/hidapi/libusb
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/home/leinardi/Workspace/gitlab/gkraken/venv/include -I/usr/include/python3.7m -c hid.c -o build/temp.linux-x86_64-3.7/hid.o
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/home/leinardi/Workspace/gitlab/gkraken/venv/include -I/usr/include/python3.7m -c hidapi/libusb/hid.c -o build/temp.linux-x86_64-3.7/hidapi/libusb/hid.o
    hidapi/libusb/hid.c:47:10: fatal error: libusb.h: File o directory non esistente
       47 | #include <libusb.h>
          |          ^~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/home/leinardi/Workspace/gitlab/gkraken/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ihfxsw5r/hidapi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-vnjfgh9k/install-record.txt --single-version-externally-managed --compile --install-headers /home/leinardi/Workspace/gitlab/gkraken/venv/include/site/python3.7/hidapi" failed with error code 1 in /tmp/pip-install-ihfxsw5r/hidapi/

System:
Host: c7h Kernel: 5.3.0-12-generic x86_64 bits: 64 Desktop: Gnome 3.34.0
Distro: Ubuntu 19.10 (Eoan Ermine)

NZXT Smart Device - spectrum-wave mode turns LEDs off

Please see below the output for liquidctl status and liquidctl set led color spectrum-wave -g. Other options such as fading or super-fixed work correctly.

Microsoft Windows [Version 10.0.17763.55]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>liquidctl status
Device 0, NZXT Smart Device
Traceback (most recent call last):
  File "C:\Program Files\Python37\Scripts\liquidctl-script.py", line 11, in <module>
    load_entry_point('liquidctl==1.1.0', 'console_scripts', 'liquidctl')()
  File "c:\program files\python37\lib\site-packages\liquidctl\cli.py", line 169, in main
    _device_get_status(dev, i)
  File "c:\program files\python37\lib\site-packages\liquidctl\cli.py", line 116, in _device_get_status
    status = dev.get_status()
  File "c:\program files\python37\lib\site-packages\liquidctl\driver\nzxt_smart_device.py", line 171, in get_status
    msg = self.device.read(_READ_ENDPOINT, _READ_LENGTH, _READ_TIMEOUT)
  File "c:\program files\python37\lib\site-packages\usb\core.py", line 988, in read
    self.__get_timeout(timeout))
  File "c:\program files\python37\lib\site-packages\usb\backend\libusb1.py", line 851, in intr_read
    timeout)
  File "c:\program files\python37\lib\site-packages\usb\backend\libusb1.py", line 936, in __read
    _check(retval)
  File "c:\program files\python37\lib\site-packages\usb\backend\libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 10060] Operation timed out
C:\WINDOWS\system32>liquidctl set led color spectrum-wave -g
[DEBUG] usb.backend.libusb1: _LibUSB.__init__(<WinDLL 'C:\Program Files\Python37\libusb-1.0.dll', handle 7ffbe6040000 at 0x17e7f81af60>)
[INFO] usb.core: find(): using backend "usb.backend.libusb1"
[DEBUG] usb.backend.libusb1: _LibUSB.enumerate_devices()
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69DD8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69EF0>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CF8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69F28>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69E10>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69F60>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69DD8>)
[DEBUG] usb.backend.libusb1: _LibUSB._finalize_object()
[DEBUG] usb.backend.libusb1: _LibUSB.__init__(<WinDLL 'C:\Program Files\Python37\libusb-1.0.dll', handle 7ffbe6040000 at 0x17e7f81af60>)
[INFO] usb.core: find(): using backend "usb.backend.libusb1"
[DEBUG] usb.backend.libusb1: _LibUSB.enumerate_devices()
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CF8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69F60>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69E10>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69DD8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69EF0>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69F28>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC5A160>)
[DEBUG] usb.backend.libusb1: _LibUSB._finalize_object()
[DEBUG] usb.backend.libusb1: _LibUSB.__init__(<WinDLL 'C:\Program Files\Python37\libusb-1.0.dll', handle 7ffbe6040000 at 0x17e7f81af60>)
[INFO] usb.core: find(): using backend "usb.backend.libusb1"
[DEBUG] usb.backend.libusb1: _LibUSB.enumerate_devices()
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7F5D8390>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CF8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69E10>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7F5D8160>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69DD8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7F5CE9B0>)
[DEBUG] usb.backend.libusb1: _LibUSB.__init__(<WinDLL 'C:\Program Files\Python37\libusb-1.0.dll', handle 7ffbe6040000 at 0x17e7f81af60>)
[INFO] usb.core: find(): using backend "usb.backend.libusb1"
[DEBUG] usb.backend.libusb1: _LibUSB.enumerate_devices()
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7F81ABA8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69F60>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7F5CE9B0>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69E10>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69DD8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7F81ABA8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7F219518>)
[DEBUG] usb.backend.libusb1: _LibUSB._finalize_object()
[DEBUG] usb.backend.libusb1: _LibUSB.open_device(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_configuration(<usb.backend.libusb1._DeviceHandle object at 0x0000017E7FC5A160>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>, 0)
[DEBUG] liquidctl.driver.nzxt_smart_device: write 02 4b 02 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (and 3 padding bytes)
[DEBUG] usb.backend.libusb1: _LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>, 0)
[DEBUG] usb.backend.libusb1: _LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>, 0, 0, 0)
[DEBUG] usb.backend.libusb1: _LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>, 0)
[DEBUG] usb.backend.libusb1: _LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>, 0, 0, 0, 0)
[DEBUG] usb.backend.libusb1: _LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>, 0, 0, 0)
[DEBUG] usb.backend.libusb1: _LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>, 0)
[DEBUG] usb.backend.libusb1: _LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>, 1, 0, 0, 0)
[DEBUG] usb.backend.libusb1: _LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>, 0, 0, 0)
[DEBUG] usb.backend.libusb1: _LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x0000017E7FC69CC0>, 0)
[DEBUG] usb.backend.libusb1: _LibUSB.claim_interface(<usb.backend.libusb1._DeviceHandle object at 0x0000017E7FC5A160>, 0)
[DEBUG] usb.backend.libusb1: _LibUSB.intr_write(<usb.backend.libusb1._DeviceHandle object at 0x0000017E7FC5A160>, 1, 0, array('B', [2, 75, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), 2000)
[DEBUG] liquidctl.driver.nzxt_smart_device: write 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (and 1 padding bytes)
[DEBUG] usb.backend.libusb1: _LibUSB.intr_write(<usb.backend.libusb1._DeviceHandle object at 0x0000017E7FC5A160>, 1, 0, array('B', [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), 2000)
[DEBUG] usb.backend.libusb1: _LibUSB.release_interface(<usb.backend.libusb1._DeviceHandle object at 0x0000017E7FC5A160>, 0)
[DEBUG] usb.backend.libusb1: _LibUSB.close_device(<usb.backend.libusb1._DeviceHandle object at 0x0000017E7FC5A160>)
[DEBUG] usb.backend.libusb1: _LibUSB._finalize_object()
Exception ignored in: <function _AutoFinalizedObjectBase.__del__ at 0x0000017E7F810158>
Traceback (most recent call last):
  File "c:\program files\python37\lib\site-packages\usb\_objfinalizer.py", line 84, in __del__
    self.finalize()
  File "c:\program files\python37\lib\site-packages\usb\_objfinalizer.py", line 144, in finalize
    self._finalizer()
  File "c:\program files\python37\lib\weakref.py", line 548, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
  File "c:\program files\python37\lib\site-packages\usb\_objfinalizer.py", line 104, in _do_finalize_object_ref
    obj._do_finalize_object()
  File "c:\program files\python37\lib\site-packages\usb\_objfinalizer.py", line 71, in _do_finalize_object
    self._finalize_object()
  File "c:\program files\python37\lib\site-packages\usb\backend\libusb1.py", line 604, in _finalize_object
    _lib.libusb_unref_device(self.devid)
OSError: exception: access violation writing 0x0000000000000024

Maybe this is a stupid question but: which temperate?

First off, thanks for liquidctl! I had a couple issues at first, but then noticed you said that rc1 had better compatibility so I got rc3 up and running without a hitch.

This may be a stupid question, but when setting temperature/percentage profiles, what's temperate is this based on? I assume the profiles for pump speed is based on the temperate of the liquid. Is that correct?

Are the temperates for fan speed the CPU temperature or the liquid temperature?

A fan speed setting of

liquidctl set fan speed 25 35 30 45 35 60 40 70 45 80 50 90 60 100

really doesn't make sense if the temperate is the liquid temperate, cause as far as I can tell my liquid temp never gets above ~38° C. So it would only ever get to 60% fan speed.

On the other hand, if this is based on CPU temperate, I'm not seeing RPMs at percentages relative to the temp/percentage for the current temperate of the CPU. Example: using the example above, my CPU at 80° C doesn't ramp up to 1800 RPM (the highest RPM of the X62 Kraken) but it should be at 100% since it's over 60° C.

Liquidctl doesn't work after reboot sometimes

I'm not really sure why but sometimes after a PC shutdown it stops working.
The colors don't respond to any commands but the fans and the pump do.
Any ideas why it happens / how we can fix it?

Keep track of --legacy-690lc

Mixing calls with and without --legacy-690lc can cause issues, and having the user keep track of this is prone to errors.

One solution would be for the value – legacy_690lc = True | False – passed to initialize to persist until either the device is initialized again, or the system is rebooted.

## default to modern/EVGA

# liquidctl list
Device ID 0: Asetek 690LC (assuming EVGA CLC)
# liquidctl status
Asetek 690LC (assuming EVGA CLC)
├── Liquid temperature        29.7  °C
├── Fan speed                  480  rpm
├── Pump speed                1890  rpm
└── Firmware version      2.10.0.0  


## set to legacy/NZXT

# liquidctl initialize --legacy-690lc
# liquidctl list
Device ID 0: Asetek 690LC (assuming NZXT Kraken X)
# liquidctl status
Asetek 690LC (assuming NZXT Kraken X)
├── Liquid temperature        29.7  °C
├── Fan speed                  480  rpm
├── Pump speed                1890  rpm
└── Firmware version      2.10.0.0  


## revert back to default

# liquidctl initialize
# liquidctl list
Device ID 0: Asetek 690LC (assuming EVGA CLC)

I'm still not sure what should be the behavior when --legacy-690lc is passed to commands other than initialize.


The implementation could check for the existence of the temporary data files used by the legacy driver.

But this would change some probe code, and it might be too late to do that in 1.3.0.
These new checks outside of the legacy driver could cause some unforeseen issues (e.g. life-cycle issues, or permission problems for those using udev rules).


Possibly related: #66

Support for nzxt e series digital power supplies

I have started reverse-engineering the pmbus protocol used by CAM to talk with the NZXT e500 and associated digital power supplies. Is this something that would you would be interested in adding to liquidctl?

How to use a testing branch for getting news features which are not yet available in stable version

Hi Jonas,

I am sure that this question will interest a lot of people who are using liquidctl and even for others projects.

How to use a testing branch for getting news features which are not yet available in the stable version knowing that they have already the stable version of liquidctl installed and that this testing branch must propose a clean experience (i.e do not put the mess in the system ) ?

What did you advice ?

Adding HUE+

This isn't so much an issue as it is a feature request

I noticed that there is a smart device listed in the code. But those only come with the cases. I have an older NZXT case with the HUE+ (leds) and GRID+ (fan control) devices. I don't use the fan controller as I have no interest in it. I do use the hue for the fan lights. I've obtained the device specific information and added it in. I'm not very good with Python. An amateur really.

What would it take to get the lights controlled through terminal?

Device 0, NZXT Kraken X (X42, X52, X62 or X72)
  Vendor ID: 0x1e71
  Product ID: 0x170e
  Release number: 0x0200
  Serial number: X
  Bus: hid
  Hierarchy: KrakenTwoDriver, UsbHidDriver, UsbDeviceDriver, BaseDriver; HidapiDevice=hid

Device 1, NZXT HUE+ (MCP2200)
  Vendor ID: 0x04d8
  Product ID: 0x00df
  Release number: 0x0101
  Serial number: X
  Bus: hid
  Hierarchy: NzxtSmartDeviceDriver, UsbHidDriver, UsbDeviceDriver, BaseDriver; HidapiDevice=hid

Odd lighting issue with Smart Device

When I set a fixed/solid color to all the LED strips on the Smart Device (I have 4), there are 2-3 individual LEDs per strip that ignore the color and usually get assigned a seemingly random color, but there's a pattern to it.

I've previously RE'd the Smart Device protocol for a different project, and it looks like I get the same results with both your method and mine.

I'm hoping that someone else is also seeing this behavior, and that it's not local to my current setup/code. It does work fine with CAM.

Some Kraken X61 functionality still missing.

Fan profiles aren't implemented yet, and it'd be nice to see some of the missing color functionality return (e.g. set color based on temperature)-- this functionality disappeared around the time they did a rewrite of Cam, along with a lot of the color profiles.

I've got an X61 and I'm running Windows 10. I can reinstall Cam if needed for data capture; just tell me what steps you'd need me to take.

Install liquidctl on Mac OS

Hello, i get installation error

  1. pip3 install --upgrade pip
  2. git clone URL
  3. pip3 install liquidctl
Collecting liquidctl
  Using cached https://files.pythonhosted.org/packages/dd/fb/7dedead18957a8fa1d937055fb435c85a611a7eacaad11818caa716ef86d/liquidctl-1.2.0-py3-none-any.whl
Requirement already satisfied: docopt in /usr/local/lib/python3.7/site-packages (from liquidctl) (0.6.2)
Requirement already satisfied: pyusb in /usr/local/lib/python3.7/site-packages (from liquidctl) (1.0.2)
Collecting hidapi (from liquidctl)
  Using cached https://files.pythonhosted.org/packages/c1/86/89df0e8890f96eeb5fb68d4ccb14cb38e2c2d2cfd7601ba972206acd9015/hidapi-0.7.99.post21.tar.gz
Requirement already satisfied: appdirs in /usr/local/lib/python3.7/site-packages (from liquidctl) (1.4.3)
Requirement already satisfied: setuptools>=19.0 in /usr/local/lib/python3.7/site-packages (from hidapi->liquidctl) (41.0.1)
Building wheels for collected packages: hidapi
  Building wheel for hidapi (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-install-i_l0b0g_/hidapi/setup.py'"'"'; __file__='"'"'/private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-install-i_l0b0g_/hidapi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-wheel-1w8lqxkn --python-tag cp37
       cwd: /private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-install-i_l0b0g_/hidapi/
  Complete output (23 lines):
  running bdist_wheel
  running build
  running build_ext
  cythoning hid.pyx to hid.c
  /private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-install-i_l0b0g_/hidapi/.eggs/Cython-0.29.13-py3.7-macosx-10.14-x86_64.egg/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-install-i_l0b0g_/hidapi/hid.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  building 'hid' extension
  creating build
  creating build/temp.macosx-10.14-x86_64-3.7
  creating build/temp.macosx-10.14-x86_64-3.7/hidapi
  creating build/temp.macosx-10.14-x86_64-3.7/hidapi/mac
  Compiling with an SDK that doesn't seem to exist: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
  Please check your Xcode installation
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -framework IOKit -framework CoreFoundation -Ihidapi/hidapi -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c hid.c -o build/temp.macosx-10.14-x86_64-3.7/hid.o
  clang: warning: -framework IOKit: 'linker' input unused [-Wunused-command-line-argument]
  clang: warning: -framework CoreFoundation: 'linker' input unused [-Wunused-command-line-argument]
  clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]
  In file included from hid.c:4:
  /usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:25:10: fatal error: 'stdio.h' file not found
  #include <stdio.h>
           ^~~~~~~~~
  1 error generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for hidapi
  Running setup.py clean for hidapi
Failed to build hidapi
Installing collected packages: hidapi, liquidctl
  Running setup.py install for hidapi ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-install-i_l0b0g_/hidapi/setup.py'"'"'; __file__='"'"'/private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-install-i_l0b0g_/hidapi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-record-39_hw9i9/install-record.txt --single-version-externally-managed --compile
         cwd: /private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-install-i_l0b0g_/hidapi/
    Complete output (21 lines):
    running install
    running build
    running build_ext
    skipping 'hid.c' Cython extension (up-to-date)
    building 'hid' extension
    creating build
    creating build/temp.macosx-10.14-x86_64-3.7
    creating build/temp.macosx-10.14-x86_64-3.7/hidapi
    creating build/temp.macosx-10.14-x86_64-3.7/hidapi/mac
    Compiling with an SDK that doesn't seem to exist: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
    Please check your Xcode installation
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -framework IOKit -framework CoreFoundation -Ihidapi/hidapi -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c hid.c -o build/temp.macosx-10.14-x86_64-3.7/hid.o
    clang: warning: -framework IOKit: 'linker' input unused [-Wunused-command-line-argument]
    clang: warning: -framework CoreFoundation: 'linker' input unused [-Wunused-command-line-argument]
    clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]
    In file included from hid.c:4:
    /usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:25:10: fatal error: 'stdio.h' file not found
    #include <stdio.h>
             ^~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-install-i_l0b0g_/hidapi/setup.py'"'"'; __file__='"'"'/private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-install-i_l0b0g_/hidapi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/2r/k1g7ls797cn6nl18dl2xvjp40000gn/T/pip-record-39_hw9i9/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

help/docs isn't thorough on options

I can see the ability to set to fading, but what are the other options I can set from CLI? It would be nice to see a list. I'm also assuming the code afterwards is hex for colors?

NZXT Smart Device v2?

The new cases will be shipping with Smart Device v2. Any idea if liquidctl will be able to control that device?

Thanks,
Jas

Windows Tutorial

I think it might be nice if the github had a more in depth guide for getting this software working on Windows from the ground up (as most CAM users may not have a lot of Python experience.)

I wrote a guide here, that you make take any or all of to include for documentation.

liquidctl list is empty on macOS

Hi,

I have a x62 and smart device both connected to a nzxt usb hub. The hub is connected to the motherboard f_usb connector. liquidctl list is empty. Below is the verbose output. Any pointers?

$ liquidctl list -v -g
[DEBUG] usb.backend.libusb1: _LibUSB.__init__(<CDLL '/usr/local/lib/libusb-1.0.dylib', handle 7fa5afeab170 at 0x10204bda0>)
[INFO] usb.core: find(): using backend "usb.backend.libusb1"
[DEBUG] usb.backend.libusb1: _LibUSB.enumerate_devices()
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x1020979e8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102186550>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x1020979e8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102186588>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x1020979e8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x1021865c0>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x1020979e8>)
[DEBUG] usb.backend.libusb1: _LibUSB._finalize_object()
[DEBUG] usb.backend.libusb1: _LibUSB.__init__(<CDLL '/usr/local/lib/libusb-1.0.dylib', handle 7fa5afeab170 at 0x10204bda0>)
[INFO] usb.core: find(): using backend "usb.backend.libusb1"
[DEBUG] usb.backend.libusb1: _LibUSB.enumerate_devices()
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x10204bc50>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102186550>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x10204bc50>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102186588>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x10204bc50>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x1021865c0>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x10204bc50>)
[DEBUG] usb.backend.libusb1: _LibUSB._finalize_object()
[DEBUG] usb.backend.libusb1: _LibUSB.__init__(<CDLL '/usr/local/lib/libusb-1.0.dylib', handle 7fa5afeab170 at 0x10204bda0>)
[INFO] usb.core: find(): using backend "usb.backend.libusb1"
[DEBUG] usb.backend.libusb1: _LibUSB.enumerate_devices()
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102134208>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102186550>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102134208>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102186588>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102134208>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x1021865c0>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102134208>)
[DEBUG] usb.backend.libusb1: _LibUSB._finalize_object()
[DEBUG] usb.backend.libusb1: _LibUSB.__init__(<CDLL '/usr/local/lib/libusb-1.0.dylib', handle 7fa5afeab170 at 0x10204bda0>)
[INFO] usb.core: find(): using backend "usb.backend.libusb1"
[DEBUG] usb.backend.libusb1: _LibUSB.enumerate_devices()
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x10204bdd8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102186550>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x10204bdd8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x102186588>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x10204bdd8>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x1021865c0>)
[DEBUG] usb.backend.libusb1: _LibUSB.get_device_descriptor(<usb.backend.libusb1._Device object at 0x10204bdd8>)
[DEBUG] usb.backend.libusb1: _LibUSB._finalize_object()

Thanks,
Jas

Control different sets of Fans on different headers

Hi,

First, a thank you:
I recently built a Hackintosh and love liquidctl! Without it I would have been nervous about inadequate cooling, so a big thank you for your hard work!!! It's especially impressive considering the Hackintosh driver FakeSMC doesn't support or even see any fans, yet you guys still have control over the fans on my device!

Issue/Feature Request:
I have two different sets of fans installed, one set attached to my x72 rad, and another set from a different brand for case fans. The case fans are connected to a second fan header on my MB. All of my fans are "supported" and spool up correctly, for instance with liquidctl set fan speed 100 both sets of fans ramp up. I assume this is a bit of a happy accident since liquidctl list only shows the x72 installed. Since they are different brands and spin at different min/max I would like to have individual control over the two sets. Right now it seems at idle case fans spin at ~1100 while the other set on the x72 is at ~700.

Is this at all possible? I'm happy to even work on this myself if you could provide some guidance on how your code is working. I have some programming knowledge of python, C++ and random bits of other languages. I'm not very knowledgable about architecture level stuff though, like which bus on the mobo and such. Thanks!!

Add an "all fans" channel for the NZXT Smart Device

I think it'd be nice to have a channel for controlling the speed of all fans at once in the Smart Device driver. This would eliminate the need to invoke liquidctl multiple times when one wants to keep all the fans at the same speed.

Latest master removing experimental tag from Asetek 690LC coolers fails

Latest master removing experimental tag from Asetek 690LC coolers fails. Just tried to compile the latest master to get rid of the !!very experimental!! tag when using the earlier commit.

Hit errors on connecting to https://pypi.python.org/simple/appdirs/:

Installed /usr/local/lib/python3.6/dist-packages/liquidctl-1.2.0.dev12-py3.6.egg Processing dependencies for liquidctl==1.2.0.dev12 Searching for appdirs Reading https://pypi.python.org/simple/appdirs/ Download error on https://pypi.python.org/simple/appdirs/: [Errno 104] Connection reset by peer -- Some packages may not be found! Couldn't find index page for 'appdirs' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading https://pypi.python.org/simple/ No local packages or working download links found for appdirs error: Could not find suitable distribution for Requirement.parse('appdirs') root@Serenity:/home/keith/Downloads/Utils/liquidctl-master#

Kraken x61 'fading' mode blinks instead

Hello, its been a while since I've interfaced with my Kraken x61 (I used to use CAM on windows), so I am not sure if this is a hardware bug or something, but I see no discernible difference between running the command:
sudo python3 cli.py --legacy-690lc --verbose set logo color blinking FFFFFF 0F0F0F
and
sudo python3 cli.py --legacy-690lc --verbose set logo color fading FFFFFF 0F0F0F
Both throw no errors, and only print

INFO: setting pump duty to 50%
INFO: setting fan duty to 0%

The reason I invoke sudo python3 is that without running as root when I tried to run the initialize, I got usb.core.USBError: [Errno 13] Access denied (insufficient permissions). liquidctl was somehow not in my sudo path either.
I'm running Ubuntu 18.04.

Thank you very much for this tool. Its been a while since I've had Windows on my computer and I was just checking around to see if it was possible to light up my x61 on Ubuntu and lo and behold!

Collaboration for Linux GUI application

Hi, I started developing a GUI application that should allow to monitor and configure the NZXT Kraken X on Linux.

I have already a minimal front-end in place that can show the information about speed and temp and also a profile section that can set and show the curve for the selected profile, I just need to feed it with real data:

image

In the past days I was checking the available projects that provide Linux supports for the Kraken and I really liked yours.

Would you be interested in a collaboration for the realization of such application?

From your side I think I need just minimal adjustment to the current driver. For example I would like to have exposed the driver value of the critx normalization parameter (currently hardcoded to 60) and an easy way to parse the status and setter verbose data (for example an option to get the output in json format).

Currently I am targeting only Linux with no plans to support other OS since the GUI toolkit I want to use is GTK3. The app will be release under GPL v3 license.

NZXT Smart Device is not recognized

Hi there I had some problem while trying to controlling the smart device

I did liquidctl initialize and liquidctl list only my kraken that shown not the smart device

I look up from the lsusb:
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 046d:c248 Logitech, Inc. G105 Gaming Keyboard
Bus 001 Device 002: ID 1e7d:2e22 ROCCAT
Bus 001 Device 010: ID 0b05:1872 ASUSTek Computer, Inc.
Bus 001 Device 007: ID 0b05:185c ASUSTek Computer, Inc.
Bus 001 Device 009: ID 1e71:170e NZXT
Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 008: ID 28de:1142
Bus 001 Device 006: ID 1e71:1714 NZXT
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

it showed over there, anybody knows why ?

Kraken x62 - minimum pump speed

Hi there,

many thank for project liquidctl - is amazing. I complete uninstalled CAM.

Please is there any change set minimum pump speed to 30-40%? Now is minimum 50%. In my case is 50% = 1940 rpm. I want to less. On my own risk.

I have Kraken x62 with firmware 6.01.

Thanks

Vecíno

Another important note: while allowed by the firmware, pump speeds bellow 60% are not currently exposed in CAM. Presumably, there are scenarios when such low speeds are not be suitable at all.

NotImplementedError for all operations?

Hi there,

today CAM stopped recognizing my X62 and as I was sick of this low quality software anyways, I decided to try your script. These are the results:

C:\Users\user>liquidctl list
Device 0, NZXT Kraken X (X42, X52, X62 or X72)

C:\Users\user>liquidctl status
Device 0, NZXT Kraken X (X42, X52, X62 or X72)
NotImplementedError: Operation not supported or unimplemented on this platform

C:\Users\user>liquidctl initialize
NotImplementedError: Operation not supported or unimplemented on this platform

Not sure if this is a problem on your side, but pretty much every operation gives me an NotImplementedError error. Is there anything I can try?

Best regards

Improve support for Corsair HXi/RMi PSUs

Improve CorsairHidPsuDriver adding support for:

  • fan control (added in #57)
  • 12V multirail OCP configuration (added in #54; feedback welcome)

Both features probably require some USB traffic captures, but it might be possible to implement fan control just from the PMBus spec and some trial and error.

1.3.0 - no longer able to run as a regular user

Hey, after upgrading from 1.2.0 to 1.3.0 via AUR I'm unable to run liquidctl as a regular user anymore.

It doesn't look like the udev rules need an update, but maybe they do?

Here are my settings:

lsusb

(yharnam)  ~ $ lsusb | grep NZXT
Bus 001 Device 002: ID 1e71:170e NZXT NZXT USB Device
(yharnam)  ~ $ lsusb -d 1e71:170e -v

Bus 001 Device 002: ID 1e71:170e NZXT NZXT USB Device
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x1e71 NZXT
  idProduct          0x170e
  bcdDevice            2.00
  iManufacturer           1 NZXT.-Inc.
  iProduct                2 NZXT USB Device
  iSerial                 3 49933649343
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0029
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     143
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

udev rules

(yharnam)  ~ $ </etc/udev/rules.d/kraken.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="1e71", ATTRS{idProduct}=="170e", MODE="0666"

liquidctl list

(yharnam)  ~ $ liquidctl list -v
Device ID 0: NZXT Kraken X (X42, X52, X62 or X72)
├── Vendor ID: 0x1e71
├── Product ID: 0x170e
├── Release number: 0x0200
├── Serial number: 49933649343
├── Bus: hid
├── Address: /dev/hidraw0
└── Driver: KrakenTwoDriver using module hidraw
(yharnam)  ~ $ liquidctl status
OSError: open failed
(yharnam)  ~ $ sudo liquidctl status
NZXT Kraken X (X42, X52, X62 or X72)
├── Liquid temperature     28.6  °C
├── Fan speed               938  rpm
├── Pump speed             2826  rpm
└── Firmware version      4.0.2

Strange behavior running "status" as regular user

Hi, I'm loving the fact that this is Python based (my favorite programming language).

My AIO: Corsair H115i
Detected correctly as well:

sudo liquidctl list
Device 0, Corsair Hydro H115i (experimental)

More of a strange bug or strange behavior:
when using liquidctl status as normal user, you get the readout/status just fine (might be because of my changes to udev so the aio would be accessible in userspace).
But, the fan revs up to max.
As soon as I run the same command with sudo, the fan revs back down again.

Also:

liquidctl set fan speed  20 30  30 50  34 80  40 90  50 100
NotImplementedError

Support for NXZT AER 2 120mm and NZXT HUE 2.

We talked in the other issue about adding support for these devices. I am super willing to run commands to get this on the move. I did see this project on the side: https://github.com/kusti8/hue-plus which covers the hue + and has a GUI. I do not know if y'all have that on a roadmap. I would certainly be willing to help code that.

lsusb -d 1e71: -v returned

Bus 001 Device 002: ID 1e71:170e NZXT 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1e71 NZXT
  idProduct          0x170e 
  bcdDevice            2.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0029
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     143
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1

Bus 001 Device 005: ID 1e71:2001 NZXT 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1e71 NZXT
  idProduct          0x2001 
  bcdDevice            2.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0029
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     308
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1

This is where we kind of left off. Can I get some guidance on how to proceed? I am more a software guy, not a hardware guy (although I am certainly trying to learn as much as possible) so I might need a little hand holding.

@CaseySJ gave this example code. Just dropping it below my post for future reference.:
@David-Frick,

To make it easier to support your HUE 2 lighting controller, here's an example code:

    File: drivers/nzxt_smart_device.py
    Line: 303

Current code:

    SUPPORTED_DEVICES = [
        (0x1e71, 0x2006, None, 'NZXT Smart Device V2', {
            'speed_channel_count': 3,
            'color_channel_count': 2
        }),
    ]

To add the HUE 2 lighting controller, try replacing those lines with these lines:

    SUPPORTED_DEVICES = [
        (0x1e71, 0x2006, None, 'NZXT Smart Device V2', {
            'speed_channel_count': 3,
            'color_channel_count': 2
        }),
        (0x1e71, 0x2001, None, 'NZXT HUE 2 Lighting Controller', {
            'speed_channel_count': 0,
            'color_channel_count': 4
        }),
    ]

Then type liquidctl list to see whether your Kraken and HUE 2 devices are listed. If they are, and if the HUE 2 is device #2 (index 1) in the list, you may then try these commands:

    liquidctl -d 1 initialize
    liquidctl -d 1 status
    liquidctl -d 1 set led1 color fixed ff0000 (this will set all LEDs on channel 1 to red)

Providing fan and pump curves for the older firmware X62s

Hi,

I have an older Kraken X62 (iSerial 5D8A2247363, latest firmware 2.1.8) which allegedly doesn't and probably never will support fan control curves. If I can help out in any way, please let me know.

I was also wondering if it'd make sense to include an option, in liquidctl, to simulate a fan control curve for older Krakens by repeatedly reading the temperature and setting the fan speed accordingly, akin to the way a lot of existing scripts for Nvidia temperature curves work.

Right now, trying to set temperature crashes on https://github.com/jonasmalacofilho/liquidctl/blob/master/liquidctl/driver/kraken_two.py#L194 with a TypeError: 'NotImplementedType' object is not callable (should probably be raise NotImplementedError).

Cheers!

Build dev11 breaks EVGA CLC 280 support

Since the add-second-gen-krakens branch comments indicated that support for EVGA CLC 280 coolers was now merged into master, I tried to install the master dev 11 branch. Everything looked fine until the end of the installation.

sudo python3 setup.py install
[sudo] password for keith: 
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
  warnings.warn(msg)
running install
running bdist_egg
running egg_info
creating liquidctl.egg-info
writing liquidctl.egg-info/PKG-INFO
writing dependency_links to liquidctl.egg-info/dependency_links.txt
writing entry points to liquidctl.egg-info/entry_points.txt
writing requirements to liquidctl.egg-info/requires.txt
writing top-level names to liquidctl.egg-info/top_level.txt
writing manifest file 'liquidctl.egg-info/SOURCES.txt'
reading manifest file 'liquidctl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'liquidctl.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/liquidctl
copying liquidctl/version.py -> build/lib/liquidctl
copying liquidctl/__init__.py -> build/lib/liquidctl
copying liquidctl/cli.py -> build/lib/liquidctl
copying liquidctl/util.py -> build/lib/liquidctl
creating build/lib/liquidctl/driver
copying liquidctl/driver/__init__.py -> build/lib/liquidctl/driver
copying liquidctl/driver/kraken_two.py -> build/lib/liquidctl/driver
copying liquidctl/driver/usb.py -> build/lib/liquidctl/driver
copying liquidctl/driver/base.py -> build/lib/liquidctl/driver
copying liquidctl/driver/asetek.py -> build/lib/liquidctl/driver
copying liquidctl/driver/nzxt_smart_device.py -> build/lib/liquidctl/driver
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/liquidctl
copying build/lib/liquidctl/version.py -> build/bdist.linux-x86_64/egg/liquidctl
copying build/lib/liquidctl/__init__.py -> build/bdist.linux-x86_64/egg/liquidctl
copying build/lib/liquidctl/cli.py -> build/bdist.linux-x86_64/egg/liquidctl
creating build/bdist.linux-x86_64/egg/liquidctl/driver
copying build/lib/liquidctl/driver/__init__.py -> build/bdist.linux-x86_64/egg/liquidctl/driver
copying build/lib/liquidctl/driver/kraken_two.py -> build/bdist.linux-x86_64/egg/liquidctl/driver
copying build/lib/liquidctl/driver/usb.py -> build/bdist.linux-x86_64/egg/liquidctl/driver
copying build/lib/liquidctl/driver/base.py -> build/bdist.linux-x86_64/egg/liquidctl/driver
copying build/lib/liquidctl/driver/asetek.py -> build/bdist.linux-x86_64/egg/liquidctl/driver
copying build/lib/liquidctl/driver/nzxt_smart_device.py -> build/bdist.linux-x86_64/egg/liquidctl/driver
copying build/lib/liquidctl/util.py -> build/bdist.linux-x86_64/egg/liquidctl
byte-compiling build/bdist.linux-x86_64/egg/liquidctl/version.py to version.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/liquidctl/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/liquidctl/cli.py to cli.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/liquidctl/driver/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/liquidctl/driver/kraken_two.py to kraken_two.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/liquidctl/driver/usb.py to usb.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/liquidctl/driver/base.py to base.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/liquidctl/driver/asetek.py to asetek.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/liquidctl/driver/nzxt_smart_device.py to nzxt_smart_device.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/liquidctl/util.py to util.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying liquidctl.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying liquidctl.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying liquidctl.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying liquidctl.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying liquidctl.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying liquidctl.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/liquidctl-1.2.0.dev11-py3.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing liquidctl-1.2.0.dev11-py3.6.egg
Copying liquidctl-1.2.0.dev11-py3.6.egg to /usr/local/lib/python3.6/dist-packages
Removing liquidctl 1.2.0.dev1 from easy-install.pth file
Adding liquidctl 1.2.0.dev11 to easy-install.pth file
Installing liquidctl script to /usr/local/bin

Installed /usr/local/lib/python3.6/dist-packages/liquidctl-1.2.0.dev11-py3.6.egg
Processing dependencies for liquidctl==1.2.0.dev11
Searching for hidapi
Reading https://pypi.python.org/simple/hidapi/
Download error on https://pypi.python.org/simple/hidapi/: [Errno 104] Connection reset by peer -- Some packages may not be found!
Couldn't find index page for 'hidapi' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or working download links found for hidapi
error: Could not find suitable distribution for Requirement.parse('hidapi')

It looks like it is looking to install hidapi which is not found. I didn't see or I missed any instructions to install that beforehand. From the output it looks like the installer is supposed to retrieve that on its own but fails.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.