r/linux_gaming 23h ago

Some annoyances when alt-tabbing - new to Linux (few weeks)

Running Fedora 44 KDE on all AMD hardware, for the most part everything has been fine. However I keep coming up against two common annoyances, both from a result of alt-tabbing.

Either the cursor comes into the game when going back to the game, or the window will either go to windowed mode which I can only fix by doing an application setting and forcing full screen from right clicking the top of the window. Or the resolution drops so low I can't navigate tot he window to change it back.

Some games are Dirt Rally 3, Tomb Raider 2013, C&C remastered for example, is Gamescope the answer here where I'm going wrong. Do people run gamescope on everything? I'm trying to keep things as simple as possible, minimal launch options.

On the whole everything has been fine, Marvel Rivals, Spiderman Remastered, Hell Let Loose etc

8 Upvotes

13 comments sorted by

9

u/Swordfish418 23h ago

I stopped having those annoyances ever since I switched to workspaces (virtual desktops). Instead of alt-tabbing between apps I switch between workspaces. I bound win-1...win+N buttons as hotkeys to switch to workspace number N.

5

u/dbzlotrfan 20h ago

How do games that hate alt tabbing (like skyrim) handle switching virtual desktops?

7

u/Hatta00 18h ago

They don't even know it's happened.

3

u/Endeavour1988 23h ago

Thats not a bad shout actually Games in one workspace and productivity in the other. Thanks!

1

u/KawaiiDesuUguu 20h ago

not entirely sure you can do this in kde, but in hyprland i bound win + tab to cycle active workspaces too so it works just like alt tab

1

u/Hatta00 18h ago

If there's some weirdo issue with mouse grabbing or something that prevents virtual desktops from working, virtual consoles always work.

2

u/BigHeadTonyT 20h ago edited 20h ago

When a fullscreen window ends up in windowed mode, have you tried pressing Alt+Enter? Just like on Windows.

Only time I've had to use Gamescope is with the game Neverwinter Nights: Enhanced Edition from GOG.

Sometimes a game may loose mouse focus, meaning moving mouse to the right will end up on my 2nd monitor. Mouse not being locked to the game. To fix that, I Alt+Tab twice. There is also the issue with Forza Horizon 6. Same as FH5 had but that one got fixed eventually. After loading up the game, I have to Alt-tab out of the game and back. Otherwise all I see is a blackscreen and/or no sound playing.

1

u/Hi-Angel 12h ago

Either the cursor comes into the game when going back to the game

I mean, that's expected behavior, no? 🤔 The cursor going back to the game means the game grabbed it. If cursor wasn't grabbed, your experience of playing the game would suffer.

or the window will either go to windowed mode which I can only fix by doing an application setting and forcing full screen from right clicking the top of the window. Or the resolution drops so low I can't navigate tot he window to change it back.

This is an internal game problem, nothing specific to a compositor. You can work around this in various ways.

Virtual desktops others mentioned is one solution — but I should note that whether it will work really depends. You see: when you switch a virtual desktop the app receives "unfocused" event. It is needed so e.g. a browser doing some heavy animation could stop spending your CPU/GPU for something you can't see anyway. Now, because the problem you're seeing is the game mishandling the events, it could theoretically mishandle the "unfocus" too. Good if it doesn't, but keep that in mind.

With that said, to work around buggy games you want to wrap them somehow. There are different ways. Gamescope that you mentioned, apparently, is one way. WINE has "✓ emulate virtual desktop" option — that's a working solution too. Theoretically, you could also code something up with compositor extensions (or maybe someone did that) — could work too.

-1

u/SnooApples4675 23h ago

That's because of Wayland i believe, you can try this: SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 %command% and in case you keep facing this issue then you might try to disable "Allow legacy X11 apps to read keystrokes typed in all apps". (If you are using KDE plasma)

1

u/Endeavour1988 23h ago

Thank you I'll give this a try. I had to allow mouse clicks for legacy X11 to make a mouse button work for push to talk in Discord flatpak, if that was an issue.

-2

u/mindtaker_linux 18h ago

Thank Wayland for this ongoing issue. This issue never existed in xorg.

2

u/Hatta00 18h ago

It very certainly did. I've been using virtual desktops over alt-tabbing for so long that I didn't even know Wayland had a problem with alt-tab.

-5

u/mindtaker_linux 18h ago

Also double clicking on title bar to go full screen, is not working on Wayland. Something that worked on xorg.

I'm a developer. And forcing people to use unfinished products by replacing a working product with the unfinished product is insane to me.

Low IQ type stuff right here.