feat: support running without x11 on linux - #1624
Merged
Merged
Conversation
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.
Some of this is based on work done by nxtedition in their fork, but this preserves windows support and has been tweaked based on some testing.
The primary change here is to switch to using EGL to get the main opengl handle on linux.
SFML is still used for the screen consumer and diag, as well as for windows.
In my testing, this works fine when launching over ssh on:
And locally on:
CEF needed a bit of fiddling but also appears to work happily in this setup. When we detect no X11 session, we will now set CEF to use the 'headless' backend and the angle backend to 'vulkan'. This combination works with both gpu enabled and disabled in the same tests.
With this, how CEF is run should be no different to before unless running without an X server.
The full steps to get it working on a fresh ubuntu installation:
sudo apt update&&sudo apt upgradesudo apt install nvidia-driver-570-serversudo dpkg -i desktopvideo_14.4.1a4_amd64.debsudo dpkg -i casparcg-cef-131_131.4.1~g437feba-noble1_amd64.debandsudo apt install -fsudo dpkg -i casparcg-server-beta_2.5.0~no-x11-noble+c2e478a_amd64.debandsudo apt install -fsudo rebootto let the drivers loadThen it will launch at boot, with webgl and gpu acceleration in cef, and everything else behaving normally too.
My sample system unit (which is messy). Note that it doesn't exit cleanly, and hits the timeout so that has been set low