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/steam-hardware: add uinput to boot.kernelModules #70499

Merged
merged 1 commit into from Oct 13, 2019

Conversation

cdepillabout
Copy link
Member

The uinput kernel module needs to be added to loaded in order for the udev rules defined by steam to be run and set permissions correctly on /dev/uinput.

Closes #70471.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @nyanloutre @vcunat @lhindir

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.
@illegalprime
Copy link
Member

i can't add myself as a reviewer but i'll take a look and test

@cdepillabout
Copy link
Member Author

@illegalprime Thanks!

Note that @nyanloutre reported that they didn't actually need to add uinput to boot.kernelModules in order to get their controller working (but @lhindir and I did): #70471 (comment) and #70471 (comment)

@illegalprime
Copy link
Member

in the past I've had this issue with a steam controller and I just needed to chmod /dev/uinput, will test tomorrow morning. would love to get this fixed!

Copy link
Member

@illegalprime illegalprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well for me!

#
# If the udev rules are not triggered, some controllers won't work with
# steam.
boot.kernelModules = [ "uinput" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this made this steam error go away:

Couldnt initialize virtual gamepad: Couldnt open /dev/uinput for writing

This is now my /dev/uinput permissions:

$ ls -al /dev/uinput 
crw-rw----+ 1 root root 10, 223 Oct  6 12:07 /dev/uinput

The steam controller works without steam and in the steam program itself but not in any games without this extra module. I did a test with & without this module with the game VVVVVV, and it fixed the issue (it also changed /dev/uinput's permissions, so it looks like it's doing the right thing).

@nyanloutre
Copy link
Member

working for me

Copy link
Member

@vcunat vcunat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems safe enough, and multiple people confirmed it solves the problem. (I don't have the HW.)

@vcunat vcunat merged commit 1137ac7 into NixOS:master Oct 13, 2019
vcunat added a commit that referenced this pull request Oct 13, 2019
(cherry picked from commit 7818f30)
Adding this kernel module seems unlikely to break stuff, and the change
will only affect those specifying hardware.steam-hardware anyway.
@vcunat vcunat added the 8.has: port to stable A PR already has a backport to the stable release. label Oct 13, 2019
@cdepillabout cdepillabout deleted the add-uinput-to-steam-hardware branch October 13, 2019 08:51
@nixos-discourse
Copy link

This pull request 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 this pull request may close these issues.

nixos hardware.steam-hardware.enable should add the uinput module to kernelModules
5 participants