Bottles icon indicating copy to clipboard operation
Bottles copied to clipboard

[Request]: add `MESA_LOADER_DRIVER_OVERRIDE=zink` when launching a game in Gamescope with an Intel iGPU

Open allaeddineomc opened this issue 1 year ago • 20 comments

Tell us the problem or your need

gamescope is rendering broken graphics on intel IGPUs and adding the variable INTEL_DEBUG=norbc when running gamescope on intel fixes the rendering

Describe the solution you'd like

this is an example of how the command should look to make it render properly

Other solutions?

No response

Additional context and references

No response

allaeddineomc avatar Jul 24 '22 13:07 allaeddineomc

another solution can be adding a field to gamescope settings where the user can add arguments

allaeddineomc avatar Jul 24 '22 13:07 allaeddineomc

@mirkobrombin , i'm trying to implement this but the app doesn't seem to be building with gnome-builder nor with the included appimage script , anything i can do ?

allaeddineomc avatar Jul 26 '22 07:07 allaeddineomc

Check our documentation for manual building the flatpak https://docs.usebottles.com/getting-started/installation

mirkobrombin avatar Jul 26 '22 08:07 mirkobrombin

INTEL_DEBUG=norbc

This seems like a debug flag. I don't want to resort to debug flags as a "solution" for stuff like this. Do you happen to know it's safe to use? Perhaps even cite from someone who is qualified in this domain?

TheEvilSkeleton avatar Jul 31 '22 13:07 TheEvilSkeleton

INTEL_DEBUG=norbc

This seems like a debug flag. I don't want to resort to debug flags as a "solution" for stuff like this. Do you happen to know it's safe to use? Perhaps even cite from someone who is qualified in this domain?

i managed to add the flag using flat seal , it's a bit janky solution but it's much better than the default behavior , mango hud isn't functioning with gamescope turned on but it's a fair trade for me

allaeddineomc avatar Jul 31 '22 22:07 allaeddineomc

Based on https://github.com/Plagman/gamescope/issues/356#issuecomment-1195054736, you should use noccs instead of norbc. Can you use MangoHud with Gamescope when you set it to noccs?

TheEvilSkeleton avatar Aug 01 '22 01:08 TheEvilSkeleton

sorry for taking too long to reply , i didn't got notified , using noccs renders broken graphics that look different form the broken graphics when ran with no environment variables , mango hud isn't working with noccs just like with norbc

allaeddineomc avatar Aug 03 '22 21:08 allaeddineomc

gamescope disabled Screenshot from 2022-08-03 22-31-06 gamescope enabled , no variables set Screenshot from 2022-08-03 22-31-38 gamescope enabled , INTEL_DEBUG=norbc Screenshot from 2022-08-03 22-33-58 gamescope enabled , INTEL_DEBUG=noccs Screenshot from 2022-08-03 22-35-18 are there any configs or logs i need to send to help with debugging ?

allaeddineomc avatar Aug 03 '22 21:08 allaeddineomc

What happens when you run with MESA_LOADER_DRIVER_OVERRIDE=zink and INTEL_DEBUG=noccs?

TheEvilSkeleton avatar Aug 03 '22 22:08 TheEvilSkeleton

What happens when you run with MESA_LOADER_DRIVER_OVERRIDE=zink and INTEL_DEBUG=noccs?

it renders correctly but no mangohud , using MESA_LOADER_DRIVER_OVERRIDE=zink without INTEL_DEBUG=noccs also renders correctly with no mangohud

allaeddineomc avatar Aug 04 '22 15:08 allaeddineomc

@allaeddineomc From mesa docs, noccs and norbc should do the same thing. You may be using an old version of mesa from before noccs was added.

xiota avatar Aug 04 '22 21:08 xiota

@xiota thanks for the info. Where did you find it in the Mesa docs? ~~I'm looking at https://mesa.readthedocs.io but it's infinitely buffering.~~ Edit: Found it: https://docs.mesa3d.org/relnotes/22.1.0.html.

From what I know, Mesa from Flathub is still at 21.X, therefore noccs is nonexistent.

@allaeddineomc where did you get Bottles from?

TheEvilSkeleton avatar Aug 04 '22 23:08 TheEvilSkeleton

@allaeddineomc where did you get Bottles from?

i'm always running the latest flatpak from flathub

allaeddineomc avatar Aug 05 '22 21:08 allaeddineomc

@allaeddineomc From mesa docs, noccs and norbc should do the same thing. You may be using an old version of mesa from before noccs was added.

on my system (fedora silverblue) mesa is 22.1.3

allaeddineomc avatar Aug 05 '22 21:08 allaeddineomc

@allaeddineomc From mesa docs, noccs and norbc should do the same thing. You may be using an old version of mesa from before noccs was added.

on my system (fedora silverblue) mesa is 22.1.3

Flathub packages Mesa 21. Let's wait for 22 to come out on Flathub, and then we can implement some workarounds and whatnot.

TheEvilSkeleton avatar Aug 11 '22 15:08 TheEvilSkeleton

Whatever workaround that's ultimately implemented should be flexible. Some games work with INTEL_DEBUG=noccs (or norbc), some work with MESA_LOADER_DRIVER_OVERRIDE=zink, some work with either, some work with neither. I've also found that Zink has to be run in a subshell:

gamescope -U -- sh -c 'MESA_LOADER_DRIVER_OVERRIDE=zink game_exec'

xiota avatar Aug 11 '22 21:08 xiota

Good point. As for MangoHud, it depends on mangoapp https://github.com/bottlesdevs/Bottles/issues/1437.

TheEvilSkeleton avatar Aug 12 '22 03:08 TheEvilSkeleton

gamescope enabled , INTEL_DEBUG=norbc Screenshot from 2022-08-03 22-33-58

@allaeddineomc can you tell me how you set INTEL_DEBUG=norbc variable?

TheEvilSkeleton avatar Aug 14 '22 19:08 TheEvilSkeleton

sorry for being too late , i forgot about the issue , i used flatseal environment variables Screenshot from 2022-08-27 14-13-12

allaeddineomc avatar Aug 27 '22 13:08 allaeddineomc

I think this is something at user end

mirkobrombin avatar Aug 28 '22 08:08 mirkobrombin