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

gpu driver getting set to llvmpipe #549

Open
heeeeeeeeeeh opened this issue Dec 14, 2024 · 4 comments
Open

gpu driver getting set to llvmpipe #549

heeeeeeeeeeh opened this issue Dec 14, 2024 · 4 comments

Comments

@heeeeeeeeeeh
Copy link

heeeeeeeeeeh commented Dec 14, 2024

I ran xdocker like this sudo x11docker --user=RETAIN --desktop --gpu steam, but when I run steam it crashes with error
image
restart with GPU acceleration turned off make me think this has something to do with the driver being llvmpipe

mesa packages installed in container:
241214_10h42m30s_screenshot

glxinfo -b in container:
image

glxinfo -b in host:
image

dockerfile for steam:
Dockerfile.txt

@heeeeeeeeeeh heeeeeeeeeeh changed the title gpu driver geting set to llvmpipe gpu driver getting set to llvmpipe Dec 14, 2024
@echuber2
Copy link
Contributor

I haven't gotten GPU passthrough to work in x11docker myself but you could try running steam with the -no-cef-sandbox flag to see if it helps. Steam's Chromium layer needs some kernel privileges to do sandboxing and that can cause other difficulties.

@heeeeeeeeeeh
Copy link
Author

Tried it but I got the same error window. Can you pass -no-cef-sandbox on the flatpak version of steam?

@echuber2
Copy link
Contributor

Sorry, I don't know, and it may be unrelated. I'd recommend experimenting with glxgears or something else first to see if hardware acceleration works at all. Steam for Linux does a lot of stuff with containers, it seems, even for native Linux games, and some of that might cause complications. Flatpak also does some kind of sandboxing, I think. Plus, the image you're trying to use seems to be based on Alpine, so probably using musl instead of glibc or something. Maybe experiment with a debian or ubuntu-based image instead to start with. You can probably run the Steam client from a terminal in x11docker without having a full desktop environment running in x11docker. Another thing to consider is, if you can run Steam itself without hardware acceleration, you may still be able to get games to launch with acceleration using game launch arguments (depending on your system). I don't think I can give more advice than this since I haven't messed with it much myself.

@echuber2
Copy link
Contributor

echuber2 commented Dec 18, 2024

Well, it may not be ideal for security, but it looks like something like this works (using rootful Docker on the host):

sudo ./x11docker --gpu --sudouser --hostdisplay --pulseaudio --network --clipboard=yes --ipc=host --home='/some/local/path' -- --privileged -- x11docker-your-image-name-here /usr/bin/xterm -vb

(And then run steam from the terminal.)

Not all of this is probably necessary. It looks like Steam wants to use flatpak bubblewrap sandboxing with user namespaces no matter what now, and I couldn't find an easy way to enable that other than --privileged. The combo of --gpu --hostdisplay --ipc=host seems to work for GPU though.

Depending on your use case, you may want to just dual boot another Linux if you worry about game binaries being malicious, or just install Steam normally on your host and then run all your games in Proton, which may benefit a little from running everything in containers anyway.

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

No branches or pull requests

2 participants