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

Add to README gamescope+mangohud hack? #400

Open
ca5ua1 opened this issue Feb 6, 2022 · 10 comments
Open

Add to README gamescope+mangohud hack? #400

ca5ua1 opened this issue Feb 6, 2022 · 10 comments

Comments

@ca5ua1
Copy link

ca5ua1 commented Feb 6, 2022

I have exact same issue as in #70 (comment)_

And the fix works fine, otherwise most of my games won't work with gamescope + mangohud (it is actually why I didn't used it entire time)

This put me on the right track though I had to modify it a little:
MANGOHUD=0 gamescope -- mangohud %command%
This way the game starts with mangohud. Setting MANGOHUD=1 before the gamescope command would result in the same segfault.

So, let's add this to README.md

@Joshua-Ashton
Copy link
Collaborator

Probably makes more sense to just use mangoapp instead of mangohud when using gamescope

@ca5ua1
Copy link
Author

ca5ua1 commented Feb 7, 2022

What is actually mangoapp, I've never heard of it and can't find a clue what is it (except some mentions in mangohud code)?

@GithubUser5462
Copy link

I was able to find this in the release notes of MangoHud Version 0.6.6:

Mangoapp - This is an application that is designed to be run together with gamescope and rendered on top of gamescope

@Samsagax
Copy link

Samsagax commented Feb 8, 2022

I was able to find this in the release notes of MangoHud Version 0.6.6:

Mangoapp - This is an application that is designed to be run together with gamescope and rendered on top of gamescope

Current ArchLinux package does not compile that binary. The usage is simple, just run it after the gamescope program.

@ca5ua1
Copy link
Author

ca5ua1 commented Feb 8, 2022

Plus to that, Lutris don't use mangoapp, so there is still a reason to add that hack until mangohud 0.6.6 not released and Lutris don't use mangoapp with gamescope.

I'm gonna add an issue on lutris github.

@aqxa1
Copy link

aqxa1 commented Mar 2, 2022

Is there a way to run mangoapp with a Steam game, short of running the whole Steam client in gamescope? As I don't see the wrapper approach working since I can't see how the game itself can be backgrounded before calling mangoapp from "launch options", unless there is some syntax I'm not aware of.

@Billli11
Copy link

Billli11 commented Mar 3, 2022

Is there a way to run mangoapp with a Steam game, short of running the whole Steam client in gamescope? As I don't see the wrapper approach working since I can't see how the game itself can be backgrounded before calling mangoapp from "launch options", unless there is some syntax I'm not aware of.

I currently running mangoapp with

gamescope {gamescope arg} -e -- bash -c "mangoapp & gamemoderun  %command% ; kill -s TERM \$(jobs -pr)"

mangoapp have problem self terminate for me,so I have to kill the program after the game is close.

@Samsagax
Copy link

Samsagax commented Mar 3, 2022

gamescope {gamescope arg} -e -- bash -c "mangoapp & gamemoderun  %command% ; kill -s TERM \$(jobs -pr)"

I think the line should be:

gamescope {gamescope arg} -e -- bash -c " gamemoderun %command% &; mangoapp"

The first part gamemoderun %command% & will start the game and put it in the background, the second part mangoapp will launch mangoapp, the colon is the line separator of bash.

@Billli11
Copy link

Billli11 commented Mar 3, 2022

gamescope {gamescope arg} -e -- bash -c "mangoapp & gamemoderun  %command% ; kill -s TERM \$(jobs -pr)"

I think the line should be:

gamescope {gamescope arg} -e -- bash -c " gamemoderun %command% &; mangoapp"

The first part gamemoderun %command% & will start the game and put it in the background, the second part mangoapp will launch mangoapp, the colon is the line separator of bash.

"&" is also a separator (see bash reference manual 3.2.4). And it cause syntax error(zsh work though).

bash: -c: line 1: syntax error near unexpected token `;'
bash: -c: line 1: `echo 1 &; echo 2'

bash version 5.1.16

Also I find mangoapp won't terminate itself when the games is stopped so I have to run mangoapp as background job and add a kill command to run after the game is exited. I currently running on wayland so this may cause by running on nested wayland.

@Chromiell
Copy link

Sorry if I'm resuscitating an old Issue, but has anyone found a way to launch gamescope under Heroic Games Launcher together with mangoapp? Being that the syntax is rather strict and needs the gamescope -- sh -c "mangoapp& whateverCommand" in order to function properly is there a way to rewrite it without having to use the quotes since the wrapper in Heroic Games Launcher automatically adds the launching arguments and there's no way to specify %command%" to close the quotation like there is for Steam? I'm sorry if this isn't the right place to ask, but I figured since it's already been discussed I might give it a shot since this problem is driving me crazy.

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