Skip to content
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

Screen becomes empty #30

Closed
ChrisLahaye opened this issue Oct 29, 2018 · 37 comments
Closed

Screen becomes empty #30

ChrisLahaye opened this issue Oct 29, 2018 · 37 comments
Labels
compiler compiler related problems (e.g. build failure for a specific version of compiler; miscompiles; etc.)
Milestone

Comments

@ChrisLahaye
Copy link

Thank you for your great work. Please let me know if I can help by providing any additional information or performing tests.

Platform

Linux arch 4.18.16-1-ck-skylake #1 SMP PREEMPT Sat Oct 20 08:37:58 EDT 2018 x86_64 GNU/Linux

GPU, drivers, and screen setup

130 chris@arch ~/dotfiles/compton (git)-[master] % glxinfo | grep -i vendor                  
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
    Vendor: Intel Open Source Technology Center (0x8086)
OpenGL vendor string: Intel Open Source Technology Center

chris@arch ~/dotfiles/compton (git)-[master] % lspci -k | grep -EA3 'VGA|3D|Display'     :(
lspci: Unable to load libkmod resources: error -12
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
        DeviceName: Onboard IGD
        Subsystem: Hewlett-Packard Company HD Graphics 530
        Kernel driver in use: i915

Environment

XFCE4

Compton version

v3 and v3-rc2-16-g06d8792

Compton configuration:

Default configuration and /etc/xdg/compton.conf.example
Tried any combination of options

Steps of reproduction

  1. compton --config /dev/null

Expected behavior

Windows to be visible

Current Behavior

Screen becomes empty

Other details

https://youtu.be/WrTd4yi8FcA

I remember having this problem on your fork a long while ago, then it was fixed for a while, now it is back again.

@yshui
Copy link
Owner

yshui commented Oct 29, 2018

Have you tried the glx backend?

@yshui
Copy link
Owner

yshui commented Oct 29, 2018

OK, there seems to be some problem in the window stacking code. I will look into it.

@ChrisLahaye
Copy link
Author

Have you tried the glx backend?

Yes, same results

OK, there seems to be some problem in the window stacking code. I will look into it.

Thank you, well appreciated

@yshui
Copy link
Owner

yshui commented Oct 29, 2018

What happens when you have more windows open? What window manager do you use? (I was assuming xfwm4).

@ChrisLahaye
Copy link
Author

What happens when you have more windows open? What window manager do you use? (I was assuming xfwm4).

I am indeed using xfwm4. I get the same results independent of the number of windows or screens.

In the screen recording, the first part is without configuration, here it disappears instantly (same as with the shipped configuration sample). The second part is with my own configuration (https://gist.github.com/ChrisLahaye/1f11ce1d1748889064df1010254984ce), here it disappears when opening an overlay (plank, notification) or menu (context menu, whisker).

@yshui
Copy link
Owner

yshui commented Oct 29, 2018

I cannot reproduce this on a new xfce4 install. So I'm afraid you will have to help me debugging this issue.

Can you run xwininfo -root -tree before running compton --config /dev/null, and paste the output here? Please also include compton's output.

@ChrisLahaye
Copy link
Author

Output of xwininfo -root -tree: tree.txt
Output of compton --config /dev/null: restack_win(0x03e00eea, 0x02e08277): Failed to found new above window. and then the screen becomes empty.

@yshui
Copy link
Owner

yshui commented Oct 29, 2018

A wild guess, but if you kill xfce4-panel (which will kill your panel) before starting compton, does it still happen?

Also what happens if you kill redshift before starting compton?

@ChrisLahaye
Copy link
Author

Same results with xfce4-panel and redshift killed.

@yshui
Copy link
Owner

yshui commented Oct 29, 2018

Hmmm. I am out of ideas.

So I enabled a bunch of debug outputs in the debug-30 branch, can you run it and paste the output here? It can potentially generate a lot of output, so you better redirect it to a file: <path>/compton >log 2>&1.

@ChrisLahaye
Copy link
Author

log.txt
As attachment the log. Thanks again

@yshui
Copy link
Owner

yshui commented Oct 30, 2018

@ChrisLahaye from the log file I can see compton did try to paint something, somehow nothing is painted on screen....

You said this happen on GLX as well, right? So if you are familiar with apitrace, could you use that to capture a trace of compton with the GLX backend? (It will capture all window content, so don't open too many windows to minimize the size of the capture).

@ChrisLahaye
Copy link
Author

compton-next.trace.log
compton-debug.trace.log

As attachment the traces. Did my best to minimize the size.

@yshui
Copy link
Owner

yshui commented Oct 30, 2018

Sorry, did you happen to capture compton's output when you captured these traces?

@yshui
Copy link
Owner

yshui commented Oct 30, 2018

If you are going to do the capture again, could you do the following things at the same time:

  • Run under apitrace and get the trace
  • --config /dev/null --backend glx
  • Build from debug-30 (it is updated with a few more commits)
  • Capture the outputs of compton

Thanks!

@ChrisLahaye
Copy link
Author

apitrace trace compton --config /dev/null --backend glx > output.log
output.txt
compton.trace.txt

Thanks again for your efforts

@yshui
Copy link
Owner

yshui commented Oct 31, 2018

No, thank you for sticking with me.

But sorry, I wasn't clear enough. You need to capture the output with >output.log 2>&1, otherwise you loss everything printed on stderr.

@ChrisLahaye
Copy link
Author

Oops

apitrace trace compton --config /dev/null --backend glx 2>&1 > output.log
output.txt
compton.trace.txt

@yshui
Copy link
Owner

yshui commented Oct 31, 2018

@ChrisLahaye Sorry, but the order of redirection is important[1]. It has to be >output.log 2>&1, not 2>&1 > output.log

[1]: https://unix.stackexchange.com/questions/37660/order-of-redirections

@ChrisLahaye
Copy link
Author

Ugh didn't know the difference, should have just followed the instructions 👍

apitrace trace compton --config /dev/null --backend glx >output.log 2>&1
compton.trace.txt
output.txt

@yshui yshui added the bug label Oct 31, 2018
@yshui
Copy link
Owner

yshui commented Oct 31, 2018

Hmm, so compton apparently decided none of your windows are worth painting...

I suspect maybe there's a big window that covers up the whole screen...

I will add more debug prints...

@ChrisLahaye
Copy link
Author

@yshui cool thanks, let me know when you have updated the branch

@yshui
Copy link
Owner

yshui commented Oct 31, 2018

I updated the branch. This time you don't need to run apitrace

@ChrisLahaye
Copy link
Author

compton --config /dev/null --backend glx >output.log.txt 2>&1
output.log.txt

@yshui
Copy link
Owner

yshui commented Nov 1, 2018

Ah, so all your windows are completely transparent somehow.

Now we just need to figure out why...

@yshui
Copy link
Owner

yshui commented Nov 1, 2018

I added print message to print out the opacity when they are updated. Can you try debug-30 again?

Also it has a slight chance of just fixing you problem.

@ChrisLahaye
Copy link
Author

ChrisLahaye commented Nov 1, 2018

output.log.txt

Thank you

@yshui
Copy link
Owner

yshui commented Nov 1, 2018

Hmm, do you have any idea why all your window is considered transparent. Can't seems to find a reason why compton would do that...

@ChrisLahaye
Copy link
Author

No idea, I generated the log and tried without any programs running. I will try later with another GTK theme, maybe the theme uses transparency?

@yshui
Copy link
Owner

yshui commented Nov 1, 2018

maybe the theme uses transparency?

I don't think that is the case. But you are encouraged to try.

This will be much easier if I can reproduce this bug, but now I guess I will have to add more debug prints.

I am going to implement proper logging and stuff so future bug reporters won't need to go through this again.

@ChrisLahaye
Copy link
Author

Checked if I used any transparency which was not the case and changing themes also didn't work.

@yshui
Copy link
Owner

yshui commented Nov 2, 2018

@ChrisLahaye I pumped the debug-30 branch with more debug messages. Please give it a run when you got time.

@ChrisLahaye
Copy link
Author

@yshui

compton --config /dev/null --backend glx >output.log.txt 2>&1
output.log.txt

@yshui
Copy link
Owner

yshui commented Nov 2, 2018

@ChrisLahaye Looks like your system has a non-working isnan() function. What libc do you use? Did you compile compton with -ffast-math or equivalent?

@yshui yshui added compiler compiler related problems (e.g. build failure for a specific version of compiler; miscompiles; etc.) and removed bug labels Nov 2, 2018
@yshui
Copy link
Owner

yshui commented Nov 2, 2018

You can either remove things like -ffast-math or -Ofast from your CFLAGS, or you can try the current head of next. That should fix you problem.

@ChrisLahaye
Copy link
Author

@yshui you are right, my compiler options enabled fast math, adding -fno-fast-math fixed it. How did you figure this out? Thanks a lot though I really appreciate your efforts to help me and the work you are doing.

@yshui
Copy link
Owner

yshui commented Nov 2, 2018

@ChrisLahaye So in the logs I see windows get opacity of nan even if I have !isnan guards in place. And that is usually related to -ffast-math.

@yshui yshui closed this as completed Nov 2, 2018
@yshui yshui added this to the v4 milestone Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler compiler related problems (e.g. build failure for a specific version of compiler; miscompiles; etc.)
Projects
None yet
Development

No branches or pull requests

2 participants