-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications originating on another workspace cause crashes #139
Comments
It just happened again when I was working on a split-screen workspace. I couldn't take a screenshot, but found this in the syslog:
I wasn't switching workspaces, just writing some code in SublimeText while it happened. |
And another one:
This time while using a full-screen Firefox window. |
Another update. I've been testing various scenarios:
It doesn't matter. Crashes happen 3-5 times a day. Mostly if a notification appears after there hasn't been one for a while. |
I've experienced this as well although I ran into several problems, and it seems like they can be triggered when a new notification pops up after clicking a previous one. I could consistently reproduce it this way at least. I'll jut merge my findings here if you don't mind. Scenario is this:
When I'm in Workspace A, a notification pops up, everything is normal. When I click on it, it redirects me to Workspace B, which is also normal. The part where it gets weird is that when I go back to Workspace A, and if a notification from B pops up, things behave strangely. Steps to Reproduce
There are two strange behaviors I ran into:
b.mp4It seems to be fine if I never click on any notification. But I think this part isn't too consistent either. Just seems to be what triggers it in my case. Also it doesn't happen when I turn on do not disturb, as expected. Platform Information
|
happens to my workflow too, I was just blaming my graphics until now lol |
I would like to add that the effect seems to get incrementally worse after it happens one time. Two times already it got so bad that elementary crashed completely, to the point that I needed to log in again and all applications were closed as well (like a fresh login). |
I've been paying attention to the behavior of notifications the past few weeks, and @hsek 's observation is right that the crashes only happen when you're on a different workspace than the app where the notification originates. However, it has nothing to do with clicking on notifications or not. I did a reboot this morning and consciously did not click on notifications when they popped up, but still, I'm getting the crashes. In October I had two crashes where the whole system went down. One time I even had to do a hard reset because my laptop got stuck on a black screen. To be clear, I am no longer using the Beta version. At the end of September, I did a clean install with a new SSD. So this is not Beta-related. |
Some more observations:
|
Just noticed a process called Notifications Demo that's taking up a lot of memory. In fact, more than any other one: I didn't reboot my machine for more than 12 days now, so maybe there's something wrong there. Some kind of memory leak perhaps? I've now terminated the process and I'll have a look at what happens next. |
Not sure what the status on this issue is, but I can confirm this is occuring on every single machine I've used elementary OS on. I'll get a notification from Telegram in another workspace, or Discord, or Mail... And my entire screen will go strange for a bit. The notification spawns on the top-left instead of the top-right, and sometimes the session just outright crashes entirely. My system info is as follows, though this is consistent against multiple machines with varying configs:
|
@Schykle It's good to hear it's not just me. I was starting to think it had something to do with my laptop, which is getting a bit old. |
Just a moment ago, I had the same crash, while notifications are disabled. For weeks now I have had notifications on silent because the whole situation is unworkable. This is what I could grab from the syslog:
|
Interesting. I had notifications silenced thinking it was a workaround. But I suppose adjusting the volume does count as a notification too. Anyway I moved away from elementary to NixOS because workspaces are unworkable. It's unfortunate it has been ignored for this long. |
I have tried to reproduce this on a fresh install of elementary 6.1 using artificial notifications from a terminal in one workspace and the Gnome Browser in another but so far no problems. On my previous install I was getting occasional complete freezes These seemed random but maybe associated with Chromium 🤷 My guess is that there is an obscure bug in Gala/Mutter triggered by certain software/operations - there are some outstanding reports in the Gala repo. See for example elementary/gala#419 for code that (at the time) was said to reliable crash the window manager. This bug contains some info about a similar issue linked to notifications: elementary/gala#1229 |
I'm seriously considering moving away too. I love elementary OS and I've been using it for four years now, but this issue is becoming a massive dealbreaker. It didn't go away with a fresh install, which I hoped it would. I miss the notifications, but if I turn them on, I have to reboot a few times a week because my computer eventually crashes to the point that it's no longer waking up from a black screen. |
Still unable to reproduce by sending 1000 notifications from a terminal loop in another workspace while working in another workspace. Maybe you could try turning off just the sounds or just the bubbles instead of the whole notification and see whether you still get crashes - that could narrow down the cause. |
I'm going to try no sound today and no bubbles in a few days, and report back. |
@jeremypw Checked with sounds disabled, bubbles disabled, both... no change. The crashes keep coming and the bubbles, in that case, are always on the left side. Also, disabling notification bubbles doesn't work. They pop up regardless of the toggle state. |
@wout Are the bubbles Chrome's or elementary's? There is a flag for chrome to use native notifications in Linux. Using that flag and I can confirm it was crashing for me too when chat notifications popped out while having multiple workspaces. I have to test Chrome's own notifications for longer time to see if it still crashes |
@kgenkov For me, it crashes on elementary's native bubbles too. Changing the sound volume, for example, has caused multiple crashes in the past few months. |
@wout Thanks for the update. It is strange you still get Elementary bubbles when they are disabled - which app are they coming from? I assume you disabled the bubbles and sounds in System Settings for "Other" apps? |
I can only see AppCenter notifications disabled in your screenshot. The "Other" option is at the end of the list in the sidebar. This should disable notifications from unlisted apps. Try disabling notifications from third party apps for a start. You can then reintroduce them one app at a time. |
I see that MailSpring is uses the Electron framework and there is this issue Foundry376/Mailspring#2366 about it crashing display managers. Did you install as Flatpak or Snap? If you can find an equivalent mail program written for Gnome/Gtk it might work better on Elementary. I know the elementary Mail program is still under development. |
It's not just Mailspring, it's also Telegram, Slack, Discord, and elementary-native notifications. I've even tried not opening an electron-based app for a whole day, crashes still happen. Quite frankly, there's not a single Gnome/Gtk email app that's acceptable for my use. But that's another topic. |
OK, well I guess we are back to some specific interaction of Gala, notifications and maybe your hardware then. I have not seen this type of crash on my setup (mainly Slack and native notifications). Sorry I could not help more. |
I've now disabled all non-elementary notifications. Let's see if that helps. Also, in May, I'll have a brand new laptop, a maxed-out Dell XPS 13 with ubuntu preinstalled. Perhaps that helps. The graphics on my current machine (Dell XPS 13 with Intel UHD 620) were always subpar, so you may be right. |
Same for Mailspring. Other applications are disabled, but still, they're coming through. So I've disabled them from within the app. |
There are currently some new visual glitches in OS7 but they will no doubt be fixed before release. |
On OS7, I could only get the elementary notifications demo to run by deliberately typing Can you confirm the executable name of the demo process on you machine? Does it have a corresponding dock entry or window? |
Process 2567 is the notifications server (which is normally running) not the demo. You could try running |
It does seem excessive. It starts of using 5.5Mb on my machine. But after sending 2000 test notifications is was still only 65Mb. You can try clearing the notifications but that will not necessarily reduce the memory usage immediately but might stop increasing further. |
Just done that, it's now at 382.5 Mb. I'll keep an eye on it. |
Noticed that after sending the 2000 notifications the wingpanel was using 265Mb. I just tried clearing the 2000 notifications, which did not decrease memory use. I then sent some more - there was virtually no increase in memory so it looks like the memory is not being reclaimed when notifications are dismissed but it is being reused for more notifications. Anyway, this is off topic for this issue; should really open another. |
Yeah, sorry about that. I thought it may have been related. |
Can reproduce on daily builds. What's most irritating (and trust me, there are a lot of irritating things about this) is that if it happens in quick succession (to be exact, twice in a minute), gnome-session then gives up on restarting gala, throws up the fail whale screen, and even if you restart gala, the fail whale still covers everything. If you kill the process, gnome-session terminates itself. Everything I just described is hardcoded, so there's no way to turn off this behavior, which makes debugging this whole thing about as exciting as a visit to the dentist. I'm not sure who thought that porting the BSoD to Linux was a good idea, and I am going to do my best to not find out. Anyway, in case anyone wants to try and debug this too, my workaround for now has been to use |
Great to see movement on this issue. I've resorted to turning off notifications altogether. In the meantime, I bought a new computer, did a fresh installation, and it had this issue from day one. |
@GranPC Sorry to hear that, but elementary OS does not use Since I'm here, you reminded me I wanted to post an update.I've managed to find a native app that caused me a lot of crashes - Fondo (no account needed 🥳 ). The app lets you select a wallpaper from Unsplash.com and set it as your background, sending a notification after every success. It's natural to try a bunch of wallpapers and switch to empty desktop to check them out. With the incoming notifications and frequent workspace switching, the crash is just behind the corner, trust me. I hope this can help with reproducing the issue and debugging. |
Are you sure? I just installed a fresh VM with 6.0 and...
But, to answer your question... I actually installed Ubuntu 22.10, stripped a bunch of the stuff it came with, and installed the elementary OS session. Which actually depends on Ubuntu 22.04, so getting the dependencies right was... not fun. I assumed that's why it was crashing, but I decided to check the issue tracker and... well, here we are. |
Okay, that can be the same issue or not, hard to say with that many mods 😅 Can you try to reproduce with the Fondo app, as I described? |
It's definitely the same issue: I also noticed it was related to workspaces, the symptoms are identical, the logs look the same, and the |
It seems like the issue is that, if a notification gets closed while you are in the process of switching workspaces, |
Ha, found the root cause: https://github.com/GNOME/mutter/blob/3.36.9/src/compositor/meta-window-actor.c#L882 I'm not sure how to fix this "properly" and I'm not keen on forking Mutter too. We might be doing something wrong, but I'm just going to make the notification stack drop windows that are no more. This will fix the crash. You may still see notifications stuck on the top left. I believe this is what happens when a notification is received while you are switching workspaces; Mutter does not notify us of this, either, so we can't apply our cool positioning logic. You could feasibly fix this by iterating through all the windows instead of maintaining a local list, but I'm running this on a laptop and I want power efficiency. https://github.com/GranPC/gala/tree/jesus/notification-crash-hack There is also a version available for Horus (in case someone's running 7 and also frustrated): https://github.com/GranPC/gala/tree/jesus/notification-crash-hack-horus Please enjoy. I hope my research will help someone fix this properly. |
"Fixed" in elementary/gala#1497 - @lenemter, close? |
Fixed in elementary/gala#1497. Thanks @GranPC. |
That's great news! Is the fix gonna get into OS 6.1 or only to OS 7? |
I just got a crash with an email notification, so I guess the fix did not land in OS 6 yet 😕 |
Didn't have a crash for months and I just had a second crash in 3 days. |
I've had notifications on mute for months now. It's a bit of an inconvenience, but it's better than having my UI crashing a few times a day. I hope we can move to OS 7 soon! |
Prerequisites
Describe the bug
I'm using Odin Beta 2 on my laptop for a week now and noticed at least five crashes on workspaces where the windows are in full or split-screen mode. This happens mostly when a notification occurs while moving between workspaces.
The crash sometimes results in all windows from all workspaces moving to the current workspace. But other times it results in all full and split-screen windows being over-scaled (from the looks of it, by the height of the main top panel).
At the moment of the crash, everything freezes for a second or two and most importantly, the notification doesn't appear on the top right but on the top left of the screen.
To switch workspaces, I use all available methods:
To Reproduce
Steps to reproduce the behavior:
Note: it's hard to reproduce.
Screenshots or screen recordings
I'll try to take a screenshot the next time it happens.
Logs
I'll report those when it happens again.
Platform Information
Additional context
Using a single 4k monitor in HiDPI mode (3840 x 2160 @ 60 Hz).
The text was updated successfully, but these errors were encountered: