ublue-os / bazzite

Bazzite is a cloud native image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices - including your favorite handheld.
https://bazzite.gg
Apache License 2.0
4.08k stars 250 forks source link

Gamescope Session Plus with WSI increases powerdraw and requires so much cpu time it lags out games that otherwise run fine #1702

Open waffshappen opened 1 month ago

waffshappen commented 1 month ago

Describe the bug

When playing Forza Horizon 4 the deck (steamos / bazzite on gamescope legacy) idles on ~2-3W (low preset) when sitting still, and generally manages 60FPS with slight dips.

However, when using the current bazzite defaults (ENABLE_GAMESCOPE_WSI + return (default) 1 from /usr/libexec/gamescope-sdl-workaround) it jumps at 8-10W sitting idle, while the framegraph is all over the place. This increased powerdraw is bad enough that FH4 goes from "mostly 60 with short dips for loading" to "40 average" in most places while moving.

If i override ENABLE_GAMESCOPE_WSI in /usr/share/gamescope-session-plus/gamescope-session-plus to 0 i drop down to 5W idle, if i also force /usr/libexec/gamescope-sdl-workaround to return 0 (and thus force gamescope legacy) i am back to the original powerdraw (at the cost of properly working tonemapping).

This is reducing the time i can play on battery by almost half, significantly increases heat and the uneven frametimes are so beyond terrible in races i almost get motion sick.

What did you expect to happen?

Gamescope Session Plus with WSI should take equal resources to the legacy gamescope.

Output of rpm-ostree status

State: idle
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck-gnome:stable
                   Digest: sha256:bfd698a496a41a55255d03270e7c3cdbe996c62c62fb7dde81dde9ef4b214eb9
                  Version: 40.20240922.0 (2024-09-23T05:03:03Z)
          LayeredPackages: sunshine

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck-gnome:stable
                   Digest: sha256:de80c8782dab06226afd3c4f9b5a6911cfc6ecf0c3168e14f416914af93c42a4
                  Version: 40.20240921.1 (2024-09-22T12:36:37Z)
          LayeredPackages: sunshine

Hardware

Jupiter

Extra information or context

No response

KyleGospo commented 1 month ago

WSI is enabled by default by Valve. It is required for frame rate control to function properly. Additionally, that SDL workaround function is not called on a steam deck. It is only used for legacy GPUs broken by the current gamescope release.

I will see if I can reproduce the behavior you're reporting.

waffshappen commented 1 month ago

I will see if I can reproduce the behavior you're reporting.

I've taken some screenshots to show it more clearly.

Here's FH4 and Hades with GS Plus and WSI enabled - almost all cores clock high at all times, and the frametimes, even sitting idle, are all over the place, even in Hades: FH4_WITH_GSPLUS_WSI HADES_WITH_GSPLUS_WSI

bindmount edited sdl-workaround, return 0, return to gaming mode and now, in gamescope-legacy: (Sorry, i cant control the Weather in Forza, but these Numbers are the same across weather and season):

FH4_WITHOUT_GSPLUS_WSI HADES_WITHOUT_GSPLUS_GSI

In Forza as mentioned it is the most clearly visible, but even in Hades it goes from jittery presentation time to a flat framegraph, while also clocking some cores lower (although it doesnt come down to lower battery use in Hades).

This is more equal with my steamos experience.

waffshappen commented 1 month ago

I have fully clean installed bazzite and steamos - and it remains the same, FH4 on bazzite takes more performance on its own away from the game and it never has a smooth framegraph and stutters unbearably while driving - on steamos its flat 60 with only short and acceptable loading stutters.

Despite trying scx, pstate on/off, mititgations on/off, selinux off/on - even in the most insane config i'd never daily drive it never reaches close.

zqpvr commented 1 month ago

this might be the same issue I had with gpu performance, the cpu performance was fixed with 3.7.0, amdpstate made the cpu clock at 3.5GHz constantly on idle in gaming mode @KyleGospo

I have fully clean installed bazzite and steamos - and it remains the same, FH4 on bazzite takes more performance on its own away from the game and it never has a smooth framegraph and stutters unbearably while driving - on steamos its flat 60 with only short and acceptable loading stutters.

Despite trying scx, pstate on/off, mititgations on/off, selinux off/on - even in the most insane config i'd never daily drive it never reaches close.