Skip to content

Detailed installation

Marcel Grolms edited this page Dec 5, 2023 · 15 revisions

Requirements

First check that you have the needed requirements:

  • Python >=3.7
  • uinput kernel module (more on this here)

For Arch based distros: It's live on AUR

Preperation

If that's checked you can prepare for the setup:

  1. Load uinput kernel module: modprobe uinput (on Manjaro should be loaded by default afaik)

Installation

Download the driver

  • with git use git clone https://github.com/JSubelj/g910-gkey-macro-support.git
    or
  • download & unzip wget https://github.com/JSubelj/g910-gkey-macro-support/archive/refs/heads/master.zip; unzip master.zip

Open the directory: cd g910-gkey-macro-support or cd g910-gkey-macro-support-master if you have downloaded the zip.

Installer (recommended)

To run the installer you need to make it executable chmod +x installer.sh and then execute it ./installer.sh. You can do this with in one line chmod +x installer.sh; ./installer.sh

Install pre-build package via pip

  1. Install the package pip install g910-gkeys

  2. Setup uinput to be loaded in kernel:

    wget https://raw.githubusercontent.com/JSubelj/g910-gkey-macro-support/master/etc/uinput-g910-gkeys.conf; sudo mv uinput-g910-gkeys.conf /etc/modules-load.d/uinput-g910-gkeys.conf
  3. Setup udev for user permission on uinput and usb:

    wget https://raw.githubusercontent.com/JSubelj/g910-gkey-macro-support/master/etc/60-g910-gkeys.rules; sudo mv 60-g910-gkeys.rules /etc/udev/rules.d/60-g910-gkeys.rules
  4. Setup service:

    wget https://raw.githubusercontent.com/JSubelj/g910-gkey-macro-support/master/etc/g910-gkeys.service; sudo mv g910-gkeys.service /usr/lib/systemd/user/g910-gkeys.service
  5. Reload udev & service daemon:

    sudo systemctl restart udev; systemctl --user daemon-reload
  6. Download sample config:

    mkdir -p "$HOME"/.config/g910-gkeys; wget https://raw.githubusercontent.com/JSubelj/g910-gkey-macro-support/master/etc/config.json; mv config.json "$HOME"/.config/g910-gkeys/config.json
  7. Enable and start service systemctl --user enable --now g910-gkeys.service

Build package from source

  1. Build and install the package with setuptools: pip install -e ./
  2. Verify a successful build and install by running g910-gkeys -v
    You should see something like this:
    g910-gkeys 0.4.0 by Jan Šubelj
  3. Install the driver as a system service: cp ./etc/g910-gkeys.service "$HOME"/.config/systemd/user/g910-gkeys.service; systemctl --user daemon-reload
  4. To start the driver now and automatically on every boot run systemctl --user enable --now g910-gkeys

If you just want to start the driver for this session skip the last step and use: systemctl --user start g910-gkeys. You can also stop the service with systemctl --user stop g910-gkeys.

Why running the driver with a service manager is recommended

These are the plus sides to running the driver with a service manager and I believe there are many more:

  • You don't have to worry about the number of instances spawned. There is only one, and you can't by mistake spawn more of them
  • Service manager takes care of correctly shutting down the program
  • The driver launches as soon as possible (if enabled with systemctl --user enable g910-gkeys)
  • You can diagnose the driver by running systemctl --user status g910-gkeys and looking at systemd logs with journalctl --user -u g910-gkeys

First Steps

The driver should work now and pressing the G1 key should typeout: This is profile m1
Be sure to enter a text window/field before hitting G1, since the type out use the focus of the cursor.

Configuring G910 macro keys

Now that you installed the driver successfully you can configure your Gkeys mapping as described here: Configuration

If the driver still doesn't work correctly troubleshoot it as described here: Troubleshooting