View previous topic :: View next topic |
Author |
Message |
xtx Tux's lil' helper
Joined: 27 Dec 2011 Posts: 129
|
Posted: Tue Mar 15, 2016 5:33 pm Post subject: Steam in systemd-nspawn container |
|
|
Anybody use Steam in a systemd-nspawn container?
I was annoyed with how many packages were re-compiled as 32bit when I installed Steam, so I decided to try to put this in a container. I played with this for hours yesterday and it took me every second of it to finally get it to work. But I have a feeling I didn't do this correctly, and I can't find a guide anywhere of somebody doing this on gentoo. A couple things that I did (which I kind of think defeat the purpose/benefits of using a container) are installing nvidia-drivers in the container, which then required me to have a working kernel .config, so I compiled a kernel in the container as well.
Since I eventually got this to work I'll post the steps of what I did in case it helps somebody else, but I would love to hear advice as to if I did this correctly or could have saved myself some hassle. I think maybe just some extra --bind mounts or something.
1. Create ~/steamcontainer
2. Get the current stage3 amd64 tar.bz2 files and unpack them in ~/steamcontainer
3. sudo systemd-nspawn -D ~/steamcontainer --bind /usr/portage
4. Configure /etc/portage/make.conf
5. Ran emerge -uDavN @world to pull in my configured use flags and to also install systemd so that I have a working init system in the container
6. Install alsa-utils
7. Exit the container
8. On the host, emerge xhost and run "xhost +local:"
9. sudo systemd-nspawn -b -D ~/steamcontainer --bind /usr/portage --bind /dev/snd (the last bind mount is needed for alsa, that took me forever to figure out)
10. Get a working .config file for your kernel (copy it from the host machine if you want) and install your drivers (in my case nvidia-drivers)
11. run "export DISPLAY=:0"
12. Followed this guide: https://wiki.gentoo.org/wiki/Steam to create the steam set, use flags, running emerge @steam, fetching and extracting the steam installer, and running the steam installer
13. Launched steam with this script:
Code: | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib32/opengl/nvidia/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib32/opengl/$(eselect opengl show)/lib"
exec ~/.local/share/Steam/steam.sh "$@" |
After doing all of that steam launches just fine and the performance seems to be the same as before. But what could I do differently? Do I really need to install nvidia-drivers in the container or can I just bind mount a folder for that? If I can avoid having to emerge nvidia-drivers then I think I can avoid having to maintain a kernel in the container.
**edit** after thinking about this more... would bind mounting /usr/lib32/opengl resolve the issue? maybe then i wouldn't need to install nvidia drivers in the container? i'll try this when i get home and post results. |
|
Back to top |
|
|
xyonofcalhoun n00b
Joined: 16 May 2016 Posts: 3
|
Posted: Wed Dec 28, 2016 8:56 pm Post subject: |
|
|
Following this myself, it occurs to me to be more straightfoward to use the i686 stage3 tarball than the amd64 one, so as to avoid having to have the multilib faff at all.
Did you get anywhere with the bind mount on /usr/lib32/opengl? I imagine that won't work if your host is pure64 - you'd need a multilib nvidia-driver in the host, or one in the container - or a 32-bit driver in the container, in any event. _________________ All questions find answers if you wait long enough. |
|
Back to top |
|
|
xyonofcalhoun n00b
Joined: 16 May 2016 Posts: 3
|
Posted: Wed Dec 28, 2016 11:35 pm Post subject: |
|
|
I answered my own non-question about why you'd use the 64-bit base for this; 64-bit kernel, of course. Never mind. _________________ All questions find answers if you wait long enough. |
|
Back to top |
|
|
rh n00b
Joined: 19 Sep 2006 Posts: 58
|
Posted: Fri Dec 30, 2016 9:11 am Post subject: |
|
|
Another reason to use 64-bit is that in December update steam dropped support for 32-bit systems. At the moment everything but the steamwebhelper should still work.
You likely will sooner or later run to dbus issue with some games or home streaming.
https://github.com/ValveSoftware/steam-for-linux/issues/4444
Workaround is to run steam with
Code: | exec dbus-run-session ~/.local/share/Steam/steam.sh "$@" |
|
|
Back to top |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Sat Dec 31, 2016 9:04 am Post subject: |
|
|
I " debugged " yesterday steam.
Results:
steam client from steam overlay renames old binaries and keep them on the disc. wtf.
it is safe to remove the folder named XXXXXX.old
most stuff is downloaded with ubuntu prefix and 32bit. most stuff is 32bit
i do not belive the quote, steam is 64bit.
definitely not.
when you browse the /home/user/.local/ steam subfolder you see quite the full gtk2? gnome? 32bit ubuntu stuff with everything from /usr and such
Code: | ERROR: ld.so: object '/home/roman/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
|
one of many examples, steam uses 32bit.
also networkmanager is not found.
they use outdated libsdl2, which also the symlink is missing and other issues
--
steam basically downloads both 32bit and 64bit stuff, but just uses hole 32 bit binaries which are downloaded ~800mb wasted!
--
since a few days i have sound issues in my game when i play for a few matches.
Code: | CHIDDeviceListSDL(): Couldn't load libSDL2-2.0.so.0, not enumerating devices
|
Code: | ** (steam:24650): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files
|
No i dont run gnome crap or systemd crap
Code: | sh: lspci: command not found
|
No i don*t run steam with privleges, just ordinary user.
Code: | ExecCommandLine: ""/home/roman/.local/share/Steam/ubuntu12_32/steam" "
|
I am running 32bit on a amd64, 64 bit OS
Code: | System startup time: 13,70 seconds
|
definitely a lie, takes sometimes 3 min on a SSD, because something is checked. libreoffice loads in felt like 1-2 seconds. basically instantly. libreoffice is a very big app.
Code: | Running Steam on gentoo 64-bit |
oh really? i thought you run it in 32bit mode?
Code: | Running Steam on gentoo 64-bit
STEAM_RUNTIME has been set by the user to: /home/roman/.local/share/Steam/ubuntu12_32/steam-runtime
ExecCommandLine: "/home/roman/.local/share/Steam/ubuntu12_32/steam steam://open/driverhelperready"
ExecSteamURL: "steam://open/driverhelperready"
|
stupid devs of STEAM. uses 32bit directory but downloads 64bit also
--
Sidenote. Steam self updates itself when its run, this is from just now! no 64bit support at all |
|
Back to top |
|
|
xyonofcalhoun n00b
Joined: 16 May 2016 Posts: 3
|
Posted: Fri Jan 13, 2017 4:45 pm Post subject: |
|
|
rh wrote: | Another reason to use 64-bit is that in December update steam dropped support for 32-bit systems. At the moment everything but the steamwebhelper should still work.
You likely will sooner or later run to dbus issue with some games or home streaming.
https://github.com/ValveSoftware/steam-for-linux/issues/4444
Workaround is to run steam with
Code: | exec dbus-run-session ~/.local/share/Steam/steam.sh "$@" |
|
I'm a little confused by your assertion here. Steam have dropped 32-bit support? Then surely they are putting out a build for x86_64, making this approach to resolve the multilib faff completely unnecessary? _________________ All questions find answers if you wait long enough. |
|
Back to top |
|
|
|