Jellyfin with GPU Transcoding in Proxmox! - GPU Passthrough

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi and on today's video we're going to cover off the wonderful art of PCI pass-through on proxmox to enable GPU pass through now the particular reason I'm doing this is for jellyfin and I'm going to be totally honest since the last time I've done this for my Plex server things have changed and if you follow a lot of the guys out there you're going to come unstuck so I will keep some of my troubles and failings in this video so that you don't make the same mistakes I did because it's actually a lot easier than I first thought so stay tuned okay so the first thing we're going to need to do is go into the shell you may see me do this across a couple of nodes that is just by Design because of the fact I'd already done this on some of them now what we need to do is update the grub now if you built yours in UEFI you will need to use a different command which I've stuck on the video just now because it's slightly different however if you've done this in proxmox in bias mode it's absolutely the way to go now that line above this one which mentions the Linux default quiet is realistically the one that we need to change so what I'm going to do instead of changing I'm just going to comment that out in a minute after I've pasted this in so again depending on whether you've got an Intel based or AMD based the two commands again are below but what I would strongly suggest is you add the PT in because that does improve performance a little bit once that's done and saved you'll notice I commented out the other line we just need to update the grub so I'll just paste that in and click enter this will take a bit of time because it is re building that grub configuration file and the image itself so there we go and that one's done now what we need to do as well if we're going to do video pass-through is to add in the vfio modules which we add into this modules in Etc and again it's just a simple copy and paste into there I use Nano you can use Vim if you're more comfortable with them that's totally up to you but just need to add those in there now the next step will be to add in or block list the drivers so that the proxmox host itself doesn't try to use this graphics card because that certainly wouldn't help us anyway shake or form you don't need to add all of these we will for at least Nvidia need to add the new viewer and the end video ones if obviously you've got a Radeon it's worth adding I mean I'm just going to add them now because in the future if I do decide to add anything else it's already there and to see what that those commands do we can just go into that comp file which we're just going to do now all it does is just adds a line into Blacklist them so I'm just going to show you that here quickly and as you can see they're there so if I exit out of that and then run the following command that would just update that as well and after this point we will need to do a reboot now this works for many things so obviously I've done an extra step here on the graphics card one thing you will need to note is that you will need to make sure in the Bios that you've set up the ability for it to use vtd and IO mmu there are guides out there again depending on your system it may vary but once this is complete we will then run a reboot so once we've rebooted and I have just changed nodes just so that you there's no confusion why I'm now on Quadro what I'm now looking at is to find some information from the host before we can then go on and do elements with the end virtual machine so the command I've got to run is to basically pull out the IDS or the pcie IDS for the device and Nvidia when I use my graphics card we'll definitely have two one is normally for the graphics card of the video itself the other will be for the audio device so let's run those commands so running the following command will give us a full list so this will include everything that has a individual ID and what I'll be looking for is my Nvidia ones which there are two listed as mentioned you've got the audio controller and the VGA part I'm going to copy that and stick that into Notepad now that is just to help because we are going to need that information later so let's keep that somewhere safe for now and what we're going to then need to do is run a couple more commands to pull out the rest of the information so once that's in what we'll do let's get ourselves in a position where we can run the additional commands down the bottom here and this is so that we can get the full IDs of both now I do make a couple of mistakes in here mainly around the dots as you can tell and like I said I did want to leave some of the crazy mistakes that I make because it's the sort of thing that I've seen people on forums pick up on and have challenges with it is a semicolon between the device IDs not double dots so let's just change that no that is definitely adult time date and there we go so that 10 de1c31 is the part I'm particularly interested in I will have to run the same command to get the audio device as well but at the moment we'll just capture that so that we've got both available to us so using the wonderful up key I can pull in the last command just change that to one and there we are so I will capture that as well like I said realistically I'm only interested in the 10d part but it's worth just capturing at this point anyway okay and the last thing that we need to do before we do a lot of the work itself on the gelophin or Ubuntu server is to physically pass through the device to that VM you can do it using the terminal however I'm quite used to doing it this way now and to be honest it kind of enables you to be a little bit more foolproof because you can double check what you're doing now it's worth noting that once you do this you will potentially well I've always found most of the time lose access to the console within proxmox because there's a bit of a mismatch with the drivers so what you're going to need to do is make sure you've got an option to ssh in now when we finally click add which we'll do just now you will notice that the device goes orange at that point we need to do a reboot of the VM so we'll stop so if you've been good and followed my previous guides where you've set up a guest agent on the Ubuntu Server you won't have too many challenges at this point because you'll be able to find the IP from proxbox to help ussh in but then again you should always know the IP address of your jellyfin server because you'd have set it up in a certain way anyway now what we're going to do like I mentioned is just do a stop and start of this device and that will initiate the graphics card so let's just run a stop a few seconds and then we'll restart the device now if we go on to console normally you'd expect to see Ubuntu Server booting up here but as I mentioned because I've added a new GPU this is where it gets confused so we're not going to worry too much about that you do need to bear in mind this is a challenge because VNC won't connect it will just sit there so you will need the IP address and an SSH tool I use Terror term but you can use putty Etc to make sure that you can connect onto the device so I'm just going to load up territown ready and then we'll carry on with the next steps shortly so there we are that's the first part done and if you're just now doing so with Windows you can pass through the device using the GUI everything's pretty happy you then just install the windows drivers and your you know you're going to set and play around with the settings if you're like me though and you've built this in Ubuntu which I certainly have my jelly fin there's a lot more we need to do so stay tuned and we'll cover off that part so one thing we do need to do now we're on to our Ubuntu device is to make sure we Blacklist that the viewer driver again because this is one of the things I found I had the biggest challenges with I followed a lot of guides on how to do this because it's been quite a while since I had my Plex server set up and there's many different ways to do it but this is the key thing is to make sure this device is blacklisted because if it isn't it will basically try to take over everything and you'll never get the Nvidia device working properly so works very similar to the way that we've done stuff before but obviously this one is a little bit more populated all I'm going to do is add that Blacklist nevue into here we will then have to do the update that we did previously on the proxbox host and then do a reboot so let's just save that one in once that's saved in we can just then run the update so let's just quickly run that update and we'll let that do its bit and it's probably a good point at this time to actually reboot the host just to make sure that's all applied successfully just take a little while to generate but um that's going to Blacklist that no viewer driver then we can actually get on with the rest of it and I will cut to the chase on what worked and then I'll probably add in the outtakes in a short while so this next part is going to show you exactly how to do it now and this is from versions 22.04 onwards this worked for me first time where some of the other methods using wget and trying to install one missing dependencies that cause challenges so I'll do this and then show you where I went wrong so let's cover off how to do it properly they might the other ways might work but I found this one worked simpler and easier for me so I'm just going to run the following command Ubuntu drivers devices and what it's done is found that my Nvidia card hasn't got a driver installed yet so what I'm going to do is I'm going to let this automatically do this for me because this method seems to work the best and the easiest it installs all of the dependencies that may be missing but let's just do it it's a sudo Ubuntu Driver's Auto install and off it goes and I'm going to speed this bit up because it does take a bit of time I did however make the horrible mistake which I'll show you at the end of thinking that this is all I needed to do and it would work fine I.E just basically running it and then running Nvidia SMI and everything would be hunky-dory and I'd see the graphics driver like with most things when you've installed a driver it's always worth rebooting and that's certainly what I needed to do so if I just run Nvidia SMI it will tell me that the device isn't available and it can't communicate with it so let's just pull that up now and as you can see it failed and at this point I was almost pulling my hair out but I realized that that's it just needed a reboot and again come on Andy you need to use Sulu so yeah we do a city reboot and everything should be golden so now we've rebooted the host I'm just going to pull that back up and in here and show you that my Nvidia driver is now working and that's a great thing so relieved I was pulling my bloody hair out for some time trying to get this to work mainly because some of the guys out there tell you to use wget to do it which I'm sure does work but there must be some misindependencies somewhere whether it's something to do with Nvidia or Ubuntu I'm not sure however this other method seemed to work first time for me so I would strongly recommend doing it this way in the future because it just seems to do it and I think if you then doing an update I'd assume you'd work the same way it just basically find any updates and run there now what I want to do is install this other package now what this package will do is give me access to kind of performance metrics on the device because when I'm transcoding I want to see how much of a load is applied to my graphics card but also it will kind of enable me to demonstrate that we can show how the transcodings worked now what I'm going to do is once this is done and installed I'll load this up and then pull my jelly fin over so I can turn on hardware transcoding and then I would deliberately pick two films one that I know will need transcoding into my web browser one that won't so you can show the difference so we'll just finally install this package and then we'll just run the package itself so we can see what I'm talking about and there we are that is the process of getting an Nvidia driver passed through to Ubuntu Server ready for jellyfin my God so moving over to jellyfin then we just pull this over just to make this fairly seamless for us I've opened it up in a window I'm just going to drag it over so that we can set up bits on so we need to go into the dashboard we need to make sure that you're logged in with an account that has access so if we go into dashboard and then into here transcoding I will be selecting a video NVC I'm not going to change anything at the moment I'm just going to kind of run it as it is I will probably play around with these settings at a later date and probably do a video on the best settings however at this point I'm just going to click save because I want to get this up and running and then what I'm going to so let's just pick on two films that I know will one will require transcoding the other knot so Too fasty Furious they should just play natively shouldn't need it so it should come through direct play so I won't have any challenges there and I can kind of prove that by looking at the playback information so let's just have a look in there and you can see that we do have direct play happening so we now need to pick something that I know will need transcoding and this certainly will such a great film as well so if you look instantly you can see that we've already got now some activity on the graphics card and it is transcoding so my God wasn't that painful I will now add the outtake on if you want to see what went wrong when I tried to do it the other way however if you just want to watch what worked that's all you need to see use the auto update version it works so much easier you won't have any challenges at all so if you like what I've done today hit the like And subscribe but that is how to pass through your Nvidia and mine was a Quadro P 2200 through a VM into proxbox and then into Ubuntu and transcoding videos for jellyfin cheers so you've stuck around to watch the outtake uh I've cut it down to one there was quite a few but this is what I did wrong by following another guide there's plenty of guides out there that will tell you to go and download the Nvidia Linux driver the latest one using wget and then to run it now the first time I did you'll see I got this error we've enabled to find the development tool CC in your path so there's obviously a dependency missing so what I decided to do was actually run it removing some of those no questions in UEI or UI none to see if I could get down to what was causing the problem not realizing it was staring me completely in the face so let's just let this run through and I mean the way you're doing it this way is you kind of get the prompts which helps and that kind of led me onto the path of hang on a minute maybe I'm using a slightly depreciated way of installing the Nvidia driver and when it smacked me straight in the face then I realized what a numpty I was so this part here kind of shows you what part of the challenge was so an insane an alternative method of installing Nvidia driver was detected this is usually a package provided by your distributor and you can see I got the same error so it's kind of telling me what's wrong and then I read above just here where it says that and I was like okay that's where I've been going wrong
Info
Channel: Express IT Tech Tips
Views: 8,046
Rating: undefined out of 5
Keywords: media server, emby, jellyfin media server, jellyfin, jellyfin server, jellyfin vs plex, plex media server, plex, diy media server, proxmox, proxmox gpu passthrough, proxmox pcie passthrough gpu, nvidia quadro, hardware acceleration, hardware transcoding jellyfin, p2200 quadro, films, jelly fin, home media server, plex server, ubuntu 22.04, proxmox tutorial, gpu passthrough proxmox, gpu passthrough ubuntu, gpu passthrough
Id: strVTmFVDpI
Channel Id: undefined
Length: 19min 48sec (1188 seconds)
Published: Wed Feb 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.