UB
Universal Blue•4mo ago
Bugz

Strange issue with games losing focus

New Bazzite user here. Installed only a few days ago and have been setting everything up. So far, I'm absolutely loving it but unfortunately, there's an issue thats plaguing me. This install is on a System76 Oryx Pro 8 laptop, so has an Intel iGPU and NVidia dGPU. The games are selecting the NVidia card for use, Steam for some reason resorts to the Intel GPU (discovered via Big Picture Mode and going to About). I figured out I can force Steam to use the dGPU by using the following command: switcherooctl launch steam 1 Steam is still sluggish using the Nvidia GPU regardless of whatever settings I try (like disabling Hardware acceleration, etc) That's not the primary issue though. Regardless of forcing steam to use the dGPU or if using the iGPU, whenever I'm in game (fullscreen, windowed, doesn't matter), I get random "freezes". Or so I thought that they were freezes. I discovered that the majority of the time, I can alt-tab out and back into the game and it resumes. Only the video freezes, never audio. I thought it was the Pause Game decky plugin, but I have since removed that. It should be noted that I use an Xbox One controller. I have not yet confirmed to see if this issue is still present without the controller being on, but I believe it is. How can I track this annoying bug down? I'm curious if it has something to do with a scheduler or some other app stealing the game focus? More info posted to reddit: https://www.reddit.com/r/Bazzite/comments/1f55v8v/strange_issue_with_games_losing_focus/
Reddit
From the Bazzite community on Reddit
Explore this post and more from the Bazzite community
36 Replies
HikariKnight
HikariKnight•4mo ago
i can at least answer one of the things, steam big picture mode being slow on nvidia is an nvidia exclusive issue that they/nvidia need to fix.
Bugz
BugzOP•4mo ago
Ahh. Thanks for letting me know. I assumed as much. My next build will be using AMD exclusively. Gotta work with what I have for now though.
Bugz
BugzOP•4mo ago
Decided to post this to Bazzite github issue. Looks like it may be a tricky bug to track down. https://github.com/ublue-os/bazzite/issues/1583
GitHub
Strange issue with games losing focus · Issue #1583 · ublue-os/bazz...
Describe the bug Regardless of forcing steam to use the dGPU or if using the iGPU, whenever I'm in game (fullscreen, windowed, doesn't matter), I get random "freezes". Or so I tho...
HikariKnight
HikariKnight•4mo ago
since i got rid of my nvidia laptop earlier this year, i cant suggest anything but keeping an eye on thermals and see if there is any correlation with the freezes see if it is getting throttled and such
Bugz
BugzOP•4mo ago
The issue is that it's completely random. I've noticed most times its right when I get to the game menu. Usually happens a couple times. If I can get into the game for more than 5 minutes, it's generally a stable experience. Wouldn't that tell us that it's probably not the thermals? 🤔
HikariKnight
HikariKnight•4mo ago
you can thermal throttle from too manu fps in menus if vsync is disabled my friend thermal throttled in yakuza and gw2 because he didnt vsync on his laptop
Bugz
BugzOP•4mo ago
Ohh. Interesting. I'll check that out. Should be able to add the GPU thermals to mangohud What temps would be good/bad? I'm not really familiar with hardware.
HikariKnight
HikariKnight•4mo ago
depends on the hardware but i got a rule of thumb of 85c being on the toasty side, mainly because things can deform around 90c (for longer period of time) depending on the material (like my 2009 macbook :clueless: )
Bugz
BugzOP•4mo ago
Let me change my mangohud config real quick and check my temps. Got a video of it doing it. Temp got up to 81 but still played fine. Went back to menu and let GPU cool down, and it "froze" when temp was at 72ish
Bugz
BugzOP•4mo ago
HikariKnight
HikariKnight•4mo ago
Seems to be when you just alt tab though? some games dont like that for those games i try to run them in nested gamescope and it sometimes help. nested gamescope should work on nvidia
Bugz
BugzOP•4mo ago
It happens during just regular gameplay. Almost like something steals it's focus, then this behavior starts. Some games, I can get back to playing. This game, I have to exit and restart because the behavior is "backwards"
HikariKnight
HikariKnight•4mo ago
weird
Bugz
BugzOP•4mo ago
Very
HikariKnight
HikariKnight•4mo ago
can you try nested gamescope, see if it does anything?
Bugz
BugzOP•4mo ago
I'll have to google that. Not familiar. lol
HikariKnight
HikariKnight•4mo ago
gamescope -f -w inputwidth -h inputheight -W outputwidth -H outputheight -e --force-grab-cursor -- %command% in launch options if you need a different keyboard layout than US then add XKB_DEFAULT_LAYOUT=no before gamescope replacing no with the correct layout
Bugz
BugzOP•4mo ago
That's in the Steam game launch options, correct? Same place as Mangohud usually goes?
HikariKnight
HikariKnight•4mo ago
mangohud will probably not work correctly in gamescope fyi but we are done with that anyway yep
Bugz
BugzOP•4mo ago
Okay, let me give that a go.
HikariKnight
HikariKnight•4mo ago
No description
Bugz
BugzOP•4mo ago
Weird. Froze during the game credits boot screen. Re-opened game, got into it.. Character just got loaded and it "froze" again. Can still hear the audio but alt-tabbing doesn't work.
HikariKnight
HikariKnight•4mo ago
ok then i dont know much more to try :/
Bugz
BugzOP•4mo ago
Well. Thanks for your help. It does look like the gamescope thing brings about the bug a little more. Makes it easier to reproduce. For what it's worth, Mangohud is still showing properly. Guess I should mention that I have MANGOHUD=1 in /etc/environment. I did remove it before, to ensure that wasn't what was causing this "bug".
HikariKnight
HikariKnight•4mo ago
we highly recommend you remove that, it can break your system
Bugz
BugzOP•4mo ago
I'd really prefer to make Steam start using mangohud directly. So I don't have to add the launch option to nearly 500 games lol I start Steam using switcherooctl launch steam 1 right now. To force it to use the dGPU
HikariKnight
HikariKnight•4mo ago
shouldnt even be neccessary with our switcherooctl as its patched to correctly detect the dgpu
Bugz
BugzOP•4mo ago
So something is broken there too? 🤔 Without that command, steam starts on the Intel iGPU
HikariKnight
HikariKnight•4mo ago
on other systems i did that, but we wrote a patch to switcherooctl to fix the behavior since the desktop file for steam tells it to launch on whatever is not the default gpu, disregarding if it is an igpu or dgpu
Bugz
BugzOP•4mo ago
I just found a dangling error in the steam command. chdir "/var/home/levi/.local/share/Steam/steamapps/common/Afterimage" ERROR: ld.so: object '/var/home/levi/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
HikariKnight
HikariKnight•4mo ago
ignore it its an ld_preload for 32bit games
Bugz
BugzOP•4mo ago
[gamescope] [Error] wlserver: [xwayland/sockets.c:64] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use How about that one?
HikariKnight
HikariKnight•4mo ago
if you play a 32bit game it complains about 64bit ld_preload
Bugz
BugzOP•4mo ago
Other than those errors, steam logs are clean.
HikariKnight
HikariKnight•4mo ago
idk about that error, might be because youre on x11 (because nvidia) and it shouldnt amount to anything unless gamescope never opens
Bugz
BugzOP•4mo ago
Found a nice workaround, was able to finally switch to Wayland DE. I haven't had a single freeze in nearly 2 days. It's kind of ironic because X11 is suppose to be more stable, yet Wayland is superior with this setup for whatever reason. On X11, it's a 75% chance it will freeze on menus. If the game will keep playing for at least 5 minutes, there's a 50% chance it won't freeze lol
Want results from more Discord servers?
Add your server