I plugged the AMD Radeon RX 6700 XT into a Raspberry Pi

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Jeff Geerling is currently working on AMD GPU (Testing a 6700XT) support for the Raspberry Pi. Mainly for the potential use of compute acceleration. Some progress has been made but it doesn't currently work. Hard to say what the future will bring at this point but it might eventually be possible. Maybe on the next Raspberry Pi or other similar ARM based single board computers running Linux based operating systems. I thought it was an interesting project and maybe others will as well.

👍︎︎ 126 👤︎︎ u/MechanizedConstruct 📅︎︎ Sep 17 2021 🗫︎ replies

THIS is what I like to see on this subreddit

👍︎︎ 35 👤︎︎ u/holigay123 📅︎︎ Sep 17 2021 🗫︎ replies

He means, "I plugged a Raspberry Pi onto a 6700XT"?

👍︎︎ 37 👤︎︎ u/arunbupathy 📅︎︎ Sep 17 2021 🗫︎ replies

Never did I think I would need to know if a gpu could be plugged into a Rasberry Pi

👍︎︎ 9 👤︎︎ u/MajorJerk77 📅︎︎ Sep 17 2021 🗫︎ replies

the biggest bottleneck ever

👍︎︎ 55 👤︎︎ u/ItDoesntSeemToBeWrkn 📅︎︎ Sep 17 2021 🗫︎ replies

nice video! i am going to watch this as i eat dinner.

👍︎︎ 5 👤︎︎ u/rockerbox 📅︎︎ Sep 17 2021 🗫︎ replies

This guy looks like a Steve Buscemi and Tom Green hybrid

👍︎︎ 17 👤︎︎ u/Snoo_52037 📅︎︎ Sep 17 2021 🗫︎ replies

"...ans it still didn't work... yet"

👍︎︎ 4 👤︎︎ u/cloud_t 📅︎︎ Sep 17 2021 🗫︎ replies

It reminds me of the meme "look at me, I'm the motherboard now"

👍︎︎ 3 👤︎︎ u/O3JSycdfEVY36lvWuzjb 📅︎︎ Sep 17 2021 🗫︎ replies
Captions
the raspberry pi compute module 4 has a respectable little gpu its built-in mali gpu core can push out 4k resolution over hdmi at 60 hertz well under ideal conditions if you're not pushing it much but i had a thought what if i wanted to run crysis on my raspberry pi at 8k and 60 hertz well that's why i bought this this is an amd radeon rx 6700xt and it just came out a few months ago and if there's any computing part that's been harder to get than a raspberry pi compute model for it's graphics cards like this one when i mentioned i got this card someone asked how much did it cost [Music] well at least i still have a shirt on my back but i have to justify the purchase so let's plug this card into a raspberry pi and see what happens so first we need to unbox the card um i'll be honest i haven't bought a new graphics card since 99 2000 i don't remember whenever the the rage pro 128 was the latest thing so this is kind of a new thing opening a new box and having to cut the seals on it usually i buy things used so this is definitely a new experience that's pretty spiffy whoa things are jumping out at me okay so they don't include a user manual anymore that's fine because i don't read it anyways all right so here is the card and it is very big that's for sure it's a pretty hefty card and if you don't have a big pc case for it it's a little bit unwieldy i know i watched a gamer's nexus video on a tear down and this back plate doesn't actually connect anything with a heat sink so i'm not going to do a tear down on the card or anything go check out that video if you want to find that but this is the radeon 6700 xt i'm gonna take off this little shield and uh let's look at some of the specs for it i know it's not the top tier card but it's it's the latest generation of amd's graphics cards it has 40 compute units that's the thing that i'm most interested a lot of people ask why would you care about something like this on a raspberry pi and there's the first obvious answers people like mining not bitcoin yeah but whatever whatever kind of cryptocurrencies some people want to mine that and the cheaper the computer doesn't matter they just need a buy one slot to get the the cryptocurrency to mine on the gpu for me i'm more interested in things like ai and machine learning you can use a card like this and have it run compute basically extra compute power for things like machine vision and processing different data sets and things like that and also now with proton on linux you can actually game on these cards too so if you could get a raspberry pi super cheap and then somehow get a gpu maybe not this one this is probably overkill for a raspberry pi but if you could get a gpu and get it running on the pi you could run a lot of games that used to be windows only on a raspberry pi could i run skyrim i don't know it also has 12 gigabytes of memory so i don't know if that's going to be a good thing or a bad thing i i know that in the past with the first gpus i was testing they they had a gig or two gigs of memory and the mapping in the bar space on the pi wasn't working that well so we're gonna see if if this thing will even map correctly and if it does then we can see if the driver will work but i'm not super optimistic but the first step is getting it unboxed and we've been successful there and it looks nice that's for sure a lot better than the little m.2 vga card here now you can see that for a size comparison or you can even see the the compute module four if we can ever get this working somebody could build a backplane for the cm4 that maybe could be integrated directly into the back plate and you could have your computer and gpu all in a gpu before i plug it in i have to clear up a few things the regular old model b which is what most people think of when you say raspberry pi doesn't have a pci express slot so you can't just go plugging random cards into it in the pi 400 well no space there either but this has a secret power instead of built-in usb 3.0 like on the pi 4 it has an exposed pci express lane look it's right there on the official i o board but we have some problems some major problems as my wife and i like to tell our youngest child this ain't my first rodeo first of all the buy one slot here is closed so you can't just go plugging in a giant by 16 graphics card it won't fit i could cut the slot but in my case just because it gets a bit unwieldy i'm going to use a pci express riser so i can plug the by 16 card into the by one slot second power the gpu needs 230 watts and it has these two power connectors to get extra power since pci express slots can only put through up to 75 watts so my normal way of powering the pi using this little 12-volt barrel plug adapter won't work third drivers if you've seen my past videos on gpus on the pi you might have noticed something every single card i've tested has locked up after i compiled a driver for it every everyone heck last video i even tried this little guy an m.2 vga video card it only has 16 megabytes that's right megabytes of vram and even it locked up the pi so yeah three big problems the slot power and drivers let's see how far we get all right so the first problem is that we need to be able to physically plug this card with its gargantuan by 16 connector into the by one slot and i could just cut this this slot here the back side of it i actually have a whole video on doing that and i'll link to that in the description but since this card is so large and kind of heavy it wouldn't be great to just stick it on top of the board it would probably fall out of the slot just by gravity so i have this by one to buy 16 adapter which i can just plug into the pi and plug into the card but that leads us to the second problem which is power this slot can only supply up to 75 watts of power to the card and the card is rated as using 230 watts now if we can't get it actually working it probably won't use that much power but it does have extra power connectors on the top these pci express power connectors there's an eight pin and a six pin so i have this redragon r gps 700 watt power supply it's not the best power supply in the world again not sponsored this stuff all costs money so you know making these videos especially when you're not sponsored and these products are not free uh costs a bit of money so if you like what you see or if i'm helping you out with some of this stuff doing it all in the open posting everything on github please consider supporting the channel on patreon or github there are links in the description for that but anyways this isn't the best power supply in the world but it should supply enough power and the graphics card is going to use 20 times more power than the pi itself i think the pi i'll use 5 or 10 watts so i have this this power supply i'm going to plug it in over here so it has power and then i also have this jumper if you use a power supply a pc power supply typically your pc has a motherboard that has a power button the raspberry pi does not have a 24 pin power supply connector and it doesn't have a power button so someday i hope to have a raspberry pi pc desktop with a motherboard basically but until that time i have to use this this is my poor man's little switch they have better versions of these but this is one i hacked together in another video anyway so there's our power supply and we want it to power this card so the power supply is fully modular which makes it easier for me to work with on my desk and it has this cable which goes uh from an eight pin to an eight pin and six pin connector so that i can power this card some people use two cables one for the six pin one for the eight pin that's nice for spreading out the load over more wires so you have less less wattage over one particular wire but it's not really necessary in this case especially since i don't think that i will be using this card to its fullest potential so i won't need all that power so i'll plug the card's power in all right got those two connectors in and then the next step is to power the pi in one of my earlier videos i powered the pi separately from the graphics card and that's not a great idea to have two power supplies powering different parts your system unless you do special things like sharing the ground plane between them and so you could do that but in my case i'm just going to power everything off this power supply so i'm going to use this molex cable and i'll plug it into one of the six pins six pin slots on the power supply and then i'm going to plug in this adapter that goes from molex to floppy connector so i'm going to plug this in here and plug the other end into the raspberry pi to give it power and of course this pin is coming out so we need to get you back in there and then i'm also going to plug in ethernet so i can log into the pi remotely from my computer i'm going to plug the hdmi into the pi directly because until we have a driver running the card is probably not going to output anything i'm going to try to turn this on and see what happens the last thing that we'll need to do is get a driver working for the card but it could be interesting just to see if it explodes when i turn it on i know i wouldn't like that for my pocketbook but it would make for good video so let's see what happens here so far so good nothing's blown up yet so it looks like the pipe booted up now if i want to use the pie i actually need a keyboard and mouse luckily i have one but something else to note on the compute module unlike other pies if you want to use the usb ports you actually have to enable them in your boot config file so i have a blog post about that i'll link to in the description but if you do want to use these usb 2.0 ports that are built in you have to do that before you are able to actually use the keyboard and mouse so the first thing i'm going to do here is i'm going to see if the pi can actually see that card so i'm going to run sudo lspci-vvvvvvvvv and i'll make this full screen and it looks like it's seeing something here so it sees sees an advanced micro device audio device so that's audio over hdmi let's see what else it's seeing a vga compatible controller so that's the video card and let's see the amd device again so it looks like it's seeing it now if i look closely there's no driver loaded so there is no driver built into raspberry pi os for it and that's why that's what i thought would happen so that's not a surprise i'm also going to go to d message and look at the pci bus output and i'm going to look in here and make sure that all the bar memory was assigned correctly and it looks like all the regular memory assignments are good so far there's no space for i o but that's okay because we don't need the i o bar space for the arm driver so it looks like all the bar space was assigned correctly and you can also see some of that output in the ls pci output so the hard part is that we need to get a driver working for it looks like hardware wise everything's working but the driver is going to be important if we actually want the card to be able to do anything like be able to process stuff or be able to run games or anything like that and just to show you without a driver if i unplug the hdmi on the pi and plug it into the card there's no output because the the card has no driver so the pi can't even use it so that's our next challenge we need to install drivers for the cart and luckily amd unlike their primary competitor contributes an open source driver right in the linux kernel theoretically all we need to do is compile a custom kernel and the driver will see the card and make it work by the way recompiling the kernel i have a shirt for that redshirtjeff.com a lot of people have asked me how i recompile the kernel so heck let's do it live so on my raspberry pi pcie device website i actually link to a cross compile environment that i've built using docker which should work on any mac windows or linux computer i use it on my mac and it actually is compatible with m1 max which is nice because the m1 is an arm processor just like the raspberry pi so you can compile arm on arm and it's it's really nice every single step is listed in this readme file like literally when i do this i go to the readme file and i copy and paste the commands and do it myself so i'm going to do all that right here today so that you can see how i do it so i have it up on my computer here the first step is to build this cross compile container image so you run this command docker build cross compile and it will download the base image from debian buster and it will install some things on your computer for it do all that kind of stuff it takes a couple minutes and once it's finished building the docker image the next step is to actually run that image so i'm going to do that here using this command on the screen to run an instance of the docker image paste that in and now it drops you into that docker image so this is in and build environment that's customized for building the raspberry pi linux kernel and the next step is to actually grab raspberry pi linux from the raspberry pi linux repository now if you're going to build a custom version of the kernel and do some specialized things you might want to clone something else or clone a fork of the the repository that you have in your own account with some patches applied to it that's all great and if you know what you're doing you can do that but for most cases you just want to grab the kernel source from here and download it to your computer using git all right and once the source is downloaded to this container you can run these two commands to generate a config file and i'll tell you about what that is in just a moment this is going to generate a dot config file that tells the linux kernel build process how to build it for the raspberry pi so you can see at the end here it says bcm 2711 def config these are the definitions that the raspberry pi foundation has set up for that processor that system on a chip that will make the raspberry pi run linux correctly so we're going to do that and it generates this config file and if i say cat.config you can see that it generates this file with all these different options that are specific to the raspberry pi to make sure that it runs linux correctly but you can change that config to build the kernel in the way that you want so in our case we want to build a kernel with the amd gpu driver so what we're going to use is a utility called menu config and you can you could do this by hand you could edit that that config file but you have to know all the different flags to set and things menu config is a little quote unquote graphical user interface that lets you scroll through and find the options you want so in our case i'm going to go to device drivers and then graphics support graphics graphics graphics graphic support and then amd gpu i'm going to save this and it writes that configuration out to config and then i'll exit here now it's time to actually build the kernel and this is going to take a little time in this command here i have a note in the readme that this command can take different arguments depending on what kind of computer you have you can have more jobs for it if you have more processor cores to spread the load out and no matter what your computer this this parameter can be a little bit different to make it faster this is optimal for my m1 mac mini but it might be different you could get it to be a little faster on your computer if you have let's say a threadripper you could probably do j16 or 32 or something like that so this is the longest part of the process let me go ahead and let that run and you can see what it does all right so the kernel is compiled but now it's on my computer my mac mini but it's not on the raspberry pi so the next step is to actually get it over to the raspberry pi and the way that i like to do that the simplest and most convenient way right now for me is using sshfs to copy everything over ssh as if the pi were mounted locally on my mac so the first step to do that is to on the raspberry pi itself set up ssh so i can log into it as the root user by default this is disabled for security reasons so this is not something that you'd want to do on a production raspberry pi you'd want to do it other ways but for convenience i'm going to set this up and this raspberry pi is not doing anything online and it's going to be erased afterwards so i don't care about the security too much right here so on the pi itself i'm going to edit the sshd config file and then restart sshd so to do that i'm going to go in on the pi so i need to open up a new terminal window ssh into pi at 10.0.100.109 and then i'm going to edit this file and i'm going to go to permit root login and set this to yes and then i'm also going to comment out at the bottom this password authentication no just for convenience i'm going to use the root password and to do that i also have to sudo su to switch to the uh the root user account then i'm going to say password p-a-s-s-w-d and set a password i'll say raspberry raspberry okay so now at this point i should be able to on my other computer login as root i actually also actually have to restart ssh on the pi so i'm going to do that here and i can exit out of there so i'm going to try ssh-ing into that pie and my my pies ip address is dot 119 but you could also log in using a domain name if you want to log into it as cm4.local or something like that but i just use the ip address because i know that that's always going to work for me so i'm going to try logging into it from here and it's going to ask me about the authenticity of the host because it's the first time it's connecting so i'll say yes i would like to connect to it then type in the password raspberry and now i know that i can log into it from this docker container so i'm going to go out of here exit because i don't actually log into it i want to mount a file system onto the docker container from the pi so to do that there's these four commands first you have to make a directory to mount it into so i make that for the ext4 file system and then make another directory for the fat32 file system that has the boot partition and then i'm going to use sshfs to mount the pi into these two places so there's the first one and this oops i forgot to put the password in so let me try that again and then the second one here and enter the password okay so those two file systems are mounted and if i look in here i can actually see what's inside so if i say ls that this is actually listing the contents of the pi itself over the network so this is just convenient for me to copy everything over so the first thing i'm going to do is install the kernel modules that i compiled so i'm just going to copy this command and paste it am i in the wrong directory here okay so it looks like in the compile there was actually an error here are there any other errors that i'm missing that's interesting i guess it could be that the there's a bug in linux itself and i know somebody on twitter actually mentioned to me that there might be a bug with the kernel version 5.10 and the amd gpu driver on arm and it looks like i might be running into that here so that could cut this short i'm going to do a little more research and try to figure out if i can get a different kernel version to compile or if i can get a patch to make it so that i can compile this so it's looking like it could take a little time and might be a lot more effort than i first thought trying to get this card to even lock up the pie so what i'm going to do next is i'm actually going to reset my build environment completely so i can do that with get reset dash dash hard and get clean with these flags and that'll clean out all the junk that that i just built and it actually didn't build all the way which i didn't notice and then i'll do it again but i'll do it on a different branch or i'll try different patch sets and things that i find online all that information will be posted in this issue on my pi pci express card database github repository but it looks like the kernel compile is not going to be quite as easy as it normally is and you know i i think that i'll be able to say that it's been zero days since i recompiled the linux kernel go to head to redshirtjeff.com for that um and uh i'll be able to be wearing that shirt quite a bit in the next week or two as i get into this card so it looks like the recompile won't be easy and i don't want this video to go too long so i'm gonna wrap it up there but not all the news is bad not only do we know the bar space is no longer an issue github user coreforge has been getting more and more functionality out of the older radeon card he's testing at this point we've narrowed down the bugs to memory access errors and i'm hopeful at least older generation video cards will work in some capacity it's just a matter of time i'll continue testing the card so follow the github issue for progress and until next time i'm jeff gearling
Info
Channel: Jeff Geerling
Views: 503,081
Rating: undefined out of 5
Keywords: raspberry pi, gpu, amd, radeon, rx 6700 xt, nvidia, graphics, card, pci, pcie, pci express, cm4, compute module, compute module 4, pc, build, performance, gaming, crypto, mining, currency, bitcoin, ethereum, riser, how-to, enclosure, adapter, ai, ml, machine learning, proxmox, vm, power, insane, database, cuda, compute, x16, x1, cooling, live, assembly, drivers, linux, open source, amdgpu, kernel, compile, cross-compile, recompile, sshfs, tutorial
Id: LO7Ip9VbOLY
Channel Id: undefined
Length: 22min 39sec (1359 seconds)
Published: Sun Sep 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.