Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos hardware.steam-hardware.enable should add the uinput module to kernelModules #70471

Closed
cdepillabout opened this issue Oct 5, 2019 · 7 comments · Fixed by #70499
Closed

Comments

@cdepillabout
Copy link
Member

cdepillabout commented Oct 5, 2019

Describe the bug

I use a PlayStation 3 controller over bluetooth to control steam. I recently updated to nixos-19.09.

In previous releases of nixos, I've had to add the following udev rule to be able to use my controller with some steam games:

services.udev.extraRules = ''
  KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput", GROUP="input", MODE="0660"
'';

This rule changes /dev/uinput so it is read-write by people in the input group. Some info about this is described in the following issue: #50901

With a recent version of Steam (which is in 19.09), this udev rule is apparently no longer needed: #66916

However, now that I have updated to 19.09, I've found that this still doesn't work for me.

The reason appears to be that until the uinput kernel module is loaded, the correct permissions are not applied to /dev/uinput. I figured this out through the following comment:

chrippa/ds4drv#93 (comment)

My workaround has been to explicitly enable the uinput module:

boot.kernelModules = [ "uinput" ];

My suggestion is to add uinput to boot.kernelModules whenever hardware.steam-hardware.enable is enabled.

I will send a PR for this if it will be accepted.

Metadata

  • system: "x86_64-linux"
  • host os: Linux 4.19.76, NixOS, 19.09beta606.3ba0d9f75cc (Loris)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3
  • channels(illabout): ""
  • channels(root): "nixos-19.09beta606.3ba0d9f75cc"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: steam
# a list of nixos modules affected by the problem
module: hardware.steam-hardware.enable

cc @nyanloutre @mmahut @vcunat @globin (who all have interacted on steam-releated PRs)

@nyanloutre
Copy link
Member

I didn't have to do this with my Steam controller, but I am on NixOS unstable

@vcunat
Copy link
Member

vcunat commented Oct 5, 2019

19.09 is still very close to master/unstable – forked less than a month ago.

@lhindir
Copy link

lhindir commented Oct 5, 2019

@nyanloutre I am also on nixos-unstable, and I have to run sudo chmod 666 /dev/uinput to get my Steam Controllers to work in games. They work without this in Steam, but they aren't recognized by any games I've tried until I make /dev/uinput read-writeable.

@cdepillabout Thank you for the boot.kernelModules tweak, that's much more declarative for now than what I've been doing. You mention only some games don't work? Could you list some that work without making /dev/uinput rw? Just curious. Thanks!

@cdepillabout
Copy link
Member Author

cdepillabout commented Oct 6, 2019

@lhindir Sorry, I believe I was misleading. I'm actually experiencing the exact same symptoms as you.

Without loading the uinput module (or making /dev/uinput read-writable), my controllers work in the Steam full-screen-mode menu thing.

However, the controllers don't work in the one game I own, Overcooked. I haven't tried the controllers in other games.

@nyanloutre Do you have the uinput module loaded when you run steam? (lsmod | grep uinput?) Is that the reason you don't have to explicitly load uinput?

cdepillabout added a commit to cdepillabout/nixpkgs that referenced this issue Oct 6, 2019
uinput needs to be added to boot.kernelModules in order for the udev
rules defined by steam to be run and set permissions correctly on
/dev/uinput.

See NixOS#70471.
@cdepillabout
Copy link
Member Author

Since this seems to be happening for @lhindir as well, I went ahead and sent a PR:

#70499

@nyanloutre
Copy link
Member

Actually, I got the same bug. I remember it worked before though.

@infinisil infinisil mentioned this issue Dec 25, 2019
10 tasks
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/sunshine-self-hosted-game-stream/25608/7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants