How should I go about setting up a container with it's own X server (not connected to my hosts X server), with full GPU acceleration?
by Sol33t303 from LinuxQuestions.org on (#5SX73)
So I'm currently in the middle of trying to setup a container that I can use for game streaming, i'd love to setup a Pi in the living room that can remotely stream some games to it from my Nvidia desktop.
Now why a container? Because I want a setup where somebody can get on the Pi in the living room and start streaming while i'm at my PC, without it interfering with what I'm doing at all or even noticing that it's happened. This is also my first time really working with containers so it will also be a bit of a learning project.
Now my problem is I can't seem to get any kind of X server working the way I want. So far I have tried:
- In the guest after installing I tried installing and using xvfb with Code:xvfb-run glxgears, it runs, but pretty suboptimally. It runs a bit shy of 2,000 FPS. Meanwhile however my host runs at over 10,000 FPS, so I belive xvfb is software rendered which isn't good enough.
- Tried using Xdummy https://github.com/Xpra-org/xpra/blo...sage/Xdummy.md as I read elsewhere that it could be hardware accelerated. Tried testing it out on my host with the following config https://pastebin.com/83KdyaeC based on this sample config with some stuff cut out https://github.com/Xpra-org/xpra/blo...xpra/xorg.conf using the following command Code:sudo Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./10.log -config /etc/xpra/xorg-dummy.conf :10 However it seems even on my host with glxgears it's performance is abysmal. 500 FPS, compared to xvfb's 2,000 which was already bad. So I assume running it in a container isn't going to magically make it faster.
-Next I tried simply running a second full xorg server and then connecting the container to it. I'd much rather the container start the X server as that way everything is neatly packed within the container, and I can shut the container down whenever and have everything clean it's self up without having to kill a second X server, but I figured i'd give it a try to see if it's a viable option. Turns out that option isn't a great one either, as at first it performs terribly like the xdummy one does, however it then gets full performance when I switch VTs to it and back. Not exactly the unobtrusive experience where I hardly even realize it's there I want. Also I have a feeling glxgears output isn't giving the full story as despite showing high FPS in it's output after switching out of it, my GPU utilisation is sitting at 0%, unlike when I run glxgears on my ususal x server at :0. Again, I assume trying to hook the :1 xorg server up to the container isn't going to make it any faster so I haven't tried. For this I am using this config https://pastebin.com/pdTvDHb7 and this command Code:sudo Xorg -listen unix -listen local -ac -config /etc/X11/xorg-Retroarch.conf :1So by now i'm pretty well out of ideas, does anybody else have any ideas or suggestions I could look into? Or can anybody spot any errors or misconfigurations in any of my config files?
Now why a container? Because I want a setup where somebody can get on the Pi in the living room and start streaming while i'm at my PC, without it interfering with what I'm doing at all or even noticing that it's happened. This is also my first time really working with containers so it will also be a bit of a learning project.
Now my problem is I can't seem to get any kind of X server working the way I want. So far I have tried:
- In the guest after installing I tried installing and using xvfb with Code:xvfb-run glxgears, it runs, but pretty suboptimally. It runs a bit shy of 2,000 FPS. Meanwhile however my host runs at over 10,000 FPS, so I belive xvfb is software rendered which isn't good enough.
- Tried using Xdummy https://github.com/Xpra-org/xpra/blo...sage/Xdummy.md as I read elsewhere that it could be hardware accelerated. Tried testing it out on my host with the following config https://pastebin.com/83KdyaeC based on this sample config with some stuff cut out https://github.com/Xpra-org/xpra/blo...xpra/xorg.conf using the following command Code:sudo Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./10.log -config /etc/xpra/xorg-dummy.conf :10 However it seems even on my host with glxgears it's performance is abysmal. 500 FPS, compared to xvfb's 2,000 which was already bad. So I assume running it in a container isn't going to magically make it faster.
-Next I tried simply running a second full xorg server and then connecting the container to it. I'd much rather the container start the X server as that way everything is neatly packed within the container, and I can shut the container down whenever and have everything clean it's self up without having to kill a second X server, but I figured i'd give it a try to see if it's a viable option. Turns out that option isn't a great one either, as at first it performs terribly like the xdummy one does, however it then gets full performance when I switch VTs to it and back. Not exactly the unobtrusive experience where I hardly even realize it's there I want. Also I have a feeling glxgears output isn't giving the full story as despite showing high FPS in it's output after switching out of it, my GPU utilisation is sitting at 0%, unlike when I run glxgears on my ususal x server at :0. Again, I assume trying to hook the :1 xorg server up to the container isn't going to make it any faster so I haven't tried. For this I am using this config https://pastebin.com/pdTvDHb7 and this command Code:sudo Xorg -listen unix -listen local -ac -config /etc/X11/xorg-Retroarch.conf :1So by now i'm pretty well out of ideas, does anybody else have any ideas or suggestions I could look into? Or can anybody spot any errors or misconfigurations in any of my config files?