-
Notifications
You must be signed in to change notification settings - Fork 601
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
steam-support: add udev rules from steam-devices #12657
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good (I have given feedback on earlier versions of this branch). The uaccess
rules need to run before 73-seat-late.rules
, which is achieved since snapd writes out the rules as a file named 70-snap.*.rules
.
We're not doing any device tagging here, but we should get that when the interface is paired with joystick and hidraw.
It's a shame we can't rely on Go 1.16 features: the embed package: that would let us keep the udev rules in separate files identical to the ones from https://github.com/ValveSoftware/steam-devices/.
Okay so a misspelling test failed, is there a way to ignore that specific lint? This is a spelling dumped directly from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
func (iface *steamSupportInterface) UDevConnectedPlug(spec *udev.Specification, plug *interfaces.ConnectedPlug, slot *interfaces.ConnectedSlot) error { | ||
spec.AddSnippet(steamSupportSteamInputUDevRules) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realise this would make maintenance for these rules harder, but I wonder if instead of using spec.AddSnippet()
whether it would be worthwhile to expand spec.TagDevice() to instead take an optional tag argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would imagine these rules are copied quasi-verbatim from some other source so it would be annoying to restructure them that way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are actually just copy+pasted from the .rules
files, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Add steam-devices udev rules to steam-support * Make udev changes easier to add * Add Udev spec test for steam-support * run-checks: ignore mispell of "becuase" * run-checks: fix misspelled misspell (the irony) --------- Co-authored-by: Michael Vogt <mvo@ubuntu.com>
This allows the Steam snap to add the
udev
rules from thesteam-devices
apt package. We're currently at an impasse on potentially allowing broader changes to theudev
ecosystem insnapd
so this works as a good enough fix for our current purposes.The issue is that currently for a lot of controllers to work (in Steam), users need to
apt install steam-devices
, which, if installing recommends is enabled (as it is for most people) will also install thedeb
version of Steam. This bypasses this and installs theudev
rules along with the snap on the connection of thesteam-support
plug. The addition is structured such that ifsteam-devices
changes it's easy to copy+paste the new file (at least until/unless the game controller rules end up insystemd
which will likely happen eventually).