pop-os / shell

Pop!_OS Shell
GNU General Public License v3.0
4.79k stars 261 forks source link

Windows get randomly reshuffled #1626

Open maralorn opened 1 year ago

maralorn commented 1 year ago

First, let me say, that I really love pop-shell. I had been looking for a good tiling solution on gnome for years, and this is the first one which really works.

(1) Issue/Bug Description:

At seemingly random times*, often in moments where there is no direct user interaction, all windows on my current desktop get shuffled around, like if pop-shell completely forgets its tiling state and restarts tiling from scratch.

When I set pop-shell logging to DEBUG I see one line of pop-shell: [DEBUG] attaching to window ... for every window on my desktop. For windows on other desktops I see: pop-shell: [DEBUG] attach to workspace: no window has been previously focused

* The times are maybe not completely random. I know this sounds crazy, but this seems quite consistently to primarily happen when my cpu usage spikes. e.g. a few moments after I start a nix build process or start recompiling a document with latex. I don’t think this has to do with resource exhaustion, my machine is quite beefy, and apparently already short and small cpu spikes seem to trigger this.

(2) Steps to reproduce (if you know):

Use pop-shell with my setup, open a few different windows, e.g. terminals. Start a load intensive job.

(3) Expected behavior:

Tiling and windows to stay consistently where I put them.

(4) Distribution (run cat /etc/os-release):

BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues" BUILD_ID="23.05pre-git" DOCUMENTATION_URL="https://nixos.org/learn.html" HOME_URL="https://nixos.org/" ID=nixos LOGO="nix-snowflake" NAME=NixOS PRETTY_NAME="NixOS 23.05 (Stoat)" SUPPORT_URL="https://nixos.org/community.html" VERSION="23.05 (Stoat)" VERSION_CODENAME=stoat VERSION_ID="23.05"

(5) Gnome Shell version:

GNOME Shell 44.1

(6) Pop Shell version (run apt policy pop-shell or provide the latest commit if building locally):

Commit: b5acccefcaa653791d25f70a22c0e04f1858d96e Currently packaged as version unstable-2023-04-27 in nixos-unstable.

(7) Where was Pop Shell installed from:

Installed via nixos from the pkgs.gnomeExtensions.pop-shell attribute.

(8) Monitor Setup (2 x 1080p, 4K, Primary(Horizontal), Secondary(Vertical), etc):

one 4k Monitor, vertical

(9) Other Installed/Enabled Extensions:

(Edited to remove other extensions, I tested it without any other extensions and the problem still exists.)

(10) Other Notes:

From my vague memory I had this problem sometimes (but rarely or maybe not at all) on older gnome versions, but it became quite frequent when I switched to nixos-unstable with gnome 44.1 and the above-mentioned pop-shell version. Before that I was on gnome 43.2 and popshell from 2022-10-11 …

I am sorry to open this arcane bug, which you probably can’t reproduce. But having my windows randomly jump around while working can be quite distracting. (Although I sometimes wonder if the frequent head movements required to follow the windows on my big screen are actually healthy by making me move more …) I’d love your help for finding a fix. I will help as good as I can in debugging this issue if you have any ideas about how to do that.

CCing @genofire as nixos packager of pop-shell.

leviport commented 1 year ago

I believe this is a duplicate of https://github.com/pop-os/shell/issues/948

maralorn commented 1 year ago

Hard to tell. I agree that the symptom is the same, but very much like #917 and #948 are not describing the same circumstances when the bug triggers, my circumstances are yet again different. I don’t log in or out at all, I don’t switch workspaces, I often use only one. It just happens without any triggering action.

flokli commented 1 year ago

@maralorn wild guess into the blue, do you use kitty? I didn't have this issue, until I started using kitty. Maybe it's doing something funny with windows.

maralorn commented 1 year ago

Nope, I have used kitty on and off but it definitely happened without it. On application which triggered this issue above average for me was zotero.

spaghetus commented 1 year ago

I'm also having this issue, I just moved back to GNOME since KDE's recent changes broke Bismuth. This is incredibly annoying - has anyone found a fix? I've never installed Kitty or Zotero, and it's happened four times in the time it took me to type this.

maralorn commented 1 year ago

Because of the very probabilistic nature of this bug, everyone will subjectively find spurious correlations. I don't think this is specific for certain applications.

akumaburn commented 11 months ago

Yeah I've noticed that windows will randomly regroup when spread over separate activities. It is very annoying and difficult to reproduce but its definitely happening.

ashimokawa commented 4 months ago

I have exactly the same problem, on GNOME 43, Debian 12. So this is not only GNOME 44.

It sometimes even happens with only two windows side by side which then randomly swap positions. With more windows the layout can even change, it just happened while typing this. But also when not touching keyboard/mouse at all.