-
Notifications
You must be signed in to change notification settings - Fork 177
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
segfault when displays power off from being idle too long #2005
Comments
The same seg fault crash seems to sometimes happen when I manually turn off one of my monitors and then turn it back on. If I have "vblank_mode=0 glxgears" running and displaying on the monitor that I turn off and back on, the likelihood of the crash occurring increases noticebly. One of my monitors is actually a TV (Insignia 20" 1920x1080). It always take a while for the TV firmware to boot back up when powering back on, and this seems to increase the likelihood of getting Wayfire to segfault when powering the TV back on. My other monitor is a Dell E2318HR 20" computer monitor. It boots much more quickly when powering it on. The seg fault crash does occassionally occur on this monitor, but the crash is a lot harder to get. |
It would be nice if you could compile Wayfire with address sanitizer and attach a stacktrace from ASAN (it will generally have much more information). |
I originally thought the problem occurs when the monitor is powering down. But actually, using the It's like something in Wayland thinks everything is good to go on the monitor powering up, but in reality Wayland should wait longer before doing anything with the monitor powering up because that monitor isn't really ready to operate while the TV's firmware is still booting up the display.
|
If I'm reading 3dd1671 correctly it was merged to master on 2024/01/10. I still have this issue just about every morning on version 0.9.0-4f0cc550 (Feb 12 2024, branch 'master') also with an AMD gpu (RX 6700 XT). I'm going to check if there are any amdgpu power settings that would prevent going into this state as a workaround. It is fine returning from DPMS when I step away for less than an hour, not sure after that. |
A very far-fetched idea of mine as to what could be happening, the following patch might fix it (but somehow I doubt it, because these situations shouldn't happen at all): diff --git a/src/view/layer-shell/layer-shell.cpp b/src/view/layer-shell/layer-shell.cpp
index 1a24f29b..ea14f6c2 100644
--- a/src/view/layer-shell/layer-shell.cpp
+++ b/src/view/layer-shell/layer-shell.cpp
@@ -447,6 +447,7 @@ std::shared_ptr<wayfire_layer_shell_view> wayfire_layer_shell_view::create(wlr_l
void wayfire_layer_shell_view::handle_destroy()
{
+ lsurface->data = nullptr;
this->lsurface = nullptr;
on_map.disconnect();
on_unmap.disconnect(); Otherwise, I am not really sure what could be causing this. The stacktraces from earlier seem to have been generated in release mode, so it would be great if someone could reproduce while testing Wayfire in compiled with debug symbols and address sanitizer at the same time, to get an idea of exactly where the failure is happening. |
Also check dmesg after the problem, maybe the gpu is resetting, in which case, a driver upgrade might help. |
No resets in dmesg or anything out of the ordinary. I have a feeling it is the AMD ultra low power state "feature" that can also cause black screens on return from sleep and hibernate. I will compile and run whatever you would like to see but I'm going to need some help with the flags for meson with debugging and asan. |
@piaccarino Thanks. You will want to set meson option |
https://prcl.dev/so1xntxiqlb20ob |
A few things I found with this new backtrace:
|
|
Yes, you should need only the last one :) |
Was able to wake the screens this morning with keyboard input and swaylock-effects was waiting for password as expected. Log shows a successful transition where it previously faulted. I'll have at least one more in the next few hours but otherwise I'll give it a few more days with logging to see if anything else pops out.
|
Ensures that we don't accidentally crash when cleaning up views. Fixes #2005
Ensures that we don't accidentally crash when cleaning up views. Fixes #2005
I have a dual monitor system with two discrete AMD RX 550 video cards. When I leave my system idle for a long time, the monitors automatically power down. When this happens, Wayfire crashes with a segmentation fault. Here's the output of "wayfire -d" when the last monitor powers down and wayfire segfaults:
I am using Wayfire 0.8.0. These are the plugins enabled:
The text was updated successfully, but these errors were encountered: