Bug in stacking order of windows

I just moved to Zorin and I'm experiencing a weird bug where some windows get stuck in the back after a while. So, for example, by opening a calculator, the window will stay behind the current windows. There's absolutely no way to get it in the front, other than moving the other windows out of the way. The same is true for dialogues to save or open files. The only way to get around it seems to be a reboot. Here's my setup:

I'm using both the laptop's screen and an external monitor. Some desktops are in full screen, others in split screen and some just floating.

Can you first try unsticking Modal Dialogues?

The next thing to try is if you are connecting and disconnecting an external monitor regularly, it may help to Refresh The Desktop immediately after making the change in the monitors. Otherwise, after disconnecting the external monitor, then opening a window that has a model window, the modal may be present off screen on the now disconnected external monitors window space.

Thank you for the quick reply! I tried that already, but it does not make a difference:

After rebooting, I noticed something else. If I open the calculator on a desktop with Discord, it remains behind the Discord window. It's back on top after moving to a different desktop and then using cmd+tab to navigate to the calculator again. But then, clicking on Discord, it's stuck again behind the Discord window.

Digging deeper, I noticed there seems to be a priority issue with Electron windows. Discord, Telegram, Mailspring, they all are up higher in the stack than native windows.

For example, they all seem to be fixed on top, and switching between them does not change the index. Native windows open below them, but moving them around does work properly. So I can open a bunch of native applications, and they correctly change their index when clicking on them and moving them around. But that's all happening behind the Electron windows.

Quitting Discord and reopening fixes the issue. But then Telegram will be on top. Doing the same with Telegram and Mailspring fixes them as well. I'm going to keep an eye on it to see when they start misbehaving again.

1 Like

I honestly did not expect or think of this.
I have and use Discord and it also does not stay always on top.
I use BetterDiscord, though. I wonder if that makes a difference.

A developer can set the option in electron apps. As an example:

mainWindow.setAlwaysOnTop(true, "floating");

In searching this; it was noteworthy that this effect is present on Windows OS, as well.

I have and use Discord and it also does not stay always on top.

Yeah, it's strange. I'm coming from elementaryOS where I didn't have this issue. But they have their own DE so that's probably completely different. But I've used Pop!_OS too for a while and there I never experienced this either.

mainWindow.setAlwaysOnTop(true, "floating");

I don't think that's the case since it starts out working fine. It's only after a while that the stacking order gets messed up.

This presents a bit more clues...
Can you please post the terminal output of

sudo lshw -C video

Also - make and model of the machine.

Can you please post the terminal output of

       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 0c
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 mode=2256x1504 visual=truecolor xres=2256 yres=1504
       resources: iomemory:600-5ff iomemory:400-3ff irq:169 memory:605c000000-605cffffff memory:4000000000-400fffffff ioport:3000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff

Also - make and model of the machine.

It's a Framework laptop:

        `osssssssssssssssssssso`           wout@Framey 
       .osssssssssssssssssssssso.          ----------- 
      .+oooooooooooooooooooooooo+.         OS: Zorin OS 16.3 x86_64 
                                           Host: Laptop (12th Gen Intel Core) A8 
                                           Kernel: 5.15.0-79-generic 
  `::::::::::::::::::::::.         .:`     Uptime: 16 hours, 38 mins 
 `+ssssssssssssssssss+:.`     `.:+ssso`    Packages: 2284 (dpkg), 76 (flatpak), 6 (snap) 
.ossssssssssssssso/.       `-+ossssssso.   Shell: bash 5.0.17 
ssssssssssssso/-`      `-/osssssssssssss   Resolution: 3000x2000, 3840x2160 
.ossssssso/-`      .-/ossssssssssssssso.   DE: GNOME 
 `+sss+:.      `.:+ssssssssssssssssss+`    WM: Mutter 
  `:.         .::::::::::::::::::::::`     WM Theme: ZorinGreen-Light 
                                           Theme: ZorinGreen-Light [GTK2/3] 
                                           Icons: ZorinGreen-Light [GTK2/3] 
      .+oooooooooooooooooooooooo+.         Terminal: gnome-terminal 
       -osssssssssssssssssssssso-          CPU: 12th Gen Intel i7-1280P (20) @ 4.700GHz 
        `osssssssssssssssssssso`           GPU: Intel Device 46a6 
                                           Memory: 9988MiB / 64008MiB 


That would be Intel Iris Xe Graphics...

Intels supplied drivers for the Iris Xe has been a thorn in many users sides.
You might try setting the grub parameter nomodeset:

And removing the Intel Drivers:

sudo apt remove xserver-xorg-video-intel

Are there any downsides to removing those drivers?

Possibly, though not major; Some users may experience less responsiveness in their graphics.
As always, before performing any removal of drivers; perform a Backup of personal data or set a TimeShift savepoint.

I've never had the above go awry (and that has been the solution of such issues before); it would be our luck that the one time the users asks if there was a downside that everything goes haywire. :expressionless:

It is also possible that the above may not go wrong in any way but won't solve the issue, either.
In which case, we'll have to try something else. I am leaning toward graphical given your detailed experience and that the issue asserts itself over time - it sounds like a graphics overlay issue.

1 Like

That would be unfortunate indeed :smile:

But I'll go for it. The installation is pretty young, and it's worth a try. I just read those drivers are mainly for older configurations.

I must say, on elementaryOS, I also had graphical glitches. Not sure if it's the same thing, but after a while, my screen started freezing in intervals for several seconds. Never found out the source of the issue, but it may as well be related.

I would not be surprised. Of Intel Graphics, the Iris Xe are the most asked about for support on the forum for several years, now.
I honestly have no idea what Intel did with that set, nor why it is that there has been no improvement in the open source provided drivers. You would think some patches would have rolled in eventually.
Like AMD, Intel publicly voices support for Linux, but in the backroom of the office, has the penguin on a dartboard.

1 Like

Yeah, I've not been happy with Intel, actually. Once the AMD motherboards are available, I'll upgrade this machine.

I've tried the nomodset parameter, but then the external monitor wasn't recognised, and I couldn't change the brightness on my built-in screen. So I reverted back, reinstalled the plugin but now there's a serious lag on everything. Dragging windows around seems like 15FPS. Any idea how that can be fixed?

It seems that all graphics-intensive applications are now sluggish. Opening Blender, for example, takes more than half a minute, and dragging the default cube around is agonizingly slow.

It looks like I'm going to have to reinstall. :nerd_face:

I physically facepalmed.

By 'reinstalled the plugin', you are referring to:

sudo apt install xserver-xorg-video-intel


I physically facepalmed.



Yes, correct.

If the problem reoccurs, can you test doing the following:
With a window trapped at the back, tap alt+F2 and enter in the letter r and tap the enter key to Reload the Desktop Environment. Then check if the windows are behaving normally after doing so.

1 Like


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.