From 209bddbbf27cbabeca9bf27bacc9750700aaf222 Mon Sep 17 00:00:00 2001 From: Lasath Fernando Date: Sun, 25 Aug 2024 00:35:02 -0500 Subject: [PATCH 1/2] feat: Add MangoHud support to Steam images without Gamescope --- images/steam/Dockerfile | 3 ++- images/steam/scripts/startup.sh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/images/steam/Dockerfile b/images/steam/Dockerfile index 68623475..f48faa08 100644 --- a/images/steam/Dockerfile +++ b/images/steam/Dockerfile @@ -47,7 +47,8 @@ ARG REQUIRED_PACKAGES=" \ libgbm1:i386 libgles2:i386 libegl1:i386 libgl1-mesa-dri:i386 libgl1:i386 libglapi-mesa:i386 libglx0:i386 \ libdbus-1-3 libgtk-3-0 libegl1 libsdl2-2.0-0 libcurl4 libcurl4:i386 \ dbus-daemon dbus-system-bus-common dbus-session-bus-common whoopsie network-manager bluez \ - mangoapp ibus curl pkexec xz-utils zenity file xdg-user-dirs xdg-utils lsof pciutils lsb-release mesa-utils \ + mangoapp mangohud \ + ibus curl pkexec xz-utils zenity file xdg-user-dirs xdg-utils lsof pciutils lsb-release mesa-utils \ libfontconfig1:i386 libfontconfig1:amd64 libfreetype6 libfreetype6:i386 \ " diff --git a/images/steam/scripts/startup.sh b/images/steam/scripts/startup.sh index 1ae5512f..e873eeab 100755 --- a/images/steam/scripts/startup.sh +++ b/images/steam/scripts/startup.sh @@ -123,6 +123,9 @@ elif [ -n "$RUN_SWAY" ]; then # Start IBus to enable showing the steam on-screen keyboard /usr/bin/ibus-daemon -d -r --panel=disable --emoji-extension=disable + # Enable MangoHud unless it's been explicitly disabled + export MANGOHUD=${MANGOHUD:-1} + # Start Steam source /opt/gow/launch-comp.sh launcher /usr/games/steam ${STEAM_STARTUP_FLAGS} From 48ad31b9a9b92842f2c3874bac5b021df368cde7 Mon Sep 17 00:00:00 2001 From: Lasath Fernando Date: Sun, 25 Aug 2024 13:13:25 -0500 Subject: [PATCH 2/2] Address CR comments --- images/steam/Dockerfile | 3 +-- images/steam/scripts/startup.sh | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/images/steam/Dockerfile b/images/steam/Dockerfile index f48faa08..68623475 100644 --- a/images/steam/Dockerfile +++ b/images/steam/Dockerfile @@ -47,8 +47,7 @@ ARG REQUIRED_PACKAGES=" \ libgbm1:i386 libgles2:i386 libegl1:i386 libgl1-mesa-dri:i386 libgl1:i386 libglapi-mesa:i386 libglx0:i386 \ libdbus-1-3 libgtk-3-0 libegl1 libsdl2-2.0-0 libcurl4 libcurl4:i386 \ dbus-daemon dbus-system-bus-common dbus-session-bus-common whoopsie network-manager bluez \ - mangoapp mangohud \ - ibus curl pkexec xz-utils zenity file xdg-user-dirs xdg-utils lsof pciutils lsb-release mesa-utils \ + mangoapp ibus curl pkexec xz-utils zenity file xdg-user-dirs xdg-utils lsof pciutils lsb-release mesa-utils \ libfontconfig1:i386 libfontconfig1:amd64 libfreetype6 libfreetype6:i386 \ " diff --git a/images/steam/scripts/startup.sh b/images/steam/scripts/startup.sh index e873eeab..e031a653 100755 --- a/images/steam/scripts/startup.sh +++ b/images/steam/scripts/startup.sh @@ -34,6 +34,7 @@ export WINEDLLOVERRIDES=dxgi=n # so we don't get mangoapp showing up before Steam initializes # on OOBE and stuff. mkdir -p "$(dirname "$MANGOHUD_CONFIGFILE")" +echo "position=top-right" > "$MANGOHUD_CONFIGFILE" echo "no_display" > "$MANGOHUD_CONFIGFILE" # Prepare our initial VRS config file @@ -123,7 +124,8 @@ elif [ -n "$RUN_SWAY" ]; then # Start IBus to enable showing the steam on-screen keyboard /usr/bin/ibus-daemon -d -r --panel=disable --emoji-extension=disable - # Enable MangoHud unless it's been explicitly disabled + # Enable MangoHud for all vulkan (including Proton) games + # unless the user has explicitly disabled it in config. export MANGOHUD=${MANGOHUD:-1} # Start Steam