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

Reading from hiddev file failed. #16

Closed
humanoidcreature opened this issue May 29, 2022 · 22 comments
Closed

Reading from hiddev file failed. #16

humanoidcreature opened this issue May 29, 2022 · 22 comments
Assignees

Comments

@humanoidcreature
Copy link

Hi kmicki,

I'm trying to make the gyro work on steam deck, but I'm facing some issues.
Latest version of the repo is installed, the correct Wii U controller is selected in Cemu, I removed the DSU controller input what Emudeck installed. I think I checked everything what I can, but still no gyro in botw.
Here's the status while cemu is running:

● sdgyrodsu.service - Steam Deck Gyro DSU Server
     Loaded: loaded (/home/deck/.config/systemd/user/sdgyrodsu.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2022-05-29 20:04:07 CEST; 3s ago
   Main PID: 17089 (sdgyrodsu)
      Tasks: 6 (limit: 17764)
     Memory: 708.0K
        CPU: 329ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/sdgyrodsu.service
             └─17089 /home/deck/sdgyrodsu/sdgyrodsu

May 29 20:04:10 steamdeck sdgyrodsu[17089]: HidDevReader: Reading from hiddev file started in the middle of t>
May 29 20:04:10 steamdeck sdgyrodsu[17089]: HidDevReader: Reopening hiddev file...
May 29 20:04:10 steamdeck sdgyrodsu[17089]: HidDevReader: Reading from hiddev file started in the middle of t>
May 29 20:04:10 steamdeck sdgyrodsu[17089]: HidDevReader: Reopening hiddev file...
May 29 20:04:10 steamdeck sdgyrodsu[17089]: HidDevReader: Reading from hiddev file started in the middle of t>
May 29 20:04:10 steamdeck sdgyrodsu[17089]: HidDevReader: Reopening hiddev file...
May 29 20:04:10 steamdeck sdgyrodsu[17089]: HidDevReader: Reading from hiddev file started in the middle of t>
May 29 20:04:10 steamdeck sdgyrodsu[17089]: HidDevReader: Reopening hiddev file...
May 29 20:04:10 steamdeck sdgyrodsu[17089]: HidDevReader: Reading from hiddev file started in the middle of t>
May 29 20:04:10 steamdeck sdgyrodsu[17089]: HidDevReader: Reopening hiddev file...

And here's the log:
sdgyrodsu.log

@kmicki
Copy link
Owner

kmicki commented May 30, 2022

Please run command

cat /dev/usb/hiddev0 > hiddevlog.hex

and after a few seconds press CTRL+C to interrupt it.

Then please upload here the created hiddevlog.hex file.

@humanoidcreature
Copy link
Author

hiddevlog.zip

I couldn't upload .hex file here directly, so I put it into a zip file.

@kmicki
Copy link
Owner

kmicki commented May 30, 2022

For some reason your hiddev file behaves differently than mine. I hoped such things will be consistent between one Deck to the other.

I would like to prepare a test version with a fix for you to test - are you okay with it?

@humanoidcreature
Copy link
Author

Yes, sure. I'm up to it.

@kmicki
Copy link
Owner

kmicki commented May 30, 2022

SteamDeckGyroDSUSetup.zip

Above is the link to the test binary package. Enter following commands to install it on Deck:

cd
wget https://github.com/kmicki/SteamDeckGyroDSU/files/8798561/SteamDeckGyroDSUSetup.zip
unzip -o SteamDeckGyroDSUSetup.zip
cd SteamDeckGyroDSUSetup
./install.sh

Please check if that works for you.

Source of the test package is at hiddev_test branch.

@humanoidcreature
Copy link
Author

Wow it's working, really amazing. You handled it really fast! :)

By reading the status a few warnings still present, but I didn't notice any hiccups with the bow:

● sdgyrodsu.service - Steam Deck Gyro DSU Server
     Loaded: loaded (/home/deck/.config/systemd/user/sdgyrodsu.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-05-30 17:21:00 CEST; 2min 57s ago
   Main PID: 36363 (sdgyrodsu)
      Tasks: 6 (limit: 17764)
     Memory: 584.0K
        CPU: 9.695s
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/sdgyrodsu.service
             └─36363 /home/deck/sdgyrodsu/sdgyrodsu

May 30 17:23:25 steamdeck sdgyrodsu[36363]: HidDevReader: Reading from hiddev file failed.
May 30 17:23:25 steamdeck sdgyrodsu[36363]: HidDevReader: Reopening hiddev file...
May 30 17:23:25 steamdeck sdgyrodsu[36363]: HidDevReader: Missed 1 frames.
May 30 17:23:25 steamdeck sdgyrodsu[36363]: HidDevReader: Replicating missing frames.
May 30 17:23:39 steamdeck sdgyrodsu[36363]: HidDevReader: Missed 32 frames.
May 30 17:23:39 steamdeck sdgyrodsu[36363]: HidDevReader: Changed scan period to : 3960 us
May 30 17:23:39 steamdeck sdgyrodsu[36363]: HidDevReader: Replicating missing frames.
May 30 17:23:53 steamdeck sdgyrodsu[36363]: HidDevReader: Missed 32 frames.
May 30 17:23:53 steamdeck sdgyrodsu[36363]: HidDevReader: Changed scan period to : 3959 us
May 30 17:23:53 steamdeck sdgyrodsu[36363]: HidDevReader: Replicating missing frames.

Here's the log:
sdgyrodsu.log

@kmicki
Copy link
Owner

kmicki commented May 30, 2022

Great, thank you for testing. I see in the logs that every now and then there is a problem with reading the hiddev file for a few seconds, but missing frame count is not high, so they get replicated and you do not notice hiccups.
Other warnings are a normal thing in the current version.

I still don't understand why the data looks different on your machine. Do you have Steam started or not during testing?

@humanoidcreature
Copy link
Author

humanoidcreature commented May 30, 2022

No problem. :)
Steam is running. I need it to be able to run Cemu through Proton.
What's the difference exactly?
Can it be related to character coding? (I'd be surprised, but who knows...) But anyway, only the Steam virtual keyboard is hungarian, everything else is english.
Also I have the lastest beta OS on the Deck.

@Crono141
Copy link

not to hijack this issue, but how did you go about removing emudeck version of this? I'm getting some weird behavior as well and I'm trying to troubleshoot and try this test version. Thanks.

@kmicki
Copy link
Owner

kmicki commented May 30, 2022

@Crono141 when you run the commands in the other comment, the test version will replace the one installed by emudeck. See also #15 - another issue that happens when using Cemu from Emudeck.

@Crono141
Copy link

thanks. This fixed me.

@kmicki kmicki self-assigned this May 31, 2022
@Oktavian76
Copy link

Hi, I seem to have the same issue. Gyro does not work, logfile has lots of "Reading from hiddev file failed". First I tried the original version of DSU, but I also installed the version from this issue, both with the same behavior.

Any ideas?
sdgyrodsu.log

@kmicki
Copy link
Owner

kmicki commented Jun 1, 2022

@Oktavian76 Your issue is a little different. From the log it looks like it should work. I see also that 2 clients are trying to connect to the server. Try the solution from #15. If that doesn't help, please try PadTest - run it when Cemu is not running. You have to do that from another PC or add it as a non-steam game in desktop mode and force Proton in properties.

@Oktavian76
Copy link

Oktavian76 commented Jun 1, 2022

I just tried what you suggested. First I switched back to the official version of DSU. Then I started PadTest on another PC and connected it to the Deck. This works fine, I can see the movement.

Then I started Cemu again. GamePadMotionSource is set to DSU1 and "by slot". In Input Settings the controller is "Controller 1 [XInput]", under Settings no "Use motion", it is grayed out. No other controller selectable.

The Cemu I use is not from Emudeck but directly downloaded from their page and manually added to Steam.

dsu.log

@kmicki
Copy link
Owner

kmicki commented Jun 1, 2022

@Oktavian76 That means that Cemu is not responding to data.
Please confirm that in Input Settings there is 'WiiU Gamepad' selected as a controller nad not Pro Controller.

@Oktavian76
Copy link

Just doublechecked, "Emulated Controller" is set to "Wii U GamePad"

@kmicki
Copy link
Owner

kmicki commented Jun 1, 2022

What game do you test? In BOTW there is a setting in the system menu to enable gyro aiming.

@Oktavian76
Copy link

Yes, sometimes it is so easy. Before installing your software I use gyro from the SteamDeck to help aiming, so aiming with gyro in BOTW was disabled. Now after enableing it also in the game it works fine. Thank you for your help.

@kmicki
Copy link
Owner

kmicki commented Jun 1, 2022

Fixed in v1.11.

@kmicki kmicki closed this as completed Jun 1, 2022
@Berinkton
Copy link

Hello kmicki,

your software worked great up until the SteamOS 3.2 Update and now i have the same problem as @humanoidcreature.

I am running the newest version (v1.13) and my Cemu settings have not changed since the working state (before SteamOS 3.2). Every thing in Cemu and Cmuhook is configured as it should be and as it was when it worked.

The log
sdgyrodsu.log
and the hiddevlog.hex
hiddevlog.zip

i hope you can find a solution.

@kmicki
Copy link
Owner

kmicki commented Jun 6, 2022

@Berinkton 2 clients try to connect to the server. Check this comment.

@Berinkton
Copy link

@kmicki Thx its fixed 😅

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

No branches or pull requests

5 participants