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

Unable to use from Y***, any way to test if it is working without Y***? #20

Closed
kidoman opened this issue Apr 6, 2024 · 10 comments · Fixed by #21
Closed

Unable to use from Y***, any way to test if it is working without Y***? #20

kidoman opened this issue Apr 6, 2024 · 10 comments · Fixed by #21

Comments

@kidoman
Copy link

kidoman commented Apr 6, 2024

I started exploring this space as Steam Input (on my Deck OLED) does not have an option to simply "pass through" the gyro to the game (in this case moonlight.) I am not sure why this limitation exists (very new to all this, maybe because it cannot due to x-input?) but I was not satisfied using gyro "As a joystick" due to how it made TOTK behave (my setup is TOTK on Y*** streamed over Sunshine/Moonlight) to my deck.

If i disable "Steam Input" for my Dualsense Edge completely, then the gyro works as expected, but I lose a lot of functionality (like being able to map the FN and rear paddles, trackpad, etc.) which I was not ok with.

I was surprised how well https://github.com/kmicki/SteamDeckGyroDSU worked for the inbuilt gyro in the Deck, and start searching if something like had been already written for external controllers, and found your awesome project.

Now, I had to run the AppImage version of evdevhook2 using sudo, but Y*** test fails as it says it is not getting any motion data.

Is there some other tool i could use to validate if Y*** is at fault, or If I am running evdevhook2 incorrectly on the Deck?

@kidoman kidoman changed the title Unable to use from Yuzu, any way to test if it is working without Y***? Unable to use from Y***, any way to test if it is working without Y***? Apr 6, 2024
@kidoman
Copy link
Author

kidoman commented Apr 6, 2024

Looks like I had the wrong assumption that the Dualsense Edge was automatically supported. Testing with a normal Dualsense worked as expected.

@v1993 v1993 mentioned this issue Apr 6, 2024
@v1993
Copy link
Owner

v1993 commented Apr 6, 2024

Please see if #21 fixes this. You can download test appimage here in artifacts section.

@kidoman
Copy link
Author

kidoman commented Apr 6, 2024

Thanks for this mate.

Btw, do you know if it is possible to run this without sudo on a Steam Deck?

@v1993
Copy link
Owner

v1993 commented Apr 6, 2024

It should be, but I don't know how exactly deck handles device permissions.

Please report your DualSense Edge testing results when you have time.

@kidoman
Copy link
Author

kidoman commented Apr 6, 2024

Can confirm, that this adds support for the Dualsense Edge controller!

@v1993 v1993 closed this as completed in #21 Apr 6, 2024
@v1993
Copy link
Owner

v1993 commented Apr 6, 2024

Great to hear, I've released v1.0.2 with DualSense Edge support included.

@kidoman
Copy link
Author

kidoman commented Apr 6, 2024

For anyone happening by trying to get their Dualsense Edge (or any other) controller gyro to work on the Steam Deck, here is what I did to be able to run evdevhook2 without sudo:

  1. Run evdevhook2 and note the /dev/input/eventNN device it is trying to access but failing.
  2. Run this command udevadm info -a -p $(udevadm info -q path -n /dev/input/eventNN)
  3. From the output, note the ATTRS{id/product} and ATTRS{id/vendor} from the same block which also has ATTRS{name} matching the name of your controller.
  4. From sudo, create a file called 70-name-of-controller.rules inside /etc/udev/rules.d with the content:
SUBSYSTEM=="input", ATTRS{id/product}=="your product id", ATTRS{id/vendor}=="your vendor id", TAG+="uaccess"
  1. Run udevadm control --reload-rules && udevadm trigger
  2. Now you should be able to run evdevhook2 without needing sudo.

@kidoman
Copy link
Author

kidoman commented Apr 6, 2024

Furthermore, if you want to run evdevhook2 as a service, you can create a file:

~/.config/systemd/user/evdevhook2.service

[Unit]
Description=evdevhook2 server
After=sockets.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
ExecStart=%h/evdevhook2/evdevhook2-v1.0.2-x86_64.AppImage %h/evdevhook2/evdevhook2.ini

[Install]
WantedBy=default.target

After that, systemctl --user -q enable --now evdevhook2.service should enable/start the service. You will probably need to restart the service when you plug in new controllers (@v1993 has to confirm this) using systemctl --user restart evdevhook2.service

PS: looks like restarting the service is not required. I tested disconnecting and reconnecting the controller. It was able to detect the change.

@v1993
Copy link
Owner

v1993 commented Apr 6, 2024

That's a nice guide! I'd appreciate if you'd post it in discussions section of this repo under "show and tell" to make it easier to discover.

Notes:

  1. Hotplug works just fine, no need to restart
  2. Vendor/Product IDs can also be found in https://github.com/v1993/evdevhook2/blob/main/src/DeviceTypes.ini

@kidoman
Copy link
Author

kidoman commented Apr 6, 2024

Will do.

Also, I think we can help auto generate this as an artifact given we have the .ini file:

70-evdevhook2.rules (to be placed at /etc/udev/rules.d)

SUBSYSTEM=="input", ATTRS{id/vendor}=="057e" , ATTRS{id/product}=="2006", TAG+="uaccess"
SUBSYSTEM=="input", ATTRS{id/vendor}=="057e" , ATTRS{id/product}=="2007", TAG+="uaccess"
SUBSYSTEM=="input", ATTRS{id/vendor}=="057e" , ATTRS{id/product}=="2009", TAG+="uaccess"
SUBSYSTEM=="input", ATTRS{id/vendor}=="054c" , ATTRS{id/product}=="0268", TAG+="uaccess"
SUBSYSTEM=="input", ATTRS{id/vendor}=="054c" , ATTRS{id/product}=="05c4", TAG+="uaccess"
SUBSYSTEM=="input", ATTRS{id/vendor}=="054c" , ATTRS{id/product}=="09cc", TAG+="uaccess"
SUBSYSTEM=="input", ATTRS{id/vendor}=="054c" , ATTRS{id/product}=="0ce6", TAG+="uaccess"
SUBSYSTEM=="input", ATTRS{id/vendor}=="054c" , ATTRS{id/product}=="0df2", TAG+="uaccess"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants