sc-controller icon indicating copy to clipboard operation
sc-controller copied to clipboard

Absolutely and utterly refuses to work in snap form

Open Icekhaos opened this issue 3 years ago • 9 comments

I followed the snap description's instructions down to the letter, verified that the apparmor rules are present and correct, and all the udev rules are present as well (including those from steam-devices), and no matter what the hell I do, it gives me:

There was an error with enabling emulation: Failed to create uinput device. Error code: -1

Except that literally everything is correct and functional.

Icekhaos avatar Jul 15 '20 02:07 Icekhaos

It seems whoever made the snap got it to work, but doesn't seem to detail how, or if it involves prerelease snapd versions. Might be the case?

Icekhaos avatar Jul 15 '20 02:07 Icekhaos

I'm sorry, but what snap description's instructions? AFAIK, snap (and flatpack) are using form of sandbox and so it should be impossible to run anything like sc-controller with them.

kozec avatar Jul 15 '20 06:07 kozec

There has been an effort to package sc-controller as a snap package. https://forum.snapcraft.io/t/best-way-to-access-dev-uinput/16242/6 https://neil.themcphails.uk/2020/04/22/making-a-snap-package-of-sc-controller/ https://snapcraft.io/sc-controller

Although considering https://github.com/snapcore/snapd/pull/8867 is not merged yet, this may be due to that. I'm a little too busy/uninformed on how to build an alternate snapd from github, even though it could probably be one easily. I also want to try keeping my system at least a little bit clean, if possible.

Icekhaos avatar Jul 15 '20 23:07 Icekhaos

Hi. I'm the one making the snap. It will work if the uinput interface gets accepted into snapd, but you'll still need to install the steam controller udev rules (such as using the steam-devices package in Ubuntu) for it to work. Be patient; we'll get there. I'm as keen as you are to use this.

You'll probably want to close this bug and file it against the snap package, unless @kozec has any interest in adopting the snap package when it starts working?

mcphail avatar Jul 24 '20 21:07 mcphail

Where would I file it against the snap?

Also I feel this is more a case of missing instructions. How would you get the specific snapd branch required for this to work for starters?

Icekhaos avatar Jul 26 '20 18:07 Icekhaos

Using the currently-published version of the snap in the --edge channel and the current (2.45) verison of snapd, the application will work if you jump through all the hoops mentioned in the snapcraft forum thread you linked above. It is fragile, because all the modifications are lost if snapd updates or any other snaps are installed or updated, so it is not suitable for anything beyond a proof of concept.

When 2.46 releases, I'll be releasing a version of the snap which requests access to the uinput interface. The app should then work automatically and sufficiently for use with a Steam Controller and receiver. More work will have to be done to cope with bluetooth connections and other controllers.

Because the uinput interface will be "superprivileged", the app won't be available to download until it is approved for connection. The app is unlikely to be approved for connection if it is listed under my name. At present, I'm looking to transfer the snap to a trusted snapcrafter. Alternatively, @kozec may choose to adopt the snap as a work-in-progress if they were very keen. I'd be continuing to work to improve the snap either way, as a collaborator rather than owner.

You can raise issues against the snap at https://github.com/mcphail/sc-controller-snap/issues .

mcphail avatar Jul 27 '20 15:07 mcphail

Except I did all of that and it still does not work

Icekhaos avatar Jul 27 '20 17:07 Icekhaos

The basic application should now be working with the current snap and an up-to-date version of snapd. There's still work to be done such as enabling bluetooth support and testing/enabling other controllers.

mcphail avatar Oct 23 '20 17:10 mcphail

@mcphail i see the snap repo is now readonly, but it is not obvious why

Update: just found the thread: https://forum.snapcraft.io/t/putting-my-snaps-up-for-adoption/26847

Fuseteam avatar Jun 17 '23 18:06 Fuseteam