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

Steam Remote Play connecting to ChimeraOS crashes Steam on ChimeraOS #523

Open
TeamLinux01 opened this issue Feb 27, 2023 · 31 comments
Open

Comments

@TeamLinux01
Copy link

I install ChimeraOS on my PC and tried to Remote Play from it to my Steam Deck. It would crash Steam on ChimeraOS when connecting.

From what I have deduced, it is a problem with running under Wayland. I had the same kind of problem when trying to Remote Play from Manjaro on the same system without starting Steam with the -pipewire flag.

My PC specs are as follows:
Intel i7 4790 CPU (tried with both the iGPU enabled and disabled)
32GB RAM
AMD Rx580 8GB GPU
1TB Sata SSD
4TB Sata HDD

@Samsagax
Copy link
Member

Can you check if adding the -pipewire flag helps?

@TeamLinux01
Copy link
Author

TeamLinux01 commented Feb 28, 2023

I switched to desktop mode, opened the terminal and launched steam with the command steam -pipewire.

It asked which monitor I wanted to share, I selected the correct one, launched BPM (GamepadUI), went to my deck and connected a game from it.

No crashes, it streamed at 720p at about 58fps over 5Ghz wifi.

@ruineka
Copy link
Contributor

ruineka commented Feb 28, 2023

Thanks for sharing. I've been meaning to look into this, but I haven't had a chance...I wonder what happens if we add -pipewire to the gamescope-session.

@DaedalusHyperboreus
Copy link
Contributor

It might be the same issue I'm having.
I opened an issue at Valve: ValveSoftware/steam-for-linux#9242.

According to them it seems it could be a regression in libX11.

@Samsagax
Copy link
Member

Samsagax commented Mar 2, 2023

Thanks for sharing. I've been meaning to look into this, but I haven't had a chance...I wonder what happens if we add -pipewire to the gamescope-session.

@TeamLinux01 could you test this? you need to write a .conf file under ~/.config/environment.d and override STEAMCMD environment variable. Like this:

STEAMCMD="steam -gamepadui -steamos3 -steampal -steamdeck -pipewire"

on a file called ~/.config/environment.d/steam-pipewire.conf

To come back to the original behaviour just comment the line or remove the file.

@TeamLinux01
Copy link
Author

TeamLinux01 commented Mar 2, 2023

Thanks for sharing. I've been meaning to look into this, but I haven't had a chance...I wonder what happens if we add -pipewire to the gamescope-session.

@TeamLinux01 could you test this? you need to write a .conf file under ~/.config/environment.d and override STEAMCMD environment variable. Like this:

STEAMCMD="steam -gamepadui -steamos3 -steampal -steamdeck -pipewire"

on a file called ~/.config/environment.d/steam-pipewire.conf

To come back to the original behaviour just comment the line or remove the file.

I made the file, rebooted Chimera, started Remote Play from the Deck and it streamed audio and video for half a second then crashed steam.

Seems like progress. I wonder if the crashing does have to do with libX11. At least we can get something to display before it crashes now.

@TeamLinux01
Copy link
Author

A side question if you don't mind. Why is "-gamepadui -steamos3 -steampal -steamdeck" added as flags for the gamescope session? With the newer versions of Steam, BPM has been replaced with GamepadUI anyways. Also, is it a good idea to look like a Deck on non-deck hardware?

If it is as simple as "be as close to the Deck" for the configuration, I understand.

In the future, should I open a new issue for this kind of question or is there a place to discuss these things?

@ruineka
Copy link
Contributor

ruineka commented Mar 2, 2023

A side question if you don't mind. Why is "-gamepadui -steamos3 -steampal -steamdeck" added as flags for the gamescope session? With the newer versions of Steam, BPM has been replaced with GamepadUI anyways. Also, is it a good idea to look like a Deck on non-deck hardware?

If it is as simple as "be as close to the Deck" for the configuration, I understand.

In the future, should I open a new issue for this kind of question or is there a place to discuss these things?

Because these parameters are needed for gamescope to make use of FSR/FPS caps and the such from within the Steam overlay. Once we get the oGUI overlay working, we can work towards removing the Steam Deck parameters because it'll no longer be necessary.

Also the desktop gamepadui isn't that great when using it with the gamescope session, I don't think Valve is testing it in this environment and I've ran into odd issues, such as black screens when launching games etc.

@TeamLinux01
Copy link
Author

A side question if you don't mind. Why is "-gamepadui -steamos3 -steampal -steamdeck" added as flags for the gamescope session? With the newer versions of Steam, BPM has been replaced with GamepadUI anyways. Also, is it a good idea to look like a Deck on non-deck hardware?

If it is as simple as "be as close to the Deck" for the configuration, I understand.

In the future, should I open a new issue for this kind of question or is there a place to discuss these things?

Because these parameters are needed for gamescope to make use of FSR/FPS caps and the such from within the Steam overlay. Once we get the oGUI overlay working, we can work towards removing the Steam Deck parameters because it'll no longer be necessary.

Also the desktop gamepadui isn't that great when using it with the gamescope session, I don't think Valve is testing it in this environment and I've ran into odd issues, such as black screens when launching games etc.

Thanks for the speedy and detailed answer. It makes a lot of sense.

I appreciate the response and the great work from the team.

@TeamLinux01
Copy link
Author

One more comment about the other flags, I ran some tests without them and I had broken functionality (no surprise).

I could not switch to the desktop session. Leaving this here as a warning to not remove the other flags as of this moment. Thanks!

@0xbrigles
Copy link

Same behaviour here.
Trying to use the stream option to Steam Deck result in a crash of Steam on ChimeraOS.
Same by using Steam Link, but here it depends on the device which receive the stream. As example, on one Android TV it is working and on the other not. Also streaming to laptop is not working sadly.

I tried to add the env overlay in ~/.config/environment.d/steam-pipewire.conf and it works for 1-2 seconds but then crashs again.

@maddox
Copy link

maddox commented Apr 8, 2023

Any new info on this?

@Samsagax
Copy link
Member

Seems to be a problem with pipewire/gamescope/steam: ValveSoftware/gamescope#775

@ruineka
Copy link
Contributor

ruineka commented Apr 13, 2023

Seems to be a problem with pipewire/gamescope/steam: ValveSoftware/gamescope#775

Seems related to priority buffers... should be easy to test with pipewire git by removing priority and allowing gamescope to use the source buffer.

@safijari
Copy link

Seems to be a problem with pipewire/gamescope/steam: ValveSoftware/gamescope#775

Seems related to priority buffers... should be easy to test with pipewire git by removing priority and allowing gamescope to use the source buffer.

I'm set up to build and test these on a machine. Can you give a bit more guidance on how I would remove priority in pipewire?

@ruineka
Copy link
Contributor

ruineka commented Apr 28, 2023

Seems to be a problem with pipewire/gamescope/steam: ValveSoftware/gamescope#775

Seems related to priority buffers... should be easy to test with pipewire git by removing priority and allowing gamescope to use the source buffer.

I'm set up to build and test these on a machine. Can you give a bit more guidance on how I would remove priority in pipewire?

I did some testing based on what others shared and I wasn't able to reproduce the same results. If you can manage to build pipewire 0.3.59 and test with that and confirm streaming works that would be extremely valuable information.

When I tested this there were some conflicts that needed resolved to be usable with the rest of the packages shipped today.

@safijari
Copy link

safijari commented Apr 28, 2023

Seems to be a problem with pipewire/gamescope/steam: ValveSoftware/gamescope#775

Seems related to priority buffers... should be easy to test with pipewire git by removing priority and allowing gamescope to use the source buffer.

I'm set up to build and test these on a machine. Can you give a bit more guidance on how I would remove priority in pipewire?

I did some testing based on what others shared and I wasn't able to reproduce the same results. If you can manage to build pipewire 0.3.59 and test with that and confirm streaming works that would be extremely valuable information.

When I tested this there were some conflicts that needed resolved to be usable with the rest of the packages shipped today.

I already did this testing, both on the Steam Deck and on a separate laptop. 59 works perfectly.

Edit: I realize people are talking about a different thing here. I'm not doing remote play. I'm capturing gamescope using gstreamer and pipewiresrc. The crash (and very likely the underlying issue) are the same.

@ruineka
Copy link
Contributor

ruineka commented Apr 28, 2023

Seems to be a problem with pipewire/gamescope/steam: ValveSoftware/gamescope#775

Seems related to priority buffers... should be easy to test with pipewire git by removing priority and allowing gamescope to use the source buffer.

I'm set up to build and test these on a machine. Can you give a bit more guidance on how I would remove priority in pipewire?

I did some testing based on what others shared and I wasn't able to reproduce the same results. If you can manage to build pipewire 0.3.59 and test with that and confirm streaming works that would be extremely valuable information.

When I tested this there were some conflicts that needed resolved to be usable with the rest of the packages shipped today.

I already did this testing, both on the Steam Deck and on a separate laptop. 59 works perfectly.

Edit: I realize people are talking about a different thing here. I'm not doing remote play. I'm capturing gamescope using gstreamer and pipewiresrc. The crash (and very likely the underlying issue) are the same.

Ah gotcha. I just realized you are the same person who mentioned that 59 works with a link to the commit that added priority. I reverted this and it didn't fix remote streaming. I'm curious if it fixes your use case though.

You can checkout pipewire and do a git revert <commit> to undo the commit you shared and see if it gets 0.3.69 working for you. If that doesn't work you'll need to remove the changes by hand by referencing the before and after changes.

Edit:
It's just some added lines so it'll be easy for you to remove the lines in green and build pipewire. PipeWire/pipewire@7631316

@TeamLinux01
Copy link
Author

After a brief checking out of Nobara Project, I have decided to go back to ChimeraOS as my main gaming OS.

Is there anything I can try to get remote play working now? I would really like to use this feature and keep ChimeraOS.

I am able to get most games to Remote Play on Nobara Project using wayland/pipewire.

@maddox
Copy link

maddox commented May 10, 2023

If you mean ChimeraOS -> Client, I'd suggest skipping steam remote play completely and using Sunshine. It's easier to manage, works 100% of the time, and in my experience has been flawless.

I've used it on Apple TV, iPadOS, macOS, and the Steam Deck. It's great.

Being able to manage it via a web admin is the icing on the cake.

@TeamLinux01
Copy link
Author

If you mean ChimeraOS -> Client, I'd suggest skipping steam remote play completely and using Sunshine. It's easier to manage, works 100% of the time, and in my experience has been flawless.

I've used it on Apple TV, iPadOS, macOS, and the Steam Deck. It's great.

Being able to manage it via a web admin is the icing on the cake.

My issue with sunshine is that I want to be able to send all of the inputs from the Steam Deck back to ChimeraOS. Sunshine seems to make a basic virtual Xbox controller.

@maddox
Copy link

maddox commented May 10, 2023

Ah yeah, it's certainly weird with 2 layers of Steam Overlay. On Apple TV, I'm able to trigger the steam button with start + select, and it even works with the QAM.

I assume your issue is the back buttons and maybe the pads?

@TeamLinux01
Copy link
Author

Ah yeah, it's certainly weird with 2 layers of Steam Overlay. On Apple TV, I'm able to trigger the steam button with start + select, and it even works with the QAM.

I assume your issue is the back buttons and maybe the pads?

The track pads, for sure. I like to play games that require a mouse/keyboard and the trackpads are required for decent mouse movement.

@TeamLinux01
Copy link
Author

If you mean ChimeraOS -> Client, I'd suggest skipping steam remote play completely and using Sunshine. It's easier to manage, works 100% of the time, and in my experience has been flawless.

I've used it on Apple TV, iPadOS, macOS, and the Steam Deck. It's great.

Being able to manage it via a web admin is the icing on the cake.

On the note of sunshine, what is the best way to get it working on ChimeraOS? Does anyone have a guide?

I would like it so I don't have to input anything for it to work to connect to ChimeraOS, just start moonlight on the Deck and connect. I figured I would give it a shot since ChimeraOS is designed to be controller (Xbox style controls) only anyways, so I would say sunshine is inline with the goal of ChimeraOS.

@maddox
Copy link

maddox commented May 10, 2023

On the note of sunshine, what is the best way to get it working on ChimeraOS? Does anyone have a guide?

While they're not on Flathub, they do provide a Flatpack in their Releases on their repo.

I downloaded that and installed it, since it should persist through ChimeraOS updates.

I added a service so I could get it running, but the only issue is, it doesn't start on boot. So I have to manage it myself. I maintain some scripts for helping me manage multiple ChimeraOS deploys, which include these sunshine scripts.

If I could figure out the hooks, maybe I could get it to start on boot correctly, any help here would be awesome.

@TeamLinux01
Copy link
Author

I found a way to get the service to start from the gamescope session.
After you install the flatpak in the user, create this file:
~/.config/environment.d/sunshine.conf

#!/bin/bash
systemctl --user start sunshine.service

and make the file executable.

It does not run on the wayland session, but for what I want to do, that is fine by me.

@maddox
Copy link

maddox commented May 10, 2023

I can't get this to work. Something else seems to be starting sunshine on boot. I've disabled the service and It's still happening, it's weird. So I still connect via Moonlight and see a black screen.

Honestly, I installed Sunshine a different way on this computer. I'll try to purge it first and use the flatpack method.

@TeamLinux01
Copy link
Author

I should have done a bit more testing before commenting.

I was just happy to get the service running, but when actually trying to connect I get a black screen.
It probably has to do with the way wayland segments connections. I will try to figure out how to give sunshine permission to access the screen in gamescope.

@maddox
Copy link

maddox commented May 10, 2023

Ahh yeah, when I said “wouldn’t start on boot” that’s what I meant.

@maddox
Copy link

maddox commented May 11, 2023

If you start it after booting has completed it works.

@TeamLinux01
Copy link
Author

I did a clean install of chimeraos-2023.07.06-x86_64.iso and tried to remote play from my Steam Deck as a client. It crashes gamescope and restarts Steam.

Anything I can do again to help this not be a problem out of the box?

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

7 participants