Making the Logitech G920 wheel work

Hello,

I am trying to play Dirt Rally on Steam using my Logitech G920 wheel. This was working previously on Manjaro, now that I fully switched to NixOS it’s not working in some games anymore (Dirt Rally and GRID Autosport).

What I already tried:

I followed http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2510&p=16944&hilit=G920. I tried to activate services.udev.packages = with pkgs; [ usb-modeswitch-data ]; but this wasn’t working (by looking at the files in the package this device should be supported but it seems there is a problem with the NixOS package, see #11647).

I made the config file manually according to the instructions on the forum above. When I launch sudo usb_modeswitch -v 046d -p c261 -c Documents/046d\:c261 I can see the correct device in lsusb and the KDE settings can see the wheel and I can test the inputs. I also tried fftest successfully (a tool to test force feedback) and some other games are detecting the wheel as well.

But even after this I can’t use the wheel in Dirt Rally and GRID Autosport.

I emailed the Ferral support and according to them it should be a missing udev rule.

Interesting files:

strace of Dirt Rally: Alternatives to

it’s opening a device that looks like the wheel

readlink("/sys/devices/pci0000:00/0000:00:1c.7/0000:07:00.0/usb3/3-2/3-2:1.0/0003:046D:C262.000D/input/input26/event23", 0x7ffec665ce48, 1024) = -1 EINVAL (Invalid argument)
stat("/sys/devices/pci0000:00/0000:00:1c.7/0000:07:00.0/usb3/3-2/3-2:1.0/0003:046D:C262.000D/input/input26/event23/uevent", {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/sys/devices/pci0000:00/0000:00:1c.7/0000:07:00.0/usb3/3-2/3-2:1.0/0003:046D:C262.000D/input/input26/event23/uevent", O_RDONLY|O_CLOEXEC) = 31

Trying to do something with js1 device:

stat("/dev/input/js1", {st_mode=S_IFCHR|0664, st_rdev=makedev(13, 1), ...}) = 0
openat(AT_FDCWD, "/dev/input/js1", O_RDONLY) = 31
ioctl(31, EVIOCGNAME(128), 0x7ffec665d9c0) = -1 EINVAL (Invalid argument)

Do you have any idea to make this work ?

What’s working

Native games:

  • vdrift

Proton games:

  • Dirt 3

Thanks

1 Like

Hi, 7 years later but I have been confronted to this issue some weeks ago. And finding the thread on google, I thought I could answer with the udev rule I needed to make the G920 Works on NixOS

The interesting thing is that the first time I plugged my g920, it’s product id was c261. I guess after the modeswitch happened, it is now identified as a regular g920 with product id c262.

That’s why in the config I have the oversteer rules for c262 and a custom extraRule for c261.

So here is the config:

services.udev.packages = with pkgs; [ oversteer ];
services.udev.extraRules = ''
    ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c261", RUN+="${pkgs.usb-modeswitch}/bin/usb_modeswitch -v 046d -p c261 -m 01 -r 01 -C 03 -M '0f00010142'"
  '';
hardware.new-lg4ff.enable = true;

This is based on this article: https://burning-midnight.blogspot.com/2017/11/logitech-g920-steering-wheel-on-linux.html

You can check if the wheel you have has the same vendor id and product id as the g920 for Xbox one in my config with lsusb in the package usbutils.

Hopefully this will be useful for someone in the future :slight_smile: