fix: Start Xvfb in server docker when GUI flag is used#873
Merged
tristpinsm merged 3 commits intomainfrom Apr 16, 2026
Merged
Conversation
Install Xvfb in the server Dockerfile and auto-start a virtual framebuffer in start_server.sh when -g/--gui is passed and no working display is found. Prevents the Qt/XCB crash on startup. Closes #871
Replace the fixed 2-second sleep with a poll loop that waits until FileWriter.FrameCount reaches FrameRxStats.FrameCnt. This eliminates the race condition where in-flight frames are lost when the FileWriter is closed before the pipeline fully drains.
Collaborator
|
I tested and I found that it was crashing trying to bind to display When I forward X and try to use the GUI it pops up but just lags and is unusable. I don't ever use the GUI however, so that may be a problem with my system. Maybe @swh76 can give it a try? |
Collaborator
|
actually it works if I forward with |
tristpinsm
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xvfbandx11-utilsin the server Dockerfilestart_server.shwhen-g/--guiis passed and no working display is foundContext
The rogue v6 update switched the GUI from
pyrogue.gui(which supported both Qt and PyDM backends) to exclusively usingpyrogue.pydm.runPyDM(). PyDM requires a working X display connection, and the server docker doesn't have one configured by default.The fix is defensive: if X11 forwarding is properly set up (e.g., via docker-compose mounting
/tmp/.X11-unix), it uses that. Otherwise, Xvfb provides a fallback virtual framebuffer so the server doesn't abort.Closes #871
Test plan
-gflag and no DISPLAY — should start Xvfb automatically instead of crashing-gflag and working X11 forwarding — should use existing display-gflag — no Xvfb started, no change in behavior