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
Screenshot doesnt work correctly when paint-on-overlay = true #204
Comments
|
While I can't offer any technical details, I can only confirm that I have a similar issue when paint on overlay is true with the fglrx drivers. However, my experience would be that the same screenshot would be completely black. |
Sounds somewhat like a driver issue, still. Thanks for the info! :-) |
Sorry it has taken a while to reply. I had forgotten about this issue, though it still exists. To answer your questions.. I could try your instructions to use xwd to capture the overlay window image, but I don't think theres much point. I agree it would most likely give me the correct image, but it is not practical to do this every time I need a screenshot (I assume the overlay window address ID changes between X sessions). Some random thoughts: Is there a way of forcing X to copy the overlay image to the root window when XGetImage() is called? How about adding rudimentary screenshot support to compton, when the user presses the PrntScrn key, use the loaded configuration to determine the best method of grabbing the screen image, if paint-on-overlay is on, then get it from the overlay window, otherwise get it from the root window. The various backends have even better methods of grabbing a screenshot. Thanks for your help. |
Another update: So this leads me to another interesting revelation, it looks as if the GLX backend is not actually painting onto the X11 overlay window. And its not painting onto the root window either. So what exactly is fglrx painting onto? Does it use some kind of OpenGL overlay window which runs in fullscreen on top of X11? I will have a look at the compton glx code, specifically where it paints to the overlay window, and see if I can debug the process to see where glx is painting to. |
And a final update: In the past, if you set However, it looks like modern versions of fglrx (all releases in the last two years) do not allow Xv as an overlay type. I get:
Looking in the aticonfig --help text, it shows:
If I manually put For more information regarding this specific screenshot problem, there is actually a relevant section in the Wikipedia article on OpenGL Overlays. So in summary, with modern fglrx versions, OpenGL Overlays cant be turned off, VideoOverlay (Xv overlays) cannot be turned on, and all available screenshot applications cannot capture images of OpenGL Overlay windows. Now I have a new plan. Im going to take my own advice, and implement a screenshot function into Compton itself. I think this is the reason the Compiz guys had an screenshot module/plugin which you could enable and configure to a key combination, they must have run into the same issues with OpenGL Overlay windows too. I will take a look at their code. I think I will either need to find some kind of GLX method which can dump out the contents of the OpenGL Overlay window, or set up an offscreen display and render a frame to that and save it. Either way, fun times ahead. |
- Add glx_take_screenshot() for taking a screenshot. With ImageMagick the output data could be viewed in this way: display -size [SCREEN-WIDTH]x[SCREEN-HEIGHT] -depth 8 -flip rgb:[PATH] (#204) - Add D-Bus command `opts_get string:paint_on_overlay_id` to get X Composite overlay window ID. (#204) - Code cleanup.
@flubba86: Sorry for the late reply. I got a lot of annoying things to deal with recently. Thanks for all your testing results, firstly! I'm not really sure about how the hardware overlay stuffs work, and unfortunately I don't have the time and device to look deeply into the issue right now. My advice is to switch to X Render backend when you take a screenshot, or the To assist you to with the screenshot taking feature, I wrote |
I'd like to add that this also happens on my system with the i915 driver (named I have seen both the 'black screen' and the 'several minutes in the past' behavior when screenshotting Firefox, Seamonkey, and also I have not tried it with the FFmpeg's Overall it's highly convoluted, but I just mention it in case it helps anyone else out. For any onlookers, my full script is here. I think it should work in bash, as well; I just prefer ksh93. |
After changing from opensource radeon drivers to the latest fglrx dirvers, I have found if I use a screen capture app to take a screen shot (any popular screen shot app) it gives me an image of the screen from several minutes in the past.
If I change my compton configuration to paint-on-overlay = false; then the screenshot app works correctly and gives me a current image of the contents of the screen.
Im guessing the screeshot apps are not capturing from the overlay buffer? If so, then why did it work correctly with the opensource radeon drivers with paint-on-overlay = true?
Is this a known issue, and is there a workaround?
At the moment, if I know I will need to take a screenshot, I simply restart compton with paint-on-overlay disabled, but after Im done I have to restart compton with paint-on-overlay re-enabled because the graphics performance with it disabled is terrible and I have lots of glitches.
The text was updated successfully, but these errors were encountered: