Problem with gamescope (stuttering)

clouddrop

New Member
Joined
Oct 1, 2021
Messages
2
Reaction score
6
Credits
28
Hello,

I am looking for help solving an issue with gamescope. There are more details in this GitHub issue but to recap: After ~24 minutes games run through gamescope start stuttering. I tried to capture a log for gpuvis (see github issue) but could not (lack the knowledge to) see the problem. It seems as if there is something causing the GPU to rapidly switch between idle (500 MHz sclk state 0 and Max) all of a sudden. It only happens when running games through gamescope. Without it games run fine. I tried forcing the pp_power_profile, disabling the lower sclk & mclk states but nothing seems to help. If I let two games run in parallel but with a startup delay of for example 10 minutes the issue also starts with a 10 minute delay for the respective game.
Also something I noticed only today is that the stuttering is gone if I keep moving the mouse cursor.
I tried unsetting amdgpu.ppfeaturemask as well as different mesa versions. But this has been happening for about 6 months now across different kernels, mesa releases and gamescope commits. Also the fixed period of ~24 minutes made me think that there was some sort of idle/powersave feature kicking in?

Any help how to further troubleshoot would be appreciated. Also if you are using gamescope but not experiencing this issue. Maybe there are some obvious differences.

Thank you.

Code:
System:    Kernel: 5.14.9 x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: sway 1.6-5fd5d643 Distro: Arch Linux 
Machine:   Type: Desktop System: Gigabyte product: X570 AORUS XTREME v: -CF serial: <filter> 
           Mobo: Gigabyte model: X570 AORUS XTREME serial: <filter> UEFI: American Megatrends LLC. v: F34 date: 07/08/2021 
CPU:       Info: 16-Core model: AMD Ryzen 9 5950X bits: 64 type: MT MCP arch: Zen 3 rev: 0 cache: L2: 8 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 217682 
           Speed: 2168 MHz min/max: 550/5274 MHz boost: enabled Core speeds (MHz): 1: 2168 2: 2123 3: 3033 4: 3720 5: 2153 
           6: 2414 7: 2000 8: 1705 9: 2875 10: 2877 11: 3598 12: 2878 13: 2105 14: 2480 15: 2878 16: 3296 17: 2109 18: 2232 
           19: 566 20: 2305 21: 602 22: 1008 23: 1054 24: 1760 25: 2873 26: 2879 27: 2566 28: 2547 29: 2576 30: 1640 
           31: 2110 32: 2291 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Navi 21 [Radeon RX 6900 XT] vendor: Tul driver: amdgpu v: kernel 
           bus-ID: 0d:00.0 
           Display: wayland server: N/A compositor: sway driver: loaded: amdgpu note: n/a (using device driver) 
           resolution: <missing: xdpyinfo> 
           OpenGL: renderer: AMD Radeon RX 6900 XT (SIENNA_CICHLID DRM 3.42.0 5.14.9 LLVM 14.0.0) 
           v: 4.6 Mesa 21.3.0-devel (git-c238faf746) direct render: Yes 
Audio:     Device-1: AMD Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT] driver: snd_hda_intel v: kernel 
           bus-ID: 0d:00.1 
           Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel 
           bus-ID: 0f:00.4 
           Device-3: Elgato Systems Elgato Wave:3 type: USB driver: snd-usb-audio bus-ID: 1-6.4:4 
           Sound Server-1: ALSA v: k5.14.9 running: yes 
           Sound Server-2: sndio v: N/A running: no 
           Sound Server-3: JACK v: 1.9.19 running: no 
           Sound Server-4: PulseAudio v: 15.0 running: no 
           Sound Server-5: PipeWire v: 0.3.38 running: yes 
Network:   Device-1: Aquantia AQC107 NBase-T/IEEE 802.3bz Ethernet [AQtion] vendor: Gigabyte driver: atlantic v: kernel 
           port: N/A bus-ID: 05:00.0 
           IF: enp5s0 state: up speed: 10000 Mbps duplex: full mac: <filter> 
           Device-2: Intel I211 Gigabit Network vendor: Gigabyte driver: igb v: kernel port: f000 bus-ID: 06:00.0 
           IF: enp6s0 state: down mac: <filter> 
           Device-3: Intel Wi-Fi 6 AX200 driver: N/A port: f000 bus-ID: 07:00.0 
Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-5:2 
           Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends 
Drives:    Local Storage: total: 1.82 TiB used: 495.42 GiB (26.6%) 
           ID-1: /dev/nvme0n1 vendor: Gigabyte model: GP-AG41TB size: 931.51 GiB temp: 40.9 C 
           ID-2: /dev/nvme1n1 vendor: Gigabyte model: GP-AG41TB size: 931.51 GiB temp: 34.9 C 
Partition: ID-1: / size: 898.5 GiB used: 495.19 GiB (55.1%) fs: btrfs dev: /dev/dm-0 mapped: crypt_nvme_01 
           ID-2: /boot size: 1022 MiB used: 234.9 MiB (23.0%) fs: vfat dev: /dev/nvme0n1p1 
           ID-3: /home size: 898.5 GiB used: 495.19 GiB (55.1%) fs: btrfs dev: /dev/dm-0 mapped: crypt_nvme_01 
           ID-4: /var/log size: 898.5 GiB used: 495.19 GiB (55.1%) fs: btrfs dev: /dev/dm-0 mapped: crypt_nvme_01 
Swap:      ID-1: swap-1 type: partition size: 32 GiB used: 0 KiB (0.0%) dev: /dev/dm-1 mapped: swap 
Sensors:   System Temperatures: cpu: 43.8 C mobo: 34.0 C gpu: amdgpu temp: 35.0 C 
           Fan Speeds (RPM): fan-1: 0 fan-2: 0 fan-3: 0 gpu: amdgpu fan: 0 
           Power: 12v: N/A 5v: N/A 3.3v: 1.67 vbat: 1.64 
Info:      Processes: 610 Uptime: 58m Memory: 31.3 GiB used: 4.74 GiB (15.2%) Init: systemd Compilers: gcc: 11.1.0 
           clang: 14.0.0 Packages: 1123 Shell: Bash v: 5.1.8 inxi: 3.3.06
 


For a new person to the site, excellent job on crafting your question. (Many folks aren't very good at asking questions.)

I don't have an answer for you, I just wanted to compliment you on asking a solid question with enough info already given. However, our resident gamer is @f33dm3bits and the ping may bring 'em to the thread to help you out.
 
Interesting! I run all my games through gamescope as well but I don't notice any stuttering after 20 minutes,I was just playing Assasin's Creed Origins for well over an hour. I'm assuming the stuttering is visible on your screen and makes the game unplayable? Here's my system info.
System: Host: lilith Kernel: 5.14.8-arch1-1 x86_64 bits: 64 Desktop: sway 1.6.1 Distro: Arch Linux
Machine: Type: Desktop Mobo: Micro-Star model: MPG Z390 GAMING EDGE AC (MS-7B17) v: 2.0 serial: <superuser required>
UEFI: American Megatrends v: A.C1 date: 12/25/2020
CPU: Info: 8-Core model: Intel Core i9-9900KF bits: 64 type: MT MCP cache: L2: 16 MiB
Speed: 994 MHz min/max: 800/5000 MHz Core speeds (MHz): 1: 994 2: 800 3: 801 4: 800 5: 800 6: 800 7: 800 8: 800
9: 800 10: 800 11: 800 12: 800 13: 921 14: 800 15: 4102 16: 2922
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT / 6800M] driver: amdgpu v: kernel
Device-2: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
Display: wayland server: X.org 1.20.13 compositor: sway driver: loaded: modesetting unloaded: fbdev
resolution: <missing: xdpyinfo>
Message: Unable to show advanced data. Required tool glxinfo missing.
Audio: Device-1: Intel Cannon Lake PCH cAVS driver: snd_hda_intel
Device-2: AMD Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT] driver: snd_hda_intel
Device-3: GN Netcom Jabra Link 380 type: USB driver: jabra,snd-usb-audio,usbhid
Device-4: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
Sound Server-1: ALSA v: k5.14.8-arch1-1 running: yes
Sound Server-2: PipeWire v: 0.3.38 running: yes
Network: Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi
IF: wlo1 state: down mac: e6:bd:80:de:23:2e
Device-2: Intel Ethernet I219-V driver: e1000e
IF: eno2 state: up speed: 1000 Mbps duplex: full mac: 00:d8:61:9f:f1:ad
IF-ID-1: virbr0 state: down mac: 52:54:00:04:ae:99
Bluetooth: Device-1: ASUSTek Broadcom BCM20702A0 Bluetooth type: USB driver: btusb
Report: rfkill ID: hci0 state: up address: see --recommends
Device-2: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb
Report: ID: hci1 state: up address: N/A
Drives: Local Storage: total: 1.82 TiB used: 836.73 GiB (44.9%)
ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 2TB size: 1.82 TiB
Partition: ID-1: / size: 32.36 GiB used: 22.71 GiB (70.2%) fs: ext4 dev: /dev/dm-1
ID-2: /boot size: 975.9 MiB used: 229.1 MiB (23.5%) fs: ext4 dev: /dev/nvme0n1p2
ID-3: /home size: 96.05 GiB used: 21.26 GiB (22.1%) fs: ext4 dev: /dev/dm-3
Swap: ID-1: swap-1 type: partition size: 2 GiB used: 36.8 MiB (1.8%) dev: /dev/dm-2
Sensors: System Temperatures: cpu: 51.0 C mobo: N/A gpu: amdgpu temp: 53.0 C
Fan Speeds (RPM): N/A gpu: amdgpu fan: 0
Info: Processes: 396 Uptime: 12h 58m Memory: 31.29 GiB used: 4.94 GiB (15.8%) Shell: Zsh inxi: 3.3.06
 
Last edited:
Which inxi flags did you use, I just used inxi -F. Can you share the flags you used that way can run inxi with the same flags so you you can compare all the sysinfo.
Code:
local/gamescope 3.9.2-1
    The micro-compositor formerly known as steamcompmgr
 
Thank you KGIII.
f33dm3bits I used inxi -Fnxz
And yes, the stuttering is visible. FPS fluctuates between 150 and 30.
Grasping at straws here but currently I am trying to run without 'adaptive_sync on' in my sway-config. Not sure if this matters to gamescope.
 
Does it make the game unplayable? Here's my system info with the same inxi flags you used.
System: Kernel: 5.14.8-arch1-1 x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: sway 1.6.1 Distro: Arch Linux
Machine: Type: Desktop Mobo: Micro-Star model: MPG Z390 GAMING EDGE AC (MS-7B17) v: 2.0 serial: <filter>
UEFI: American Megatrends v: A.C1 date: 12/25/2020
CPU: Info: 8-Core model: Intel Core i9-9900KF bits: 64 type: MT MCP arch: Kaby Lake note: check rev: D cache: L2: 16 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 115232
Speed: 800 MHz min/max: 800/5000 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800 8: 800
9: 800 10: 800 11: 800 12: 800 13: 800 14: 800 15: 800 16: 800
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT / 6800M] vendor: Gigabyte driver: amdgpu
v: kernel bus-ID: 03:00.0
Device-2: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-4:3
Display: wayland server: X.org 1.20.13 compositor: sway driver: loaded: modesetting unloaded: fbdev
resolution: <missing: xdpyinfo>
OpenGL: renderer: AMD Radeon RX 6700 XT (NAVY_FLOUNDER DRM 3.42.0 5.14.8-arch1-1 LLVM 12.0.1) v: 4.6 Mesa 21.2.3
direct render: Yes
Audio: Device-1: Intel Cannon Lake PCH cAVS vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus-ID: 00:1f.3
Device-2: AMD Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT] driver: snd_hda_intel v: kernel bus-ID: 03:00.1
Device-3: GN Netcom Jabra Link 380 type: USB driver: jabra,snd-usb-audio,usbhid bus-ID: 1-13.1.1:11
Device-4: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-4:3
Sound Server-1: ALSA v: k5.14.8-arch1-1 running: yes
Sound Server-2: sndio v: N/A running: no
Sound Server-3: JACK v: 1.9.19 running: no
Sound Server-4: PulseAudio v: 15.0 running: no
Sound Server-5: PipeWire v: 0.3.38 running: yes
Network: Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel bus-ID: 00:14.3
IF: wlo1 state: down mac: <filter>
Device-2: Intel Ethernet I219-V vendor: Micro-Star MSI driver: e1000e v: kernel port: efa0 bus-ID: 00:1f.6
IF: eno2 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth: Device-1: ASUSTek Broadcom BCM20702A0 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-10:6
Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Device-2: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8 bus-ID: 1-14:8
Report: ID: hci1 rfk-id: 1 state: up address: N/A
Drives: Local Storage: total: 1.82 TiB used: 836.77 GiB (44.9%)
ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 2TB size: 1.82 TiB temp: 49.9 C
Partition: ID-1: / size: 32.36 GiB used: 22.72 GiB (70.2%) fs: ext4 dev: /dev/dm-1 mapped: vg0-root
ID-2: /boot size: 975.9 MiB used: 229.1 MiB (23.5%) fs: ext4 dev: /dev/nvme0n1p2
ID-3: /home size: 96.05 GiB used: 21.28 GiB (22.2%) fs: ext4 dev: /dev/dm-3 mapped: vg0-home
Swap: ID-1: swap-1 type: partition size: 2 GiB used: 36.8 MiB (1.8%) dev: /dev/dm-2 mapped: vg0-swap
Sensors: System Temperatures: cpu: 49.0 C mobo: N/A gpu: amdgpu temp: 59.0 C
Fan Speeds (RPM): N/A gpu: amdgpu fan: 0
Info: Processes: 390 Uptime: 13h 16m Memory: 31.29 GiB used: 5.06 GiB (16.2%) Init: systemd Compilers: gcc: 11.1.0
 
Last edited:
I don't know if this helps but this is how I have my monitors configured at the top
of my Sway configuration.
Code:
# Monitor configruation
set $output_mode 2560x1440@165Hz
output DP-1 mode $output_mode
output DP-2 mode $output_mode
 
And here are my Steam game launch options which I usually use.
Code:
gamescope -f -w 2560 -h 1440 -- gamemoderun WINE_FULLSCREEN_FSR=1 MANGOHUD=1 %command%
I use FSR and set my in game input resolution based on how it is recommended in this pdf, so that I get 2560x1440 Ultra Quality.
 
Last edited:

Members online


Top