fix(packaging): ensure that uhid is loaded automatically
Description
There have been at least two reports of non-working DualSense5 emulation due to uhid not being loaded.
With this PR we'll configure systemd to automatically load uhid. (I suppose that currently it depends on the distribution and on which other devices the user may have connected to the host. I'm not sure.)
Do note that I'm rather new to CMake.
I did a few local tests (mainly a brief test that the uhid config is put in place correctly and that the module is loaded). I did not test rpm but since it shares the postinst with the .deb it should be fine.
- [x] .deb
- [ ] .rpm
- [x] Arch
- [x] AppImage
- [x] Flatpak
Screenshot
Issues Fixed or Closed
Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Dependency update (updates to dependencies)
- [x] Documentation update (changes to documentation)
- [ ] Repository update (changes to repository files, e.g.
.github/...)
Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated the in code docstring/documentation-blocks for new or existing methods/components
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch must be updated before it can be merged. You must also Allow edits from maintainers.
- [x] I want maintainers to keep my branch updated
Somehow I can no longer run the CI in my fork. It always fails at the Setup Release step:
ERROR: Squash and merge is not enabled for this repository. Please ensure ONLY squash and merge is enabled. DO NOT re-run this job after changing the repository settings. Wait until a new commit is made.
I then modified the settings in my repository according to the message but that did not work. (Probably because on my fork it's a branch and not a pull request.)
I don't know how to proceed to get this tested.
Somehow I can no longer run the CI in my fork. It always fails at the Setup Release step:
ERROR: Squash and merge is not enabled for this repository. Please ensure ONLY squash and merge is enabled. DO NOT re-run this job after changing the repository settings. Wait until a new commit is made.I then modified the settings in my repository according to the message but that did not work. (Probably because on my fork it's a branch and not a pull request.)
I don't know how to proceed to get this tested.
My suggestion is to create a PR into your master branch and run the CI that way.
My suggestion is to create a PR into your master branch and run the CI that way.
Ah, in hindsight that's kind of obvious. Thanks!
There are some comments here we may want to investigate: https://github.com/LizardByte/Sunshine/issues/1720#issuecomment-2246424752
FYI: https://github.com/LizardByte/Sunshine/pull/3041
There were some updates related to this recently, I'm not sure if any of this is still needed?
There were some updates related to this recently, I'm not sure if any of this is still needed?
I'll have to (double) check but I'm unfortunately short on time. Yesterday, after distro-upgrading, I installed the latest published pre-release and quickly checked lsmod | grep uhid and uhid did show up. I planned on just leaving a comment here and closing my PR, but with the AMD PR still checked out I now don't have uhid loaded (and Sunshine is complaining about missing ds5 support).
Okay, no problem. I'll mark this as draft for now.
It looks like this PR has been idle for 90 days. If it's still something you're working on or would like to pursue, please leave a comment or update your branch. Otherwise, we'll be closing this PR in 10 days to reduce our backlog. Thanks!
This PR was closed because it has been stalled for 10 days with no activity.
It might make sense to care of https://github.com/LizardByte/Sunshine/pull/3763 in this PR as well?
It might make sense to care of #3763 in this PR as well?
For now I've just updated the PR by merging current master into it (and fixing two conflicts). I also checked that the latest stable Sunshine for Ubuntu 24.04 (downloaded from github) still doesn't work out-of-the-box for DS5 emulation and that this PR fixes it. I did not re-check Arch, AppImage, Flatpak but the merge commit was rather straightforward so I don't expect any major issues. And to be honest I'd prefer not to deal with Flatpaks right now.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 11.94%. Comparing base (6de97fd) to head (3a0bd46).
:white_check_mark: All tests successful. No failed tests found.
Additional details and impacted files
@@ Coverage Diff @@
## master #2906 +/- ##
=======================================
Coverage 11.94% 11.94%
=======================================
Files 92 92
Lines 17633 17633
Branches 8109 8109
=======================================
Hits 2107 2107
Misses 14628 14628
Partials 898 898
| Flag | Coverage Δ | |
|---|---|---|
| Linux-AppImage | 11.56% <ø> (ø) |
|
| Windows-AMD64 | 13.25% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
I think an update is needed to the fedora spec.
https://github.com/LizardByte/Sunshine/blob/8bfb65ee4b37e4ea6ef23739f369c6dcf4063390/packaging/linux/fedora/Sunshine.spec#L223-L260
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Thank you for taking over and merging!