ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.13k stars 174 forks source link

Steam launches non-dragabble and gets stuck to a monitor #10821

Open stuarthayhurst opened 3 weeks ago

stuarthayhurst commented 3 weeks ago

Your system information

Please describe your issue in as much detail as possible:

On launching, Steam launches maximised, but its icon doesn't reflect this (see screenshot). Clicking the icon doesn't change it, and the window is completely non-draggable and non-resizable, causing it to be 'stuck' to that monitor. Dragging the entire window with GNOME's window overview instead of grabbing it works, but then it resizes to the other monitor and gets 'stuck' there. It also draws over the top bar and the dock (from the dash-to-dock extension) won't trigger, so the system thinks it's a fullscreen application.

At the same time this started happening, Steam's sign in / loading window pops up on the correct monitor (the one it was launched from), but then the client launches on another monitor instead.

Additionally, Steam slows the entire system to a crawl when it's not minimised, but that doesn't happen in Wayland and this issue does, so that's probably a separate issue.

image

Steps for reproducing this issue:

  1. Launch Steam
Cecilectomy commented 2 weeks ago

I am also having this issue. It seems to happen sometimes after maximizing and closing steam. Next time opening (usually only happens to me after a logout of the desktop and logging back in) it will get stuck maximized, not movable, and not resizable.

Exiting steam, running rm -rf ~/.steam/steam/config/htmlcache/Local Storage/leveldb and restarting steam temporarily resolves the issue until it gets stuck again. Specifically removing the "_https://steamloopback.host\0\x01PopupSavedDimensions_31002677" key from the leveldb using a leveldb mangement tool/library works as well, as I assume that forces Steam to use the default location/dimensions when starting it up.

taoky commented 2 weeks ago

The same issue with Arch Linux's bundled Steam after it self-upgraded today. Desktop is GNOME 46 wayland session. The Steam window is not un-maximizable:

image

(Pressed Alt + Space for mutter's window control menu)

I'm currently using Steam Families Beta branch, with client build date "Wed, May 1 06:33 UTC -08:00" and version "1714520927".

Update (2024/05/02): Looks like the window is no longer fullscreened after a system update.

Cecilectomy commented 2 weeks ago

I just installed Ubuntu 24.04 LTS to see if the issue exists there since the README says the OS requirement is "Latest Ubuntu or Ubuntu LTS with a 64-bit (x86_64, AMD64) Linux kernel". I was able to reproduce the primary issue, where it get's "stuck", however, it does not become non draggable or non resizable like it does on Debian. You can drag it and it fixes itself, or you can resize and it fixes itself. Removing ~/.steam/steam/config/htmlcache/Local Storage/leveldb (or the specific key in the leveldb) also still resolves the issue on Ubuntu, appearing to force it to launch in a non-maximized state.

For reference, I was able to fully reproduce the issue on Debian 12.5 (latest stable), using Gnome, KDE, and Cinnamon (all fresh installs of Debian 12.5). I also encountered the issue using Debian 12.5 installed without a Desktop Environment and using DWM only. It behaves slightly differently because of how DWM works, but the Steam Client Window becomes non draggable and non resizable in floating mode.

thesaikis commented 2 weeks ago

I am also having this issue, but on Linux Mint with Cinnamon (x11).

For about a week my Steam client had been stuck as "maximized". Like stuarthayhurst, who opened this issue, my system treats the client as if it was fullscreen while the steam client's UI behaves as if it were not.

Unfortunately this causes the client to effectively remain stuck at fullscreen, and the only things I can do it close, quit, or hide steam. I would also like to mention I did not experience any other abnormal behavior stuarthayhurst mentioned, such as the client launching on the wrong monitor or slowing the system down.

Through Cecilectomy's recommendation I was able to finally return the client to a normal resizable window by deleting ~/.steam/steam/config/htmlcache/Local Storage/leveldb. This also worked while steam was open, provided you quit steam right after deleting this directory.

The actual reproducibility seems to be a little finicky, because it doesn't seem to just be quitting the client while it is maximized, but rather quitting the client when the cache is updated WHILE the client is maximized. So in some cases the issue persisted when the client was closed while not maximized, or didn't happen when close while maximized. I had the most success reproducing this issue when maximizing my client immediately after running steam, then quitting and reopening.

Here are the steps that work 100% of the time for me:

  1. Quit Steam (and maybe use killall steam to ensure its stopped).
  2. Open Steam.
  3. Maximize the client immediately when Steam opens.
    • Or, maximize the client and wait a minute or two before closing.
  4. Quit Steam (maybe use killall steam again).
  5. Open Steam.
  6. Welcome to fullscreen purgatory.
    • From now, quitting Steam won't resolve the issue and the window remains maximized/fullscreen.

Once I was in fullscreen purgatory I also wanted to explore other options rather than deleting the directory mentioned earlier. This lead me to experimenting with wmctrl. For those using an X window manager using wmctrl to make Steam fullscreen mimics this issue. I also noticed that once doing the steps I mentioned above to cause the issue, using wmctrl it is possible to remove fullscreen from the client. HOWEVER, this only works the first time the issue appears when opening Steam. If you quit Steam whilst it is already stuck maximized/fullscreen it is no longer possible to use wmctrl to undo the fullscreen. Also, at least in my environment, Steam seems to ignore most commands that move/alter the window.

Overall, the main issue appears to be that if you close Steam while it saves its state as "maximized" it will instead reopen in fullscreen rather than maximized. From there, the button that would normally maximize/minimize Steam does nothing, because Steam is actually in fullscreen when it shouldn't be.

hubertnnn commented 3 days ago

I think this bug might be related to https://github.com/ValveSoftware/steam-for-linux/issues/10692

From my experience when you are switching video to fullscreen mode (bottom right icon in the video) steam sometimes (cannot reliably reproduce yet) gets into the stuck state: the video does not appear (only sound plays) on screen and the steam client gets unresponsive. The only way to close steam at that point is via kill command.

After you enter that state once, it will always enter that state (every time you try to fullscreen the video, steam gets frozen). And after turning the video to full screen a few times, then at some point the entire steam client becomes stuck in fullscreen (as described in this bug).

Using the workaround (deleting leveldb file) fixes both problems (steam window is no longer perma-fullscreen and fullscrren button on videos starts working correctly as well.