G13 Linux Driver
raw JSON → 1.7.2 verified Sat May 09 auth: no python
A Linux driver for the Logitech G13 gamepad, providing macro support, RGB LED control, and LCD display management. Version 1.7.2 requires Python >=3.10. Release cadence is irregular; development on GitHub.
pip install g13-linux Common errors
error usb.core.USBError: [Errno 13] Access denied (insufficient permissions) ↓
cause Script not running as root or missing udev rule.
fix
Run with sudo or add udev rule for G13.
error ModuleNotFoundError: No module named 'g13' ↓
cause Using old import path after upgrade to 1.6+.
fix
Change import to 'from g13_linux import G13'.
Warnings
breaking In v1.6, module name changed from 'g13' to 'g13_linux'. All imports must be updated. ↓
fix Use 'from g13_linux import G13' instead of 'import g13'
deprecated The 'g13_linux.keys.KeyNames' class is deprecated in favor of 'g13_linux.keys.Key' in v1.7. ↓
fix Use 'from g13_linux.keys import Key'
gotcha You must run the script with root privileges (e.g., sudo) or set up udev rules, otherwise USB access fails with 'Permission denied'. ↓
fix Run with sudo or add a udev rule: SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", MODE="0660", GROUP="plugdev"
gotcha Disconnect properly using g13.disconnect() to release USB device; otherwise, subsequent connections may fail until device is re-plugged. ↓
fix Always call g13.disconnect() in a finally block.
Imports
- G13 wrong
import g13correctfrom g13_linux import G13 - KeyNames wrong
from g13.keys import KeyNamescorrectfrom g13_linux.keys import KeyNames
Quickstart
import os
import time
from g13_linux import G13
g13 = G13()
try:
g13.connect()
print("Connected to G13")
# Set LCD text
g13.lcd.set_text("Hello G13!")
time.sleep(2)
finally:
g13.disconnect()