nikp123 / xava

X11 Audio Visualizer for ALSA
http://nikp123.github.io/xava
Other
129 stars 14 forks source link

[Bug] Constantly reloads #20

Closed make-42 closed 4 years ago

make-42 commented 4 years ago

Due to commit 568771a92c2d8c0cc9dfa279aa919de00aa5577f XAVA constantly reloads as if the display changes but it doesn't.

OS: Ubuntu 20.04 with KDE Monitors: 2x(1920x1080)

ontake@ontake-PC:~/Apps/xava/xava/build$ xava
Display change detected - Restarting...
Display change detected - Restarting...
Display change detected - Restarting...
Display change detected - Restarting...
Display change detected - Restarting...
Display change detected - Restarting...
make-42 commented 4 years ago

I would suggest an option in the config to ignore monitor change.

nikp123 commented 4 years ago

Yeah, sounds pretty unusable otherwise. Thanks for reporting.

nikp123 commented 4 years ago

Test if it works. I mean it probably should, but test anyway.

I don't consider this to be the "true" solution, but it will do for now. I'm just curious as to why are RRScreenChangeNotify events firing constantly (on your machine) as opposed to just when the display, is, well, changed. I will have to look into this, probably some downstream bug I'd imagine.

make-42 commented 4 years ago

Yes, building rn.

make-42 commented 4 years ago

For some reason, it keeps doing the same thing, looking into it.

make-42 commented 4 years ago

Can you try changing monitors on new build?

iamsubhranil commented 4 years ago

yup, changing reload_on_display_configure = false is not solving the issue.

iamsubhranil commented 4 years ago

i'm not entirely familiar with the X api, but should the condition at graphical_x.c:545 be && instead of +?

if (xavaRREventBase && RRScreenChangeNotify) {
             printf("Display change detected - Restarting...\n");
             return 1;
}
make-42 commented 4 years ago

Gonna try building with that modification

iamsubhranil commented 4 years ago

working fine for me

make-42 commented 4 years ago

Also that's line 494

make-42 commented 4 years ago

Yup works for me too

make-42 commented 4 years ago

You should submit a pr

iamsubhranil commented 4 years ago

thanks. gonna do it

nikp123 commented 4 years ago

Hold on I'm just going to fix the mentioned check, to be PROPER this time.

Please try again once I push the code, and try again with both reload_on_display_configure = true and reload_on_display_configure = false and report the results.

make-42 commented 4 years ago

With reload_on_display_configure = true or with reload_on_display_configure = false, XAVA never reloads(Even when changing monitors).

nikp123 commented 4 years ago

Strange, it works on my machine....

nikp123 commented 4 years ago

It could be that you don't have Xrandr extensions, but I doubt it. Please check if the 'if statement' in graphical_x.c:281 is true. For this feature to work, it must always be true. That's the only reason why it could fail.

nikp123 commented 4 years ago

The issue seems to be fixed. Tested on Kubuntu 20.04 with Intel graphics.

Please check if everything seems to work on your end. Try checking if you have missed any steps.

make-42 commented 4 years ago

will do!

nikp123 commented 4 years ago

Did you reproduce the issue?

make-42 commented 4 years ago

Nope, it is fixed, sorry for the long response...