-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
SIGABRT moving cursor between screens #1353
Comments
multiple screen setup is not actively being supported by picom. many parts of picom assumes there is only one X screen. if removing the assertion makes it work, then i suggest you just build without the assertions (i.e. |
I could try that, but what is the purpose of this assertion followed immediately by checking if What about removing the |
the assertion isn't checking if cursor is NULL:
this means: cursor shouldn't be NULL, unless |
Obviously, I need this: assert(!insomnia || coffee != NULL); I wish picom did actively support multiple screens. I would prefer to keep assertions to help provide information, at least when valid. 😁 For now, I will just remove the first assertion line. This issue can be kept open for whomever wants to work on the code handling multiple screens or not. I am good for now with my local change. |
After removing the --- src/wm/wm.c.orig 2024-09-28 23:22:13 UTC
+++ src/wm/wm.c
@@ -404,7 +404,13 @@ void wm_destroy(struct wm *wm, xcb_window_t wid) {
void wm_destroy(struct wm *wm, xcb_window_t wid) {
struct wm_tree_node *node = wm_tree_find(&wm->tree, wid);
- BUG_ON_NULL(node);
+
+ // Skipping destruction of window that cannot be found. This occurs
+ // after the monitor goes to sleep.
+ if (node == NULL) {
+ log_debug("Destroying window %#010x ignored", wid);
+ return;
+ }
log_debug("Destroying window %#010x", wid);
|
i think you can just keep running with that patch. the only real "fix" would be to systematically go through picom and fix every single case where we assumed single screen. not sure if that would be worth it. you are probably the second person i've seen that uses a mult-screen setup for the entirety of picom's existence 😅 |
It is not a problem for me since I build all software locally. The patch will live in the local ports tree. To satisfy my curiosity, how would picom be seeing my multi-screen setup? Since it runs as two separate screens (:0.0 and :0.1), I would think it would be ignorant of the other screens, which is why I run two instances of picom. I would think in this case (picom's) ignorance would be bliss. The only thing that I think is confusing picom would be the "disappearing" cursor when it changes screens. I have been trying my hand at writing a simple systray app using xcb. Except for finding the screen at the beginning, it stays intentionally ignorant about how many screens there are. This is some condensed code that I have from it: int screenNum;
xcb_connection_t *conn;
const xcb_setup_t *xcbSetup;
xcb_screen_iterator_t sIter;
conn = xcb_connect(NULL, &screenNum);
// Gather information about this display and particular screen.
xcbSetup = xcb_get_setup(conn);
sIter = xcb_setup_roots_iterator(xcbSetup);
for (int i = 0; i < screenNum; i++)
{
xcb_screen_next(&sIter);
} However, https://stackoverflow.com/a/73515847 looks like it has more checks than I have.
I never take the easy path. LOL BTW, when you say multi-screen, you do not mean multiple monitors viewed as one screen, yes? Just making sure as I confuse myself sometimes. |
right, i mean multiple X screens like |
I think in many places we just assume the screen number is |
I think I understand better. Some of the confusion, for me, is there is a mix of Xlib and XCB calls such as with Would you be able to point at a line of code as an example of where picom assumes it is One thing that may be helping it to "work" is that my monitors are nearly the same with only the refresh speeds being different. Thank you for your work on picom and time explaining things to me. P.S. I just noticed where you work. Since you work with Wine (a tiny bit 😁), would you happen to know an easy way to tell Wine to set the |
I found this when trying to find an occasional SIGABRT in picom. It was happening infrequently but usually when the monitor went to sleep.
It could be the same issue, but with debugging enabled (and no optimization) this happens all the time. I believe that this assertion is not needed as there is a secondary check against
cursor
following it that does another search forcursor
, but I am not sure how the code is supposed to behave. However, removing that first assertion seems to makes things happy. https://github.com/yshui/picom/blob/v12.1/src/event.c#L281This may or may not be related to the SIGABRT without debugging. Time will tell.
Platform
FreeBSD 14.1-STABLE
GPU, drivers, and screen setup
Multi-screen setup (from xorg.conf):
Mesa version:
24.1.7
glxinfo -B output:
Environment
Fluxbox
picom version
Steps of reproduction
Instead of:
Expected behavior
No SIGABRT
Current Behavior
SIGABRT
Stack trace
Note that the window ID is from the window focused on the screen the cursor is leaving.
The text was updated successfully, but these errors were encountered: