Skip to content

Add driver for Lian Li HydroShift LCD coolers#890

Open
Tarzerk wants to merge 6 commits into
liquidctl:mainfrom
Tarzerk:hydroshift-360-s-support
Open

Add driver for Lian Li HydroShift LCD coolers#890
Tarzerk wants to merge 6 commits into
liquidctl:mainfrom
Tarzerk:hydroshift-360-s-support

Conversation

@Tarzerk
Copy link
Copy Markdown

@Tarzerk Tarzerk commented Apr 30, 2026

Adds a HydroShiftLCD driver for the Lian Li HydroShift LCD AIO family — 360S (0416:7398), RGB (0416:7399) and TL (0416:739a). The pump houses a 480x480 round LCD that L-Connect 3 drives over USB HID; this driver implements the same protocol on Linux.

Overview of the implementation

  • HID protocol uses three report types: report A (64 B, control), report B (1024 B, bulk LCD writes for older firmware), report C (512 B, bulk LCD writes for firmware ≥ 1.2).
  • initialize performs a handshake, reads the firmware version, and selects A/B-only or A/B/C transport based on the parsed firmware string (V3.0B.02C,0.7 / V3.0C.013,1.3).
  • get_status reports liquid temperature, pump RPM/duty, and fan RPM/duty.
  • set_color drives the fan-ring LEDs (15 modes, up to four RGB colors, configurable speed and direction).
  • set_screen accepts static/gif/video. Static images are JPEG-encoded at quality 85; GIFs and videos are streamed frame-by-frame at 24 fps with client-side rotation persisted via RuntimeStorage so the orientation survives across invocations. Video decoding is delegated to ffmpeg via subprocess.
  • set_speed_profile raises NotSupportedByDevice — the AIO firmware owns the curves, only fixed duties are settable from host.

Tested on real hardware (HydroShift LCD 360S, firmware 0.7 and 1.3) on Arch Linux. The RGB and TL variants are listed in _MATCHES based on Lian Li's product line but I have not personally verified them; happy to drop them from this PR if maintainers prefer to wait for confirmation.

What's included

  • liquidctl/driver/hydroshift_lcd.py — the driver
  • liquidctl/driver/__init__.py — registration
  • tests/test_hydroshift_lcd.py — 16 unit tests covering initialize/status, color, screen modes, firmware parsing, and rotation persistence (full suite: 533 passed, 2 pre-existing skips)
  • README.md — supported-devices entry, linked to the new guide
  • docs/lian-li-hydroshift-guide.md — device guide
  • docs/developer/protocol/lian_li_hydroshift.md — HID protocol writeup
  • liquidctl.8 — man page entry
  • extra/linux/71-liquidctl.rules — regenerated via generate-uaccess-udev-rules.py

Captured lsusb plus liquidctl --debug traces for initialize/status/set-speed/set-color/set-lcd are submitted as liquidctl/collected-device-data#20.

Follow-ups

  • Pump-head lighting (0x83) is documented in the protocol doc by analogy with the fan lighting frame and the GA II LCD, but byte layout still needs USB capture to confirm; will follow up.

Checklist:

New device?

  • Regenerate extra/linux/71-liquidctl.rules
  • Add entry to the README's supported device list with applicable notes and git MRLV

Tarzerk and others added 6 commits April 29, 2026 22:08
Add support for the Lian Li HydroShift LCD cooler family (VID 0x0416,
PIDs 0x7398/0x7399/0x739A) including LCD image display, fan/pump speed
control, fan RGB lighting, and status monitoring.

Supported features:
- LCD screen: static images (JPEG/PNG/BMP), GIF first frame, brightness
- Fan and pump fixed speed control (0-100%)
- Fan RGB lighting (15 modes with speed, direction, up to 4 colors)
- Status: coolant temperature, fan RPM, pump RPM

Protocol based on reverse engineering from sgtaziz/lian-li-linux.
Tested on real hardware (firmware V3.0B.02C, version 0.7).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…sing

- Video mode: streams MP4/etc via ffmpeg, loops continuously
- GIF mode: pre-encodes all frames, loops continuously
- Rotation is applied client-side (image/ffmpeg) since device firmware
  does not support the rotation control command
- Fix firmware version parsing to use last comma-delimited segment
  (was matching V3.0B instead of actual version 0.7)

Tested on real hardware with video playback and rotation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…defaults

Orientation set via `set lcd screen orientation` now persists between
CLI calls using RuntimeStorage. Also ensures _use_c_cmd and _rotation
have sensible defaults when set_screen is called without prior initialize.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use re.findall to extract numeric components of the USB address rather
than embedding the full path string, so the persisted key remains stable
across systems and PyUSB/HID backends that format the address differently.
Add Lian Li HydroShift LCD 360S/RGB/TL to the supported-devices table
and regenerate 71-liquidctl.rules so the new vid/pid pairs (0416:7398,
0416:7399, 0416:739a) get the uaccess tag.
Adds the device guide under docs/, the HID protocol writeup under
docs/developer/protocol/, and the matching SS section in liquidctl.8.
Also turns the README supported-devices entry into a link to the new
device guide.
@Tarzerk Tarzerk force-pushed the hydroshift-360-s-support branch from c34a8a8 to 06a6aee Compare April 30, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant