You are not logged in.

#1 2024-12-06 00:04:51

omarhanykasban
Member
Registered: 2023-11-26
Posts: 20

gamescope breaks vsync and limting fix, mangohud makes games not start

game-run --no-mangohud gamescope -w 1920 -h 1080 -W 1920 -H 1080 -r 60 --force-grab-mouse --mangoapp -- %command%

game-run is a bash script

#!/bin/bash

# Set common environment variables
export __GL_SHADER_DISK_CACHE=1
export __GL_SHADER_DISK_CACHE_SIZE=100000000000
export __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1
export __GL_SYNC_TO_VBLANK=1
export OBS_VKCAPTURE=1
export ENABLE_VKBASALT=1
export DXVK_HUD=compiler
export STRANGLE_VSYNC=2
export DXVK_FRAME_RATE=60
export VKD3D_FRAME_RATE=60
export MANGOHUD_CONFIG="preset=2,fps_limit=60"

# Check for '--no-mangohud' flag
NO_MANGOHUD=0
CLEAN_ARGS=()
for arg in "$@"; do
    if [ "$arg" == "--no-mangohud" ]; then
        NO_MANGOHUD=1
    else
        CLEAN_ARGS+=("$arg")
    fi
done

# Adjust MANGOHUD based on the flag
if [ "$NO_MANGOHUD" -eq 1 ]; then
    export MANGOHUD=0
    exec gamemoderun strangle 60 -v 2 "${CLEAN_ARGS[@]}"
else
    export MANGOHUD=1
    exec mangohud gamemoderun strangle 60 -v 2 "${CLEAN_ARGS[@]}"
fi


fps doesnt seem to be locked at 60fps when i use gamescope but without gamescope only game-run --no-mangohud %command%
fps is locked and limited to 60fps

also mangohud makes games not start this is why i use --no-mangohud, idk what is wrong in mangohud
my mangohud config

#custom_text=PNY GeForce GTX
custom_text=Sapphire Radeon RX
gpu_text=7600 XT
gpu_color=2e9762
gpu_stats
gpu_temp
gpu_core_clock
gpu_load_change
gpu_load_value=50,90
gpu_load_color=FFFFFF,FFAA7F,CC0000
gpu_power
vram
vram_color=ad64c1

custom_text=

custom_text=AMD Ryzen 5
cpu_text=5500
cpu_stats
cpu_temp
cpu_mhz
cpu_load_change
core_load_change
cpu_load_value=50,90
cpu_load_color=FFFFFF,FFAA7F,CC0000
cpu_color=2e97cb
cpu_power
io_color=a491d3
ram
ram_color=c26693

custom_text=

fps
fps_color_change
fps_color=b22222,fdfd09,39f900
fps_metrics=avg,0.01
#fps_limit=60
frame_timing=1
frametime_color=00ff00

custom_text=

vkbasalt
gamemode
wine
wine_color=eb5b5b

#custom_text=

#custom_text=Fedora Linux
#exec=lsb_release -a | grep Release | uniq | cut -c 10-26
#exec=cat ~/.config/MangoHud/scripts/lsb-release | awk -F'="' 'NR==2 {print $2}' | tr -d '"'
#custom_text=Kernel
#exec=uname -r
#custom_text=Drivers:
#exec=~/.config/MangoHud/scripts/nvidia-smi --query-gpu=driver_version --format=csv,noheader
#custom_text=Session:
#exec=echo $XDG_SESSION_DESKTOP

legacy_layout=false
round_corners=0
toggle_hud=F3
output_folder=/home/omarhanykasban
background_color=020202
position=top-left
background_alpha=0.4
font_size=24
engine_color=eb5b5b
table_columns=3
text_color=ffffff
vsync
gl_vsync
#no_display

Offline

Board footer

Powered by FluxBB