-
Notifications
You must be signed in to change notification settings - Fork 5
Steam deck client fixes #54
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
base: main
Are you sure you want to change the base?
Conversation
…io playback for some clients
Weird that locking the cursor doesn't work on the steam deck. Could you send me a |
For the audio thing, would you be willing to try pointing at my cpal PR (RustAudio/cpal#957) and seeing if that fixes the audio issues? Make sure you enable the |
Sure, no trouble! For clarity, I added the following to
Unfortunately, the audio still behaved exactly the same with that patch (delayed by seconds, lots of pops). I can see if I can upload a video from my phone if that would help. I ran the client with "WAYLAND_DEBUG=1", but it doesn't seem to give any additional output - was I supposed to run something else with that environment setting? The log is short enough I can post it here: Log
Happy to help if you need anything else! I will probably be offline for the rest of the day, but will find time to help if I can. (edit: formatting and missed one of my patch lines) |
Oh wait, sorry - I'm apparently bad at rust dependencies. I missed these warnings when building:
I updated my Cargo.toml and replaced the import for cpal with this:
but now I'm getting a version conflict for objc2-encode when trying to build:
I'm guessing winit might need another patch to be compatible? |
This is connecting via x11, which is surprising. My understanding of the steam deck is that the final compositor is gamescope, which is a wayland compositor? In any case, that might be why cursor locking isn't working. |
I updated |
I tested it out, and there's some good news and some bad news. The good news is that the audio is no longer popping - it sounds perfectly fine to my ears. The bad news is that the delay got a lot worse... I counted it out to about 15 seconds delay (I'm impressed the audio packet sticks around that long!). I noticed it in my first test, and it seemed so odd that I tried a fresh clean and rebuild to verify, but it was consistent. Again, controls and video were perfectly in sync the whole time. Out of curiosity, I tested this branch out on my other client (running Arch Linux with sway for the compositor). It also observed the severely delayed audio, although that client works fine with the current main branch. (Full disclosure I did have to add in commit a70b6f9 to the Also, all of these tests were running |
Hello again! While tinkering, I was able to fix a couple of issues I saw and thought it might be helpful to push these adjustments upstream. For reference, I'm working on getting mmclient set up and running on my Steam Deck OLED.
My first commit (fixing cursor lock) stops an issue I was seeing where the client would frequently crash. Winit wasn't able to lock the cursor on this device, and so any application that tried to do so would cause the client to abort. I feel like this fix is safe - it won't affect anything that was already working, and confining the cursor seemed to work just as well from my test cases.
My second commit (changing the audio buffer size) is a little more invasive, and I'm honestly not 100% sure why it fixed the issue I was seeing. The issue it fixes is this: on my Steam Deck, when running an application, audio was delayed by about 1-2 seconds and was extremely static-y/poppy sounding (video and input seemed to be just fine, only audio had the problem). Research led me to believe this could be caused by audio buffer size, so that's where I started investigating. The sample_rate coming in was 48000, and so the buffer size was being set to 480 (which seems reasonable). On a whim, I tried hardcoding the value to 512, and, like magic, the problem went away. I looked around and found a mention of powers of 2 being better for some Linux audio functions, but nothing concrete (this seems to be specific to JACK - https://wiki.linuxaudio.org/wiki/list_of_jack_frame_period_settings_ideal_for_usb_interface). Testing this change on other clients didn't seem to introduce any issues (audio still worked fine), so I figured I'd roll with it.
Feel free to take one or both (or none) of these changes - just figured I would put them up here to try and help anyone else who might face similar issues.