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

Getting a glimpse of the headless-gl rendering activities happening on Xvfb through xwud #226

Open
lanceschi opened this issue Jan 12, 2022 · 2 comments
Labels

Comments

@lanceschi
Copy link

lanceschi commented Jan 12, 2022

Hello,

and thanks 💯 for the awesome lib!

Is is possible to catch a glimpse of the headless-gl rendering activities happening on the Xvfb virtual frame buffer?

I'm launching Xvfb this way (script extract for simplicity sake):

#!/bin/sh

DISPLAY=${DISPLAY:-:105}
RESOLUTION=${RESOLUTION:-800x768x24}

nohup Xvfb $DISPLAY \
  -screen 0 $RESOLUTION -ac -reset \
  -pixdepths 3 27 \
  -fbdir ./out >/dev/null 2>&1 &

and I'm picking out correctly the output video feed with xwud:

xwud -in out/Xvfb_screen0 -noclick

The only issue is that the video feed remains pitch black even during headless-gl rendering activities. Here's a screenshot:

xwud-black-2022-01-12 11-06-48

The xwud video feed capture is working since if I start Xvfb with the -retro flag:

#!/bin/sh

DISPLAY=${DISPLAY:-:105}
RESOLUTION=${RESOLUTION:-800x768x24}

nohup Xvfb $DISPLAY \
  -screen 0 $RESOLUTION -ac -reset \
  -pixdepths 3 27 -retro \
  -fbdir ./out >/dev/null 2>&1 &

The video feed changes accordingly:
xwud-2022-01-12 11-11-28

Any help appreciated. Thanks!

@lanceschi lanceschi changed the title Getting a glimpse of the headless-gl rendering activities happening on the Xvfb through xwud Getting a glimpse of the headless-gl rendering activities happening on Xvfb through xwud Jan 12, 2022
@dhritzkiv
Copy link
Member

Hi @lanceschi. Thanks for the question – it taught me about a few tools / commands that I didn't know about. That being said, your guess is as good as mine as to what may not be working here.

A few questions:

  • are you able to produce a visual output with headless-gl and Xvfb (without xwud).
    • does the gl context contain pixel data when inspecting with gl.readPixels
    • can you inspect the frame buffer in any other means?
  • are you setting preserveDrawingBuffer to true ? what about trying false?
  • does calling gl.flush at the end of each expected step help?
  • does calling gl.getError after certain draw steps help or result?
  • can you post some example code?
  • can you post the output of glxinfo? (this should also be run in the context of Xfvb)

@lanceschi
Copy link
Author

lanceschi commented Jan 14, 2022

Hello @dhritzkiv,

and thanks for the prompt answer!

are you able to produce a visual output with headless-gl and Xvfb (without xwud)

Yes, it operates successfully and as expected with gl.readPixels

can you inspect the frame buffer in any other means?

Yes, with the help of x11vnc and VNC Viewer. Same results as with xwud though

are you setting preserveDrawingBuffer to true ? what about trying false?

No noticeable difference

does calling gl.flush at the end of each expected step help?

Tried but it didn't influence the rendering

can you post the output of glxinfo? (this should also be run in the context of Xfvb)

Sure, glxinfo issued on Xvfb: glxinfo.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants