Logitech G13
The Logitech G13 is a 25-key "advanced gameboard" from Logitech's Gaming series, with the intention of replacing the left half of your keyboard whilst gaming. It uses rubber dome keyswitches for the main 22-keys, mouse-like buttons for the two buttons around the joystick, a joystick (which can be pressed in), four Mode buttons, four option buttons, a menu button, and a backlight toggle. (Official Site)
There are a couple options for drivers, but only one that appears to work well today:
- Running the official Logitech Gaming Software under Wine. Despite working fine, the software has a Garbage rating on WineHQ, as it cannot actually communicate with USB devices. (However, the reports available are quite old, and you may have better luck)
- g15daemonAUR, despite its backend (libg15) claiming to support the G13, does not actually support the G13.
- linux-g13-driver, which can compile if you edit the Makefile (see issue #16), and may work for you.
- g13 g13-gitAUR is a user-space driver, which seems to work the best out of these.
g13
Installation
Install g13-gitAUR from the Arch User Repository.
This will install the g13d daemon, the pbm2lpbm bitmap converter and a systemd service that runs g13d as user/group "g13". It will also set up rules for udev to identify your G13 device, but the automatic starting and stopping of the service by connecting or unplugging is disabled by default.
/usr/lib/udev/rules.d/91-g13.rules/usr/lib/udev/rules.d/91-g13.rules, which will set owner and permissions for /dev/uinput on boot, followed by a reboot.Running
After following the steps above, when you reboot and launch g13d (either manually or automatically through systemd), you should receive an image with a "linux inside" logo, "G13", and the GNU logo.
Running manually prints errors on stderr but if you have enabled the service you can take a look at the g13.service unit status.
If you receive the error /dev/uinput does not grant write permissions, or if your bound keys do not generate any keypresses, running the command below should fix it temporarily, but will revert once you reboot.
/usr/lib/udev/rules.d/91-g13.rules, which will set owner and permissions for /dev/uinput on boot.Configuring
g13d is configured in one of two ways, either by writing commands to , or preferably by specifying keybindings and commands in a configuration file which is read at launch.
When running g13d manually you can specify a configuration file using the parameter, and when running as a service the file /etc/g13/default.bind will be used.
Manual commands can also be evoked one at a time by manually writing to :
For example, to set the display a purple colour: g13 can also handle multiple commands at once:
$ echo -e "rgb 177 13 201\nbind G4 KEY_W" > /run/g13d/g13-0
Commands
- , Set the backlight to an rgb colour, values are expressed in decimal from 0 to 255.
For example, to set the display green:
- , Binds a G13 key. All keys are bound to by default.
For example, to setup WASD movement: See below for how to configure this.
mod <n>, Sets the backlight status of M1, M2, M3, and MR.
<n> is a bitmask. To find the desired state compute the sum of 1 (M1), 2 (M2), 4 (M3) and 8 (MR). For example, to set M1, M3, and MR on, and turn M2 off (1+4+8=13):
Keys
Since that can be less than explanatory, here is a diagram showing where the keys physically are on the device:
Keypad:
______________
| 160x43 LCD |
| |
‾‾‾‾‾‾‾‾‾‾‾‾‾‾
BD L1 L2 L3 L4 LIGHT_STATE
M1 M2 M3 MR
G1 G2 G3 G4 G5 G6 G7
G8 G9 G10 G11 G12 G13 G14
G15 G16 G17 G18 G19
G10 G21 G22
Joystick:
L STICK_UP
E STICK_LEFT TOP STICK_RIGHT
F STICK_DOWN
T
DOWN