Refresh rate changes when game launches

I have the game Control setup and working through the Epic Game Store. When the game launches it changes the display’s refresh rate to 30Hz (and the scaling to 100%, I run at 200%) which causes at stutter like effect in the game (my display runs at 59.94 Hz. If I ALT+Tab back to the desktop and manually switch back to 60Hz the games runs great.

Things to note:

  • Only happens when the game is set to Fullscreen mode. Windowed mode does not cause the refresh rate to change. Have not fully tested borderless.
  • Can be worked around with this command.
    xrandr --output HDMI-1 --mode 3840x2160 --rate 59.94
    However, that only works if run manually. Does not work if I run that script after the game starts via either Lutris > \[Game Name\] > System Options > Show Advanced > Pre-Launch script OR via a shell script that launches the game then runs the command. Verified the script runs as expected it just doesn’t fix the refresh rate. But if I ALT+Tab out of the game and run the script myself it has the desired effect.
  • The desktop scale change is a side effect of the refresh rate change. That happens sometimes if I change the refresh rate manually as well.

Debug log here if it’s helpful: https://pastebin.com/E4QNw5Cp

Hm, nothing stands out to me in the log. Have you tried sleeping for a few seconds in your script, so that the xrandr command runs a few seconds after the game is started?

Yup. Went as long as 30 seconds at which point the game is on the menu screen. Still no dice.

Would love to figure out the root of the problem as now my manual fix of ALT+tab and change refresh is not always working. Sometimes it sticks for a while and other times it seems to reset back to 30 Hz when I toggle back into the game.