Home server question: How hard is it to set up an Nvidia GPU on a Linux machine with no display server? reddit / selfhosted ---------------------------------------------------------------------- sskg · 2023-11-23 02:51 Okay, so I have an old gaming rig (4th gen i7, GTX 1070ti) that I want to turn into a home server. I'd like to use the GPU only for specific tasks, like encoding when watching stuff via Jellyfin. What would be easier? * Install Fedora or Rocky Linux with the normal GUI, install and configure the Nvidia drivers with akmod-nvidia, then just remove X/Wayland from the startup process? * Install either distro sans GUI, and install the nvidia drivers? Also, does akmod-nvidia work for systems with no display server? So yeah. Any Linux people out there with nvidia cards and purely CLI servers out there? I've got a fair bit of experience with Linux, but I've just never done this before. And Google keeps giving me results about troubleshooting black screens after installing the drivers. ---------------------------------------------------------------------- leggyybtw · 2023-11-23 03:29 Nothing against fedora but I did not have a good experiente with it, specially akmod-nvidia drivers ---------------------------------------------------------------------- sskg · 2023-11-23 03:38 Fair enough. Do you know how to configure Nvidia GPU drivers sans display server on any other distro? ---------------------------------------------------------------------- mrpink57 · 2023-11-23 04:05 I have on ubuntu server and now debian 12. [https://wiki.debian.org/NvidiaGraphicsDrivers#nvidia- detect](https://wiki.debian.org/NvidiaGraphicsDrivers#nvidia-detect) All you need to do is run `nvidia-detect` but to make sure you do not install gui services just run it like this: [https://www.reddit.com/r /debian/comments/17vdj3c/comment/k9cz82j/?context=3](https://www.reddi t.com/r/debian/comments/17vdj3c/comment/k9cz82j/?context=3) . I personally then use nvidia-smi in a docker container for services like jellyfin per linuxserver. Just follow this guide: [https://docs.nvidia.com/datacenter/cloud-native/container- toolkit/latest/install- guide.html](https://docs.nvidia.com/datacenter/cloud-native/container- toolkit/latest/install-guide.html) then after run this: [https://docs.nvidia.com/datacenter/cloud-native/container- toolkit/latest/sample- workload.html](https://docs.nvidia.com/datacenter/cloud- native/container-toolkit/latest/sample-workload.html) Then all you need to do is set `runtime: nvidia` and `NVIDIA_VISIBLE_DEVICES=all` ---------------------------------------------------------------------- sskg · 2023-11-23 06:03 Thank you! ---------------------------------------------------------------------- Still-Snow-3743 · 2023-11-23 07:09 Last I tried this, the Nvidia cli I stalker was easy peasy for my 1050ti. However, I haven't took a look at jellyfin, but the Intel quicksync encoder on the Intel chip on my home server did the same encoding tasks and was far less temperamental with plex than Nvidia was. Do you really need the GPU? If it's just for video encoding I feel like you could skip it. If it's for more esoteric stuff like running LLM then of course it's a requirement. ---------------------------------------------------------------------- ssnover95x · 2023-11-23 07:27 I would just mention that the most common deployment similar to this is robots running Ubuntu server with an NVIDIA GPU so that's likely the ecosystem you'll get the best support with. It can be a complete crapshoot depending not just on your OS choice and driver packages, but also random things like UEFI actually emulating BIOS firmware which doesn't have enough addressable memory to load the driver during boot which causes crashes prior to grub if and only if there's a display plugged in (this actually happened to me). On consumer hardware you *should* be fine though. ---------------------------------------------------------------------- MarshallStack666 · 2023-11-23 11:06 A decade ago, I built a bunch of Scrypt GPU miners to mine Litecoin and a bunch of other shitcoins. They had up to 8 video cards each and ran some version of Debian. (the installer was bundled with everything needed and in a disk image format), As I recall, it had a GUI running that you could use for setup, but afterwards, nothing cared if it booted without any monitors plugged in. You can just let the gpu stuff run. It might even be useful for some video server software dependencies. I know for a fact that you can't run off-the-shelf Mplayer in a CLI environment unless you compile it specifically with no GUI support. The install included drivers for all the current AMD cards, which worked about twice as fast for crypto than Nvidia cards. I think it also had Nvidia drivers included but it recommended against using them, so I don't know how well those worked. You might try starting out with a modern version of the installer from somewhere and then adding whatever packages you need for your own projects. A decade ago, it didn't mine by default, so no worries there. There was a ton of configuration that had to be done first. There might also be some kind of scientific package out there somewhere designed around GPU computation that has all the components included. Try poking around SourceForge and GitHub searching for "gpu miner" ---------------------------------------------------------------------- sskg · 2023-11-23 11:09 Not planning to mine anything, but that's still useful info. Thanks! ---------------------------------------------------------------------- Lamber414 · 2023-11-23 15:18 Pretty easy on Debian, Ubuntu, rhel and it's derivatives. ---------------------------------------------------------------------- mavour · 2023-11-23 15:45 PolloLoco vgpu guide will help you ---------------------------------------------------------------------- sskg · 2023-11-23 20:58 Thanks! ---------------------------------------------------------------------- jmadden912 · 2023-11-23 21:03 Why not use proxmox? Then passthrough the gpu to distro of your choice? I have 2x headless ubuntu set ups with gpu's passed through no problem. One for plex/jellyfin, one for cameras ---------------------------------------------------------------------- sskg · 2023-11-23 21:09 This rig isn't really built for virtualization. In fact, I don't think I can even enable KVM in the BIOS. A regular OS and maybe some containers will have to do. My only real question is how to get the Nvidia drivers installed sans display server. ---------------------------------------------------------------------- jmadden912 · 2023-11-23 21:11 Pretty sure they're installed by default. At least in ubuntu. https://ubuntu.com/server/docs/nvidia-drivers-installation ---------------------------------------------------------------------- jmadden912 · 2023-11-23 21:13 More good info in the jellyfin docs. https://jellyfin.org/docs/general/administration/hardware- acceleration/nvidia/ ---------------------------------------------------------------------- sskg · 2023-11-23 21:13 Thanks. ---------------------------------------------------------------------- DIYSRE · 2023-11-23 22:20 I run Debian and Arch in my deployments, with Alpine for containers. I've never really thought about installing GPU drivers, just installed them. I'm a little out of touch because I've been using quick sync on an 8700k due to my PMS being in Kubernetes and me not being bothered to figure out how to give it access to the GPU. Debian documentation makes no mention of requiring a display server, although you might find some related packages get installed. It won't install a display manager or desktop environment though: [https://wiki .debian.org/NvidiaGraphicsDrivers#NVIDIA\_Proprietary\_Driver](https:/ /wiki.debian.org/NvidiaGraphicsDrivers#NVIDIA_Proprietary_Driver) Similarly, Arch has some documentation on the installation. IDK how much would be portable to whatever OS you choose: [https://wiki.archli nux.org/title/NVIDIA](https://wiki.archlinux.org/title/NVIDIA) You could follow the Fedora docs and omit the display manager configurations/packages: [https://docs.fedoraproject.org/en-US/quick- docs/set-nvidia-as-primary-gpu-on-optimus-based- laptops/](https://docs.fedoraproject.org/en-US/quick-docs/set-nvidia- as-primary-gpu-on-optimus-based-laptops/) Rocky is a RHEL apparently so the Fedora docs would maybe work for it, but I'm not a redhat guy on principle anymore. ---------------------------------------------------------------------- sskg · 2023-11-23 22:47 Oh, as someone who has worked a little with the Rocky team on community projects, I understand not liking Red Hat very much. I just kinda fell in love with the architecture and general concepts behind RHEL-based distros, so I'm having trouble letting that go. I don't like Ubuntu, but would be willing to try Debian, Arch, or... Hell, I've used Alpine for containers a lot. Might be time to give it a go on the old hard drive. ---------------------------------------------------------------------- DIYSRE · 2023-11-23 22:55 I've had no exposure with the Rocky team or what they have built. I'm sure it's fantastic. I am just personally very against RedHat these days, so I've tried to distance myself even at work. Debian was my savior for the problems that I had with CentOS. I wouldn't touch Ubuntu either so I gave the 'scary' Debian a shot and it has been good enough for me to convert all my machines over and switch to it for our standard deployment at work.