Kernel Driver

As from 0.7.0, the default and recommended driver is this kernel driver. If offers a number of advantages.

  • Single unified driver for all Logitech G Keyboards.
  • Gnome15 writes directly to the device, making it a lot faster. To give you an idea of the improvement, the animation delay option had to be added to special effects plugin so you can actually see the effects!
  • No additional daemon need to be running, so again less resources used.

The maintainer off the LG4L kernel drivers hangs out on DKMS packages are available in the same repository as all the other packages. See the Downloads page for more information.These DKMS packages also include an init script that will configure the modules, as well as UDEV rules that setup that devices so they are usable by Gnome15.

Note, you also need the “gnome15-kernel” package which is the Gnome15 side of the driver. See below.

Install From Ubuntu or Debian DKMS Package

These drivers will be installed by default, but if you want to install them separately, you may run :-

sudo apt-get install lg4l-dkms lg4l-linux
Install From Fedora DKMS Package

These drivers will be installed by default, but if you want to install them separately, you may run :-

su -c yum install lg4l
Install From Mandriva DKMS Package

The Download the latest RPM files for from here and run the command :-

rpm -ivh lg4l-0.2-15.1.noarch.rpm  #replace with whatever the latest version is
Install From Source

You can retrieve the source via git, so make sure you have that installed.

# cd /root
# git clone https://github.com/ali1234/lg4l.git
# cd lg4l
Installing the Drivers

These rest of these instructions were taken from here, where you can also find the latest source. You should check this page to see if this instructions have changed.

All going well, you should be able to just install your kernel headers and type

# make
# make install

Now load the correct module for your device, eg:

# modprobe hid-g19

The modules will now be available but the device will still be grabbed by generic-usb. Run the rebind script to put the new module in control of the device:

# ./rebind
Configuring Permissions

To be able to directly access the keyboard hardware, Gnome15 must have permission to do so. There are 3 main classes of device that must be accessed. The Gnome15 packages try to deal with this for you, but it is worth knowing what happens in case it goes wrong!

The Framebuffer (LCD)

The LCD will be presented as a standard Linux framebuffer device, and so will be availabe as as a device in /dev/fbX, where X is the console number (probably at least 1, 0 will be your console). Gnome15 must be able to write to this device file.

The official packages have UDEV rules that configure the device permissions. It also creates a symlink, for example, a G19’s LCD will be called /dev/g19-lcd. These details will differ from distro to distro, so check you have permissions to write from the user Gnome15 runs as.

uinput (The Extra Keys)

The additional keys are handled by the uinput system. The kernel driver will create device files in /dev/input with names of eventX (X could be anything). Gnome15 currently locates the most likely device by looking at the symlinks /dev/input/by-id. This matching is a bit weak and will probably have to change. If other elements of your keyboard work, but the extra keys don’t, it could be because Gnome15 can’t find the correct uinput device (look at the log output for clues).

The permissions of these files are handled by the udev system. The official packages have UDEV rules that configure the device permissions. It also creates a symlink, for example, a G19’s extra keys will be called /dev/g19-extra-keys. These details will differ from distro to distro, so check you have permissions to read from the user Gnome15 runs as.

 

LEDs (Backlight, Contrast etc)

These are presented as directories in /sys/class/leds. Each of these directories has brightness file that may be written to or read from to set or get the current brightness of the LED. For controls that are color, 3 LED directories will be visible – red, green and blue.

The problem with these files is that as part of /sys, they are owned by root. I have found reference to something also resetting ownership of these files if they are changed as well.

To overcome this, g15-system-service is used. This is a DBUS system bus whose sole job is to write to the device files. The official packages install the appropriate DBUS files, but the details may differ from distro to distro.

Installing Gnome15 Kernel Driver

The Gnome15 “kernel” driver is part of the core package, so you do not need anything else. However, this driver has an additional dependency of pyinputevent. You can find this in the Gnome15 repository for your distirubtion.

Alternatively, there is a distutils source package available from this site here, or you can obtain it via Git from the original author here. The origins of this library are explained at the authors blog.

If you are building Gnome15 itself from source, make sure you have this dependency installed before running ./configure, or the driver will not be built.

If you have installed from either the Fedora, openSUSE or Mandriva repositories, then gnome15-kernel is included with the main package. For Debian based systems it is in a separate package. So to install it :-

sudo apt-get install gnome15-kernel

Configuring Gnome15

All you should need to do in Gnome15 is select the kernel driver. Run g15-config, go to the Driver tab and change the selected driver. Gnome15 will attempt to automatically detect which keyboard model you, and the number of the framebuffer device. However, if it gets this wrong or if you have multiple Logitech G devices plugged in, you can manually choose the model and framebuffer device in the Preferences dialog for this driver.

Leave a Reply

Skip to toolbar