FeralInteractive / gamemode

Optimise Linux system performance on demand
BSD 3-Clause "New" or "Revised" License
4.67k stars 184 forks source link

Steam Proton game launched with Gamemode starts with gamemode active but proccess not registered. #443

Open JCPersson opened 9 months ago

JCPersson commented 9 months ago

Describe the bug Any steam proton game launched with gamemoderun %commdand% starts with gamemode active but gamemoded -s[pid] outputs gamemode is active but [pid] not registered. From my understanding this means that gamemode starts and does all it's optimizations, but it is not actually attached to the right process. The only effect that I have seems of this is that it makes mangohud not notice that gamemode is running on the process and display gamemode as "off", if that is all it's just an annoying cosmetic bug since I use that as an at glance reminder to turn on gamemode on newly installed games.

Sample image of issue: Screenshot_20231202_163919

To Reproduce Start any Steam Proton game with the command gamemoderun %command%

System Info (please complete the following information):

Additional context This started happening on a very fresh install after a major PC upgrade; new mobo, new CPU, new GPU. So I expect that maybe there is something going on there. As you can see there has been a switch from Intel CPU with Nvidia GPU to AMD CPU with AMD GPU. Steam is not installed through Flatpak or any other sandboxing vendor.

radumitrescu commented 9 months ago

I get this as well. Running Path of Exile under ge-proton and gamemoded -s cofirms gamemode is active, but Mangohud lists it as off.

In my case I have been running the same hardware and same Arch installation for months, and while I can't say for sure when this started happening, It was sometime recently, as in in the last week or so.

Makoto009 commented 9 months ago

Get this with all my steam games in Linux Mint 21.2. Running gamemoded -s is telling me that gamemode is active but MangoHud is showing "gamemode off" in the overlay My startoptions in steam are gamemoderun mangohud %command%

JCPersson commented 9 months ago

Can I ask what GPU/CPU you two are running @Makoto009 @radumitrescu ?

radumitrescu commented 9 months ago

i7 11800H + RTX 3060

Makoto009 commented 9 months ago

CPU: AMD Ryzen 9 7950X3D GPU: AMD Radeon RX 6950 XT

JCPersson commented 9 months ago

Thanks, I guess Radumitrescu proves it's not an AMD thing.

spiffeeroo commented 9 months ago

Recent Steam Linux Runtime 3.0 (sniper) update caused the Mangohud gamemode OFF change. Reverting Steam Linux Runtime 3.0 (sniper) to the _previousrelease under the Beta Participation dropdown menu makes Mangohud gamemode ON again.

Broken SRT 3.0 (sniper) version

#Name   Version     Runtime Runtime_Version Comment
depot   0.20231107.66301            # Overall version number
pressure-vessel 0.20231107.1    scout       # pressure-vessel-bin.tar.gz
scripts 0.20231107.1            # from steam-runtime-tools
sniper  0.20231107.66301    sniper  0.20231107.66301    # sniper_platform_0.20231107.66301/

Working SRT 3.0 (sniper) version

#Name   Version     Runtime Runtime_Version Comment
depot   0.20231016.63422            # Overall version number
pressure-vessel 0.20231013.0    scout       # pressure-vessel-bin.tar.gz
scripts 0.20231013.0            # from steam-runtime-tools
sniper  0.20231016.63422    sniper  0.20231016.63422    # sniper_platform_0.20231016.63422/
JCPersson commented 9 months ago

Ahh yeah, that fixed it. Cool find Spiffeeroo. Then I guess I'll find their git to annoy them about the issue.

UnconnectedBedna commented 9 months ago

I can confirm this is a steam/gamemode thing.

I have nvida gpu, amd cpu.

Starting game in lutris with gamemode and mangohud active starts gamemode and shows in mangohud. I can verify with gamemoded -s

Starting game in steam with proton (I only tried with GE) = mangohud shows not using gamemode, gamemoded -s says I do.

$ inxi -GC

CPU:
  Info: 12-core model: AMD Ryzen 9 7900X bits: 64 type: MT MCP cache:
    L2: 12 MiB
  Speed (MHz): avg: 885 min/max: 400/5733 cores: 1: 400 2: 3593 3: 400
    4: 400 5: 400 6: 400 7: 400 8: 3964 9: 400 10: 400 11: 400 12: 400 13: 400
    14: 400 15: 5300 16: 400 17: 400 18: 400 19: 400 20: 400 21: 400 22: 400
    23: 400 24: 400
Graphics:
  Device-1: NVIDIA GA102 [GeForce RTX 3090] driver: nvidia v: 545.29.06
  Device-2: AMD Raphael driver: amdgpu v: kernel
  Display: x11 server: X.Org v: 21.1.10 with: Xwayland v: 23.2.3 driver: X:
    loaded: amdgpu,nvidia unloaded: modesetting,nouveau dri: radeonsi
    gpu: amdgpu resolution: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: nvidia,radeonsi,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: amd mesa v: 23.1.9-manjaro1.1
    renderer: AMD Radeon Graphics (raphael_mendocino LLVM 16.0.6 DRM 3.54
    6.6.7-1-MANJARO)
  API: Vulkan v: 1.3.269 drivers: nvidia,radv surfaces: xcb,xlib

I think there is more strange things going on with the sniper because I have problem running some native games through steam.

Reading the communication seems to indicate there is not much to do with gamemode but rather we just have to wait for fix through the sniper.

Buzgie commented 8 months ago

I'm having this issue with retroarch (native linux) running through steam, so it's not just proton.

spiffeeroo commented 8 months ago

I'm having this issue with retroarch (native linux) running through steam, so it's not just proton.

RetroArch uses Steam Linux Runtime 3.0 (sniper) for its container, so it would be effected like Proton games too. The app_mappings under Configuration for RetroArch at SteamDB includes Steam Linux Runtime (sniper).

https://steamdb.info/app/1118310/config/

qwelias commented 3 weeks ago

gamemoderun %command%, and mangohud is global via MANGOHUD=1 Same thing, I've queried all pids and gamemode is registered only on:

Which looks okay to me, but magohud doesn't detect it. Also gamemoded's pid is in between those two if it says anything.

System:

Kernel: Linux 6.10.5-arch1-1
CPU: Intel(R) Core(TM) i5-7600K (4) @ 4.20 GHz
GPU: AMD Radeon RX 6600