Gamemode not working with steam

I use gamemode to run some scripts upon game startup like disabling the compositor and setting my TV to the only active display. If I run gamemoded -t in a terminal it runs my scripts correctly, however, I do get some errors that I don't know if they're relevant

gamemoded -t
: Loading config
Loading config file [/etc/gamemode.ini]
: Running tests

:: Basic client tests
:: Passed

:: Dual client tests
gamemode request succeeded and is active
Quitting by request...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
...Waiting for child to quit...
:: Passed

:: Gamemoderun and reaper thread tests
...Waiting for child to quit...
...Waiting for reaper thread (reaper_frequency set to 5 seconds)...
:: Passed

:: Supervisor tests
:: Passed

:: Feature tests
::: Verifying CPU governor setting
::: Passed
::: Verifying Scripts
:::: Running start script [notify-send "GameMode started"]
:::: Passed
:::: Running start script [/home/zany130/Scripts/DisableCompositing.sh]
:::: Passed
:::: Running start script [/home/zany130/Scripts/SetHDMIPrimaryNoSwitch.sh]
:::: Passed
:::: Running end script [notify-send "GameMode ended"]
:::: Passed
:::: Running end script [/home/zany130/Scripts/SetDPPrimary.sh]
:::: Passed
:::: Running end script [/home/zany130/Scripts/EnableCompositing.sh]
:::: Passed
:::: Running end script [/home/zany130/Scripts/ludusavi.sh]
:::: Passed
::: Passed
::: Verifying GPU Optimisations

(nvidia-settings:156459): Gtk-WARNING **: 09:41:02.312: Theme parsing error: gtk-dark.css:6342:10: 'height' is not a valid property name

(nvidia-settings:156464): Gtk-WARNING **: 09:41:02.562: Theme parsing error: gtk-dark.css:6342:10: 'height' is not a valid property name
ERROR: Failed to parse output for "[gpu:0]/GPUGraphicsClockOffset[3]" output was ""!
ERROR: External process failed with exit code 1
ERROR: Output was: 
ERROR: Failed to call gpuclockctl, could not get values!

(nvidia-settings:156529): Gtk-WARNING **: 09:41:04.217: Theme parsing error: gtk-dark.css:6342:10: 'height' is not a valid property name

(nvidia-settings:156542): Gtk-WARNING **: 09:41:04.826: Theme parsing error: gtk-dark.css:6342:10: 'height' is not a valid property name
ERROR: Failed to parse output for "[gpu:0]/GPUGraphicsClockOffset[3]" output was ""!
ERROR: External process failed with exit code 1
ERROR: Output was: 
ERROR: Failed to call gpuclockctl, could not get values!
ERROR: Could not get current GPU info, see above!
::: Failed!
::: Verifying renice
::: Passed
::: Verifying ioprio
::: Passed
ERROR: :: Failed!
: Tests Failed!

If I run a game in steam with gamemoderun %command% set as a launch command I get the notification that gamemode runs but It doesn't run my scripts. Looking in the logs it seems that when it's called from steam the display is undefined so it can't find the monitors to turn off. I tried changing the shell to bash to see if maybe that was causing issues and the issue is still persisting. Since I didn't have this issue back when I was using vanilla arch a few weeks ago I'm not sure if this is a bug with gamemode or something wrong with my system's configuration ( possibley xorg?) so I will upload a hwprobe as well which includes that.

EDIT: found this issue which seems to be the issue I am running into, although I can't figure out why I wasn't running into this issue when I was using vanilla arch and now on garuda I am. I should add that none of the workarounds mentioned like restating the game mode service help

inxi -Faz
System:    Kernel: 5.13.10-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0 
           parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen 
           root=UUID=ef15347e-a4da-4628-afc3-2bff20cbb710 rw rootflags=subvol=@ quiet splash 
           rd.udev.log_priority=3 vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1 
           resume=UUID=e7745511-30a0-4b3d-93c1-4bc3daa8b2b8 loglevel=3 sysrq_always_enabled=1 
           Desktop: KDE Plasma 5.22.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM 
           Distro: Garuda Linux base: Arch Linux 
Machine:   Type: Desktop Mobo: ASRock model: X470 Taichi serial: <filter> UEFI: American Megatrends 
           v: P3.50 date: 07/18/2019 
Battery:   Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3 serial: <filter> 
           charge: 100% (should be ignored) rechargeable: yes status: Discharging 
           Device-2: ps-controller-battery-a0:ab:51:90:7e:70 model: N/A serial: N/A charge: N/A 
           status: Full 
CPU:       Info: 6-Core model: AMD Ryzen 5 2600X bits: 64 type: MT MCP arch: Zen+ family: 17 (23) 
           model-id: 8 stepping: 2 microcode: 800820D cache: L2: 3 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 86395 
           Speed: 4014 MHz min/max: 2200/3600 MHz boost: enabled Core speeds (MHz): 1: 4014 2: 4024 
           3: 4024 4: 4023 5: 4023 6: 4020 7: 4024 8: 4023 9: 4025 10: 4023 11: 4022 12: 4023 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: spec_store_bypass 
           mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: NVIDIA GP104 [GeForce GTX 1080] vendor: Gigabyte driver: nvidia v: 470.63.01 
           alternate: nouveau,nvidia_drm bus-ID: 0e:00.0 chip-ID: 10de:1b80 class-ID: 0300 
           Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: loaded: nvidia 
           display-ID: :0 screens: 1 
           Screen-1: 0 s-res: 6400x2160 s-dpi: 80 s-size: 2032x686mm (80.0x27.0") 
           s-diag: 2145mm (84.4") 
           Monitor-1: HDMI-0 res: 3840x2160 hz: 60 dpi: 52 size: 1872x1053mm (73.7x41.5") 
           diag: 2148mm (84.6") 
           Monitor-2: DP-0 res: 2560x1080 dpi: 81 size: 798x334mm (31.4x13.1") diag: 865mm (34.1") 
           OpenGL: renderer: NVIDIA GeForce GTX 1080/PCIe/SSE2 v: 4.6.0 NVIDIA 470.63.01 
           direct render: Yes 
Audio:     Device-1: NVIDIA GP104 High Definition Audio vendor: Gigabyte driver: snd_hda_intel 
           v: kernel bus-ID: 0e:00.1 chip-ID: 10de:10f0 class-ID: 0403 
           Device-2: Sony Wireless Controller type: USB driver: playstation,snd-usb-audio,usbhid 
           bus-ID: 1-7:4 chip-ID: 054c:0ce6 class-ID: 0300 
           Sound Server-1: ALSA v: k5.13.10-zen1-1-zen running: yes 
           Sound Server-2: JACK v: 1.9.19 running: no 
           Sound Server-3: PulseAudio v: 15.0 running: yes 
           Sound Server-4: PipeWire v: 0.3.33 running: yes 
Network:   Device-1: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi v: kernel 
           port: e000 bus-ID: 08:00.0 chip-ID: 8086:24fb class-ID: 0280 
           IF: wlp8s0 state: down mac: <filter> 
           Device-2: Intel I211 Gigabit Network vendor: ASRock driver: igb v: kernel port: d000 
           bus-ID: 0a:00.0 chip-ID: 8086:1539 class-ID: 0200 
           IF: enp10s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-3: Sony Wireless Controller type: USB driver: playstation,snd-usb-audio,usbhid 
           bus-ID: 1-7:4 chip-ID: 054c:0ce6 class-ID: 0300 
           IF-ID-1: anbox0 state: down mac: <filter> 
Bluetooth: Device-1: Intel Wireless-AC 3168 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-9:5 
           chip-ID: 8087:0aa7 class-ID: e001 
           Report: bt-adapter ID: hci0 rfk-id: 1 state: up address: <filter> 
Drives:    Local Storage: total: 2.27 TiB used: 360.74 GiB (15.5%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/nvme0n1 maj-min: 259:1 vendor: Samsung model: SSD 970 EVO 250GB 
           size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 
           type: SSD serial: <filter> rev: 2B2QEXE7 temp: 44.9 C scheme: GPT 
           ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Samsung model: SSD 960 EVO 250GB 
           size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 
           type: SSD serial: <filter> rev: 3B7QCXE7 temp: 32.9 C scheme: GPT 
           ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DX002-2DV164 size: 1.82 TiB 
           block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 
           serial: <filter> rev: CC41 scheme: GPT 
Partition: ID-1: / raw-size: 215.45 GiB size: 215.45 GiB (100.00%) used: 49.22 GiB (22.8%) 
           fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:7 
           ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 563 KiB (0.2%) fs: vfat 
           dev: /dev/nvme0n1p1 maj-min: 259:6 
           ID-3: /home raw-size: 215.45 GiB size: 215.45 GiB (100.00%) used: 49.22 GiB (22.8%) 
           fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:7 
           ID-4: /var/log raw-size: 215.45 GiB size: 215.45 GiB (100.00%) used: 49.22 GiB (22.8%) 
           fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:7 
           ID-5: /var/tmp raw-size: 215.45 GiB size: 215.45 GiB (100.00%) used: 49.22 GiB (22.8%) 
           fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:7 
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 17.18 GiB used: 0 KiB (0.0%) priority: -2 
           dev: /dev/nvme0n1p3 maj-min: 259:8 
           ID-2: swap-2 type: zram size: 15.55 GiB used: 35.2 MiB (0.2%) priority: 100 
           dev: /dev/zram0 
Sensors:   System Temperatures: cpu: 53.0 C mobo: 39.0 C gpu: nvidia temp: 51 C 
           Fan Speeds (RPM): fan-1: 0 fan-2: 1244 fan-3: 1246 fan-4: 1257 fan-5: 1222 gpu: nvidia 
           fan: 25% 
           Power: 12v: N/A 5v: N/A 3.3v: 3.30 vbat: 3.28 
Info:      Processes: 464 Uptime: 11m wakeups: 3 Memory: 15.55 GiB used: 8.61 GiB (55.4%) 
           Init: systemd v: 249 tool: systemctl Compilers: gcc: 11.1.0 clang: 12.0.1 Packages: 
           pacman: 2042 lib: 545 flatpak: 0 Shell: fish v: 3.3.1 running-in: kitty inxi: 3.3.06 

journal

@jonathon I thought gamemode was included in Dragonized Gaming Edition that's why I put it in just issues & assistance since it didn't fit anywhere else

I moved it back as I was able to confirm that gamemode is in fact included in the ISO. I don't know if maybe it fits better in another category or if even matters to much.

Still haven't figured out though i did find an alternative to running my scripts in game mode Can one add system commands in the launch options? :: Steam for Linux General Discussions

Lutris also has this functionality

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.