-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
handheld-daemon: 1.1.0 -> 2.6.4 #303846
handheld-daemon: 1.1.0 -> 2.6.4 #303846
Conversation
Something that I have noticed that doesn't work is the controller hiding udev rules. Here's an example of a udev rule generated by hhd:
|
Didn't remember that /bin is empty in NixOS 😅 |
Thanks for doing this! I've fallen behind on the update train in large part because I know newer versions of handheld-daemon have iio rules that I haven't gotten around to testing. (Also, I've just been busy with life stuff and not doing much gaming/tinkering.) Here was the first blush at making them work. What device(s) have you tested your upgrade on? Please also include release notes, as linked in the PR template. |
I've added the service with services.handheld-daemon = {
enable = true;
user = username;
package = (pkgs.callPackage ../../apps/handheld-daemon/package.nix { }).override {
};
}; And the daemon runs... |
https://hhd.dev/ can connect to the daemon. |
Haven't really tested iio anything since my device doesn't use it as far as I know.
A 2023 gpd win max 2 with the 7840u
Isn't handheld daemon is already in the release notes? |
@@ -37,6 +39,10 @@ python3.pkgs.buildPythonApplication rec { | |||
hidapi=${ hidapi }/lib/ | |||
test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } | |||
sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py | |||
|
|||
# The generated udev rules point to /bin/chroot, which does not exist in NixOS | |||
chmod=${ coreutils }/bin/chmod |
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.
Should be updated to use toybox.
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.
Thanks to pointing that out, didn't realized it 😅
Btw are we using toolbox cause it's preferred by nixpkgs or cause it's already there? (or both idk)
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.
IDK if it matters. Just suggesting to use it here because it was already in there.
(I think I chose it originally because it's a small dependency and I'd used it before to access POSIX commands.)
I guess it's only for major/breaking changes… 🤷♂️ Sorry, I'm new to this too… |
@pbek On a Legion Go, the most obvious signs that it's working are that the LED lights turn blue (the default PlayStation color) and both the top face buttons (Legion) and bottom face buttons (start+select) work. I don't know enough about the ROG Ally to give similar advice, but if you open your Steam controller settings and see a DualShock, that's a good sign it's working. Are you on |
Hm, did LEDs didn't do anything and the start and select buttons already did work without hhd in steam and games run by steam. 🤔
I can still see the XBOX 360 controller, like without hhd.
Unstable, I just added the I was interested in making use of the additional two front facing buttons of the ROG Ally and something like brightness control... |
Have you set controller emulation to dualsense in hhd.dev? |
Toast's device activates the hrtrigger and creates the proper dir so that has been tested in fact |
ROG Ally also uses the hrtrigger, and there will be appropriate logs showing if it works |
@toast003 I don't have scope to test this right now. If you tell me the current PR works as expected, I'm happy to merge this for you after you update that comment edit. Also feel free to make yourself a maintainer of this lib if you so choose. |
@appsforartists the color of the leds no longer changes due to the playstation driver, the top buttons of the ally are start select @pbek hhd fixes the bottom buttons of the ally to be guide and xbox + a in legacy mode (which opens the side menu in steam). However in the new version if you launch gamescope, it will detect that and connect to the X11 socket and send the command to open the side menu directly. As for controlling the leds, if steam launches in the Deck UI, it will take control of them and change their colors, also allow setting them in the settings. In the legion go, the leds persist across reboots, in other devices they reset every boot. So if steam is not running you lose LED control for now. A UI for the LEDs is planned. |
I have
I can't see any of those logs with I can only see lots of those:
|
Before merging, please bump the version that fixes this bug that was introduced by localization. And perhaps test that localization is read correctly from the system. |
Ah, I see. Thank you! |
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.
redoing LG because the bot insisted, but @NickCao made the requests, so he should be the one doing the reviewing.
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.
Undoing LG because the update looks like it breaks the order of commands in postPatch
.
Wdym @appsforartists ? It builds just fine |
As the comment states, this was originally cargo-culted from @AndersonTorres's # handheld-daemon contains a fork of the python module `hid`, so this hook
# is borrowed from the `hid` derivation.
substituteInPlace src/hhd/controller/lib/hid.py \
--replace-fail libhidapi ${hidapi}/lib/libhidapi
hidapi=${hidapi}/lib/
test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } uses The |
substituteInPlace doesn't use the hidapi bash variable that gets declared later, but I can put it on top |
I don't mind, if that was the only issue I could do it here but whatever is best |
Wut?? |
I misunderstood - I was reading that as a nix variable, not a bash one. I do think we should change |
Fine. |
Ok @NickCao undid the refactor, you can merge now |
With the "not refactored" |
I wanted to get #305027 ready before doing the refactor but I have been very busy lately (and will be until exams are done) so I haven't really had the energy to work on nix things 😅 . I checked the package's results and paths are being changed, so I'm confused on why it isn't for you. |
Description of changes
Lots of changes since this is a pretty big update, but some of the bigger ones are support for more devices, support for tdp settings and gamescope overlay (using packages not in nixpkgs yet) as well as switching to the gpl v3 from the mit license.
hhd-dev/hhd@v1.1.0...v2.6.2
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.