regolith-linux / regolith-desktop

Meta package for the Regolith Desktop Environment
1.51k stars 31 forks source link

Workspaces are being created when screen lock is on (multiple monitors) #172

Closed vanboom closed 2 years ago

vanboom commented 4 years ago

Ubuntu 18.04

  1. Lock the screen.
  2. Leave and come back after a while.
  3. Log back in.

Something is creating numerous workspaces while the screen is locked. If you wait long enough, you will have a thousand workspaces. This is happening on two out of three Ubuntu 18.04 systems.

Screenshot from 2019-11-16 12-33-58

Any advice on where to investigate would be appreciated.

leosunmo commented 4 years ago

Hello @vanboom! This is extremely weird, never seen this before.

First of all, how "stock" is your Regolith installation? Do you have something that could be appending these workspaces? Are the workspaces all empty? A ps -ef and looking through the list to see if there's anything unusual running might be a good idea too.

I'm not even sure how it keeps appending workspaces like that, not sure there's a straightforward/built-in way to just append workspaces like this. Only thing I can find from very quick searching is https://faq.i3wm.org/question/6004/creating-a-new-workspace.1.html.

vanboom commented 4 years ago

Yes, it happens when all of the work spaces are empty. I'll dig some more and see if I can spot something. It is regolith-desktop installed on stock Ubuntu 18.04. One of my machines is brand new fresh install. I tweaked the theme back to Adwaita, otherwise stock.

kgilmer commented 4 years ago

I have seen a minor form of this when locking/unlocking my work laptop that's attached to 3 external monitors. Upon resume, I think the monitor hotplug bounces around a bit and i3 created/destroys workspaces on monitors, and I get a few empty workspaces, but nothing like this. How many monitors are attached to the computer @vanboom ?

vanboom commented 4 years ago

2 monitors are connected. All of the desktops end up on one monitor, with the other monitor having the same number as when it went into lock.

kgilmer commented 4 years ago

@vanboom can you see if only having one monitor attached to one of the computers with the problem effects the issue? I'm assuming you mean a desktop with two monitors, and not a laptop w/ 2 monitors..?

vanboom commented 4 years ago

@kgilmer the issue does not happen with only one monitor connected. Oddly, it did not happen on my Nvidia based machine with dual monitors, but it does happen on my AMD based machines with two or three monitors. I think the issue is as you described the monitor hotplug bouncing. On one occurrence I had over 1000 work spaces.

leosunmo commented 4 years ago

Other than an upgrade to 19.04/19.10, I don't have any useful suggestions right now...

Do you have an easy way to reproduce this? It might be interesting to turn on debug logs for i3 and let it run for however long it usually takes for workspaces to start popping up.

You should be able to follow some steps from this page: https://i3wm.org/docs/debugging.html

I'd be interested to see if it even tells you what opened a new workspace actually, might not end up being useful.

kgilmer commented 4 years ago

I'm unaware of any Regolith-specific code that would cause this, but also am unsure of what upstream component would be the most likely to report a bug against. It could be anything from graphics driver, gnome-flashback, i3-gaps, etc..

kgilmer commented 4 years ago

Can anyone verify that this is fixed/still-broken against Regolith 1.4.1?

vanboom commented 4 years ago

System: fresh install of Ubuntu 20.04, regolith-desktop 2.63-1focal1

The workspaces get jumbled up when the system is in screen lock, but the additional workspaces are no longer being created. Thanks!

kgilmer commented 4 years ago

Yes, I also get this issue. My workaround is to save/restore the window layouts when I remember to, like if I'll be unplugging my laptop for a meeting.

save: <super>, load: <super>.

Thanks for confirming the fix @vanboom

vanboom commented 4 years ago

UPDATE: I am still having the issue on 20.04, will try to save and restore the layout as you suggest. Thanks.

influx6 commented 4 years ago

I also experience this issue am using a Asus Tuf A15 system with ubuntu 20.04 and latest installed from the regolith ppa. When the screen goes dark, and goes to sleep (with the attached monitor) two things occur:

  1. All my windows move to the first (assumption that maybe the kernel is not handling the grpahics driver well)
  2. Multiple windows are being generated on every single time.
ParasiteDelta commented 2 years ago

As of today, having the same issues, with the primary difference being that I installed the Regolith DE on top of Pop OS. Multiple stock installs directly from the terminal lead to the same thing, has been occurring for over a year now. Happens regardless of the greeter or what other DEs and dependencies are installed. Tested on both 20.04 and 21.04.

Setup: -Ryzen 2 2700X CPU, MSI B450-A Pro Motherboard -16GB RAM, DDR4 @2933MHz via XMP -EVGA XOC 1660Ti, stock settings, default Nvidia driver install boxed with Pop (everything up to 470.82) -Linux 5.13 kernel -2 1440p panels, one connected via DP, one via HDMI -Stock Regolith DE settings

Reproduction: -Open a few windows or programs, do anything, either manually lock your screen or let it auto-lock -Leave for at least five to ten minutes -Come back, log in -On average, at least 30+ empty workspaces that are generally split between both panels

No idea what causes it, currently at a loss, but it's enough of an issue that I've had to consider other DEs for the moment.

cfsmp3 commented 2 years ago

No idea what causes it, currently at a loss, but it's enough of an issue that I've had to consider other DEs for the moment.

Can you paste the output of

journalctl

also, dbus could be interesting:

dbus-monitor

Note that both are going to be very verbose, so you'll need to find the relevant parts and post them here.

If in doubt, just redirect to file and attach a .zip.

Personally I can't reproduce (I just have one monitor to begin with) but I can try to help to figure it out.

kgilmer commented 2 years ago

I have seen this behavior on occasion, although not in the last year or so. I am guessing it is some interaction between hotplug events and the graphics driver, but have low confidence in the assessment. In addition to @cfsmp3 's questions, It would be interesting to know if changing the lockscreen program makes any difference @vanboom .. if you have time and interest this will tell you how to swap out the lockscreen: https://regolith-linux.org/docs/howtos/change-lockscreen/

ParasiteDelta commented 2 years ago

Outputs.zip

I couldn't get it to happen again, so I'm not sure if I didn't wait long enough or something. DBus didn't show anything from what I could tell, the Journal output is massive, so both are in the archive. I'm just confused because of the sheer amount of time that this has occurred for me, across multiple installs and configurations. I'm in the process of updating my PC, so I'll see if it changes or goes away for good.

cfsmp3 commented 2 years ago

Outputs.zip

I couldn't get it to happen again, so I'm not sure if I didn't wait long enough or something.

Hopefully next time it happens you'll be able to capture logs. This kind of bugs that only happen to a small amount of people a small amount of time are the hardest one to troubleshoot.

ParasiteDelta commented 2 years ago

OutputsUpdated.zip Just updated the system, left for around 20m for dinner, left the DBus output running. Both files are updated, but there were over 37+ workspaces, all of them blank save for the first two workspaces, the defaults. The bug appears to mainly occur when the screen goes blank after locking, so I dropped the screen blank timer to 5 minutes beforehand. The DBus output appears to have these incredibly long integer lists later on, so I'm not sure what that's about.

Either way, thank you for your help.

EDIT: oh, and for comparison, the DBus output that I posted before was KBs in size. After leaving, it's now just under 50M, so I'm pretty sure something went wrong.

ParasiteDelta commented 2 years ago

Well, the issue appears whenever the screen goes blank, not just on screen lock. In the last day, it's swiftly reminded me why I disabled the screen blank timer.

To detail, I set the screen blank timer to 5 minutes. The center panel is connected via DisplayPort, the left is connected via HDMI. The center panel is primary and contains workspace 1, while the left panel is secondary and contains workspace 2. I waited without opening anything, and once the timer activated, it disabled my night light setting and began to dim my screen. The screen stayed black for roughly 15 seconds before triggering the lock screen. I immediately logged back in to find that the night light setting remains disabled, workspace 1 has been pushed to the secondary panel along with workspace 2, and a blank workspace 3 was created on the primary panel.

So, current working theory is that on screen blank, it pushes the workspace from the primary display to the secondary display, which creates a blank workspace on the primary. This then repeats for an unknown duration at an unknown interval, creating the issue. This kind of makes sense as well, since on both the login screen and unconfigured DEs/WMs like Awesome, my left panel is potentially set as the primary (unconfirmed) and is moved out of alignment, where it reads as if it's to the right of my center panel. So, potentially, could this be related to a system display config fallback of some kind? If so, how would I define a system-wide display layout? Attached dbus logs of event frame, so you don't have to sift through roughly 50M of text. db-out.zip

kgilmer commented 2 years ago

I believe this is hardware/kernel dependent, and there is nothing in Regolith itself that I'm aware that would address this issue.

procopio420 commented 1 year ago

@kgilmer weird that using the same hardware/kernel with other desktop environments and I never saw that before just on regolith :(