# Graphics Driver for Ryzen5600+Gigabyte B550



## Lamia (Jan 23, 2022)

I am out of ideas for getting display to work.
The old setup - P8Z77 + DDR3 RAM - worked well with Geforce 710 graphics card when I could not get its onboard graphics to work.

The new setup has caused sleepless nights. I tried to get the onboard video to load varying Desktop Environments - sway, mate, fvwm, etc. - but no luck.

I installed a ddr3 Geforce card on the ddr4 Gigabyte B550 Vision D-P board; no screen too.
I have done all possible to make all work but no luck. I am now about buying another graphics card and wanted to be sure if it is needed.

The NICs on the board won't work until I got the module/driver from 13.0-stable/14-current. I have switched to 13.0-Stable, yet no luck.
I have followed all instructions on the net - e.g. https://forums.freebsd.org/threads/ryzen-b450-radeon-rx-550-kernel-panic.74654/.

Attached are a few images (apologies for the quality) showing that the OS doesn't successfully recognise the hardware despite all forms of drivers loaded.

In short, I had a similar problem with the other old board, when the high-end GPU card on it failed and onboard won't work. That was when I got the Geforce 710. What cards would you now recommend? And why won't the onboard cards not (usually) work for Gigabyte boards I.e. Xorg log reporting no screen until an external/pci card is attached?


----------



## 3301 (Jan 23, 2022)

I have a little difficulties with understanding what is your current setup that is causing problems. Is it  GeForce 710 (should work just fine with proprietary drivers) + Gigabyte B550? What is your CPU, is that some Ryzen with integrated graphics?


----------



## Lamia (Jan 23, 2022)

3301 said:


> I have a little difficulties with understanding what is your current setup that is causing problems. Is it  GeForce 710 (should work just fine with proprietary drivers) + Gigabyte B550? What is your CPU, is that some Ryzen with integrated graphics?


Apologies.
Yes,  it(Geforce 710) should work as I read that a ddr3/gddr4  graphics card could work on such setup using ddr4. The current problematic setup is - Ryzen5600+B550+Ddr4 RAM. 

The integrated graphics on B550 mobo requires a CPU that support it. And the AMD CPU Ryzen 5600G is with a Radeon Graphics & fan. The onboard graphics should work too. Take a closer look at the attached images you will see question marks in the Xorg log. Both graphic devices @ pci:76:0:0 & pci:84:0:0 are question-marked.


----------



## zsolt (Jan 23, 2022)

If you want to use the onboard graphic card from inside you're CPU which is a Radeon™ Graphics then you have to install "drm-fbsd13-kmod" if you are on FreeBSD 13 or "drm-devel-kmod-5.5.19.g20211230" if you are on CURRENT or the latest. 

Info: https://www.freshports.org/graphics/drm-fbsd13-kmod/


----------



## Lamia (Jan 23, 2022)

zsolt said:


> If you want to use the onboard graphic card from inside you're CPU which is a Radeon™ Graphics then you have to install "drm-fbsd13-kmod" if you are on FreeBSD 13 or "drm-devel-kmod-5.5.19.g20211230" if you are on CURRENT or the latest.
> 
> Info: https://www.freshports.org/graphics/drm-fbsd13-kmod/


Trust me. I have done all that. I had a list of installed pkgs with their versions. In fact, I had drm-devel-kmod; it builds only on current.


----------



## zsolt (Jan 23, 2022)

Does the driver loads with success? What is the output of: kldstat | grep amdgpu ?


----------



## Lamia (Jan 23, 2022)

zsolt said:


> Does the driver loads with success? What is the output of: kldstat | grep amdgpu ?


Yes, perfectly loaded. And several others.
Sorry, I'm not near it ATM.


----------



## zsolt (Jan 23, 2022)

What I do in this situation is this: remove the nvidia card, do a load factory defaults in the bios and work only with the amdgpu. But before everything try to see if xorg loads with driver vesa first.


----------



## grahamperrin@ (Jan 24, 2022)

zsolt said:


> … work only with the amdgpu. …



For _AMD Ryzen 5 5600G with Radeon Graphics_, <https://bsd-hardware.info/?id=cpu:amd-25-80-0-ryzen-5-5600g-with-radeon-graphics&hwid=e76068026a5b> does show `amdgpu` working on 9th January with `FreeBSD 14.0-CURRENT main-n252294-fcbb1441d07` i.e. <https://cgit.freebsd.org/src/log/?qt=range&q=fcbb1441d07>

Lamia please, is that (Ryzen 5 5600G) a match for your hardware in the context of this topic?

Can you recall which version of 14.0-CURRENT you tried?


Aside:



Lamia said:


> … I had drm-devel-kmod; it builds only on current. …



Not to recommend stable/13 over main in this case, but what happened when you attempted the build on stable/13?


----------



## Lamia (Jan 24, 2022)

grahamperrin said:


> match for your hardware in the context of this topic?
> 
> Can you recall which version of 14.0-CURRENT you tried?


Yes, it is a match.

I only got the network drivers from 14.0-current; I could not successfully build 14.0(no make or src confs, even when llvm12 was set over current llvm13). I was instead using 13.0-Stable, which also had the drivers. Technically, 13-current would be 13.0-Stable, which will become 13.1. So that is how my use of the word current came to be. 14 would be highly unstable to use now.



grahamperrin said:


> Not to recommend stable/13 over main in this case, but what happened when you attempted the build on stable/13?


No luck either. I would say the devices were all detected. The Xorg log error now changes from "no devices detected" to "no screen".




grahamperrin said:


> A few hours ago, someone in IRC mentioned a _Ryzen 7 5700u_ with a _Lucienne_. Coincidence? Or was that you trying a different card?


Nope. 

I have now tried OpenBSD7, which correctly labelled the cards unlike FreeBSD with its '????' in the Xorg log. Yet, no DE had worked. I spent ample time on the bsd-hardware site too. This setup is rare, in fact, no B550 but B450. All 5600(G) showed "detected" for both BSDs  - which does not necessarily mean working - hence "worked" is not written for the cards, unlike other devices. I am now buying a graphics card as I did for the other board/PC.


----------



## grahamperrin@ (Jan 24, 2022)

Lamia said:


> … I am now buying a graphics card as I did for the other board/PC.



OK, thanks.



Lamia said:


> … could not successfully build 14.0 … Technically, 13-current …



I'll cover those points in another recent topic. 



Lamia said:


> … OpenBSD7, which correctly labelled the cards unlike FreeBSD with its '????' in the Xorg log.



In all FreeBSD cases: were you _entirely free_ from manually-created X.Org configuration files?



Lamia said:


> Yet, no DE had worked. …



I have no experience with OpenBSD, but that surprises me. I'll create a virtual machine (and discuss in an OpenBSD area, if necessary).


----------



## Lamia (Jan 24, 2022)

grahamperrin said:


> In all FreeBSD cases: were you _entirely free_ from manually-created X.Org configuration files?


Perhaps no. I recreated it. For example, nvidia-xconfig was used for the Geforce card, I also created a few confs in the Xorg.confd in order to load other drivers - vesa, modesetting, scfb, ati, etc.




grahamperrin said:


> I'll cover those points in another recent topic.


SirDice and many others have exhaustively explained it. That was my literal inference since there is not main branch (current) for 13.0 or other versions but STABLE. 

I can see several open discussions on this matter in this forum and several others. Together we make the *BSD better as a client(desktop)/server OS. Thanks to you folks.


----------



## Lamia (Jan 24, 2022)

Got FBSD14 going on Generic. Now updating pkgs.
How can one build a poudriere jail of it? The -v argument accepts stable or release and ver. no.


----------



## cmoerz (Jan 24, 2022)

Have you checked, whether your pci identifiers (check via `pciconf -lv` are actually listed in drm-kmod? You might need to patch similar to this:








						AMD Ryzen 7 5700G with Radeon Graphics    does not work . · Issue #118 · freebsd/drm-kmod
					

Describe the bug AMD Ryzen 7 5700G with Radeon Graphics does not recognized with amdgpu.ko FreeBSD version FreeBSD akatsuki 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n249842-42dfad2ef12: Tue Oct 5 ...




					github.com
				




This obviously only works with at least 13/stable.


----------



## grahamperrin@ (Jan 24, 2022)

Lamia said:


> Got FBSD14 going on Generic. …
> 
> How can one build a poudriere jail of it? …



`poudriere jail -c -j main -m src=/usr/src`

This uses the recently pulled source code for `main` i.e. CURRENT to create a jail named _main_. 

Looking ahead

After each update of the operating system from source, you can habitually:

`poudriere jail -u -j main`


----------



## astyle (Jan 24, 2022)

Just chiming in:

DDR3 vs DDR4: That matters with RAM, but not GPU. For GPU, the cards go into a PCIe slot. One word of caution - in the BIOS, it's possible to disable specific PCIe slots. So, stuff your GPU in, make a note of which PCIe slot it occupies, boot into BIOS, and make sure that specific slot is enabled. Oh, while you're at it, you might also want to disable the integrated graphics (that's also done in the BIOS). FreeBSD is pretty good at figuring out what's enabled, and will tell you that info. Hope this helps.


----------



## Lamia (Feb 3, 2022)

The Void OS, though as lean as *BSD, won't load the GUI. 
Debian gave me no headache.
These tests are for both the onboard graphics and the Nvidia card.

The conclusion is that a gddr4 (or ddr3) graphics card can work on ddr4 mobo/board. AMD graphics drivers on Debian  are lagging behind for some new gen boards - e g. Vision B550. Despite installing the firmware-amdgpu-drivers pkg (with others already installed e.g. libdrm* & xf64-amd* drivers), the mobo with its onboard graphics AND Ryzen CPU with Radeon Graphics integrated won't get GUI loaded. But the Nvidia card worked. 

I am now waiting for RTX 2060 shipped last Monday. It is fails too on *BSD, hmm....


----------



## Lamia (Feb 3, 2022)

I am happy to continue testing. FBSD 14 looks irresistible for a desktop OS. And there are still several of our machines across the globe running FBSD.


----------



## shkhln (Feb 3, 2022)

Lamia said:


> The conclusion is that a gddr4 (or ddr3) graphics card can work on ddr4 mobo/board.


The video card memory is a bunch of chips on the video card itself connected to the GPU chip which in turn communicates with the CPU through the PCI-E bus. VRAM can't be incompatible with motherboard (CPU, actually) on principle, they aren't directly connected.


----------



## shkhln (Feb 3, 2022)

By the way, Ryzen 5600X doesn't have onboard graphics, only 5600G does. Ryzen 5600 doesn't exist.


----------



## Lamia (Feb 3, 2022)

shkhln said:


> By the way, Ryzen 5600X doesn't have onboard graphics, only 5600G does. Ryzen 5600 doesn't exist.


I could not find where I mentioned 5600x. I have the 5600G. Thanks for your input above about VRAM.


----------



## astyle (Feb 3, 2022)

Lamia said:


> I could not find where I mentioned 5600x. I have the 5600G. Thanks for your input above about VRAM.


If you have 5600G, that one has integrated graphics. You'll need to get into the BIOS to make use of the GPU card, otherwise the RTX 2060 is pointless. 
--
Type of RAM on a GPU has nothing to do with type of RAM a motherboard has. The important part is frankly the PCIe slot on the motherboard - it needs to be labeled PCIe x16.


----------



## Lamia (Feb 3, 2022)

astyle said:


> If you have 5600G, that one has integrated graphics. You'll need to get into the BIOS to make use of the GPU card, otherwise the RTX 2060 is pointless


Thank you Sir. The onboard is "IGD Video" in Bios and it is interchangeably selected with the PCIe2, which is X16, for the Gefor e 710. Selecting one then the other make me test both cases.
I reckon it is the PCIe slot too than determines if a graphics card would work. The min. for the card is x4 and it worked on PCIeX4 slot for the old mobo after exhausting X16 & X8 slots. 

There were controversies that such card might not work on high-end boards and that has been addressed now. Perf. might suffer over time.

Thanks.


----------



## astyle (Feb 3, 2022)

Lamia said:


> Thank you Sir. The onboard is "IGD Video" in Bios and it is interchangeably selected with the PCIe2, which is X16, for the Gefor e 710. Selecting one then the other make me test both cases.
> I reckon it is the PCIe slot too than determines if a graphics card would work. The min. for the card is x4 and it worked on PCIeX4 slot for the old mobo after exhausting X16 & X8 slots.
> 
> There were controversies that such card might not work on high-end boards and that has been addressed now. Perf. might suffer over time.
> ...


nah, if the GPU is enabled in the BIOS, it should definitely work. The PCIe x16 slot gives the GPU the most data bandwidth. Your RTX 2060 is gonna be fine.  
--
The point of installing a GPU in an x16 slot (as opposed to x8 or x4) is to avoid a data bottleneck, and allow the GUI to be responsive. Even something as powerful as RTX 3090 will seem slower in an x8 slot than in an x16 slot. Generally, the best practice is to stuff the GPU into an x16 slot, and other cards into the x8/x4 slots. 
--
Just to point out - your B550 board probably has just one x16 slot for PCIe. A high-end board (X399, for a Threadripper) would have at least 2 x16 slots, and cost 2-3 times as much as a B550 board.


----------



## Lamia (Feb 4, 2022)

I started on s clean slate, as a last resort, and things are taking shape. I's relying on Stable & Current for missing drivers. I now have both the onboard graphics and Geforce PCIe card working. I am still fine-tuning the system.

On trying to setup poudriere, I got this error:


```
$ poudriere jail -c -j 130SAmd64 -m git+ssh -v stable/13 -a amd64
.....
......
--- _bootstrap-tools-lib/libopenbsd ---
cc  -O2 -pipe -fno-common -I/usr/local/poudriere/jails/130SAmd64/usr/src/lib/libopenbsd  -g -MD  -MF.depend-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member  -Qunused-arguments    -I/usr/obj/usr/local/poudriere/jails/130SAmd64/usr/src/amd64.amd64/tmp/legacy/usr/include -c /usr/local/poudriere/jails/130SAmd64/usr/src/lib/libopenbsd/imsg.c -o imsg.o--- _bootstrap-tools-usr.bin/fortune/strfile ---
ld: error: unknown argument '--no-threads'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [strfile.full] Error code 1

make[3]: stopped in /usr/local/poudriere/jails/130SAmd64/usr/src/usr.bin/fortune/strfile
1 error

make[3]: stopped in /usr/local/poudriere/jails/130SAmd64/usr/src/usr.bin/fortune/strfile

make[2]: stopped in /usr/local/poudriere/jails/130SAmd64/usr/src
--- _bootstrap-tools-lib/clang/libllvmminimal ---

make[2]: stopped in /usr/local/poudriere/jails/130SAmd64/usr/src
--- _bootstrap-tools-lib/libopenbsd ---

make[2]: stopped in /usr/local/poudriere/jails/130SAmd64/usr/src
--- _bootstrap-tools-usr.bin/dtc ---

make[2]: stopped in /usr/local/poudriere/jails/130SAmd64/usr/src

make[1]: stopped in /usr/local/poudriere/jails/130SAmd64/usr/src

make: stopped in /usr/local/poudriere/jails/130SAmd64/usr/src
[00:08:06] Error: Failed to 'make buildworld'
[00:08:06] Error while creating jail, cleaning up.
```

What could be wrong? All current, releng & stable are failing.


----------



## Lamia (Feb 4, 2022)

Lamia said:


> I started on s clean slate, as a last resort, and things are taking shape. I's relying on Stable & Current for missing drivers. I now have both the onboard graphics and Geforce PCIe card working. I am still fine-tuning the system.
> 
> On trying to setup poudriere, I got this error:
> 
> ...


I must have fixed it - my src.conf had linker/ld option set. I'm tired; otherwise I should have resolved it long ago too.


----------



## astyle (Feb 4, 2022)

Lamia said:


> ld: error: unknown argument '--no-threads'


This is the line I'd pay attention to when trying to diagnose the error - it comes up pretty early in the output. But beyond that, getting adequate sleep does wonders for your ability to pay attention to what you're doing. The ability of people like us (i.e. hackers, gamers, programmers, anyone with an intense interest in squeezing the computers for all they have) to flout that piece of wisdom is the butt of jokes on Facebook/Meta, especially after that place lost a quarter of its financial valuation just this past week.


----------



## Lamia (Feb 8, 2022)

The RTX 2060 indeed flawlessly worked. Yet, it gave me some headache as  Nvidia-settings would detect a second monitor but not display on it. The DP & HDMI ports on the card had an unused DP port between them. 

Little did I know that there was just one way to resolve the problem. It is not by tampering with the OS, drivers, etc. The attempt to fix it took hours, whereas all I needed to do was to use the ports in an orderly fashion. Other cards had not behaved this way. Perhaps, removing & re-inserting (hot-plugging) into any port after Nvidia-settings detected it might work.

I forgot to mention that Gigabyte released a BIOS update to make Ryzen (5600G) effectively work with their B550 board in the last quarter or last year. Bios updates also help. 

The last 1.5weeks have been hectic. In retrospect, is using worth such efforts? YES! As much as I wanted to jump ship [BSD to Linux] for Desktop, the sheer KISS Unix philosophy held me back countless times. I tested Jailed-GUI application, LinuxJail, and a few others during this expedition, and they worked though they needed heavy, consistent hacking.
All in all, FreeBSD performed tremendously well on. The old box did well with SSD Caching, L2ARC & LOG setup. I bet it a Linux OS would have brutally crashed a few times within the same period. Bectl, beadm & other utilities are handy tools for UNIX system migration. Thanks to the community and everyone that helped.


----------



## shkhln (Feb 9, 2022)

PCI hotplugging? Definitely not what you want.


----------



## Lamia (Feb 9, 2022)

shkhln said:


> PCI hotplugging? Definitely not what you want.


Definitely not. But  I am meant inserting the dp/hdmi cables between PC & monitors, when they are on. This is also frown at - can fry card. It was my last resort at the time...


----------



## shkhln (Feb 9, 2022)

DisplayPort and HDMI are both designed to be safely pluggable in powered state (just like USB). VGA and DVI aren't, although that is unlikely to cause any issues.

As for the detection issues, I have a monitor which only works with MiniDP if it was manually switched to that input within several seconds of my PC being started, otherwise it switches to other ports and then the video card thinks nothing is connected to it (the monitor is _not_ and never has been in the auto input selection mode, that's just how well behaving hardware should work in Samsung's opinion). I can sympathize.


----------



## astyle (Feb 9, 2022)

shkhln said:


> DisplayPort and HDMI are both designed to be safely pluggable in powered state (just like USB). VGA and DVI aren't, although that is unlikely to cause any issues.
> 
> As for the detection issues, I have a monitor which only works with MiniDP if it was manually switched to that input within several seconds of my PC being started, otherwise it switches to other ports and then the video card thinks nothing is connected to it (the monitor is _not_ and never has been in the auto input selection mode, that's just how well behaving hardware should work in Samsung's opinion). I can sympathize.


Just have the monitor plugged in via HDMI/DP/Whatever and powered on first, and AFTER that, turn on the box.


----------



## Lamia (Feb 9, 2022)

shkhln said:


> DisplayPort and HDMI are both designed to be safely pluggable in powered state (just like USB).


I'm taking your word for it. Thanks.


shkhln said:


> the monitor is _not_ and never has been in the auto input selection mode, that's just how well behaving hardware should work in Samsung's opinion


Samsung's opinion indeed!



shkhln said:


> I can sympathize.


----------



## Alexander88207 (Feb 9, 2022)

Lamia said:


> Got FBSD14 going on Generic. Now updating pkgs.
> How can one build a poudriere jail of it? The -v argument accepts stable or release and ver. no.



Its possible to set current when using -v 14.0-CURRENT if i remember correctly.


----------



## Alexander88207 (Feb 9, 2022)

You have some custom configs applied, please try to remove them.


----------



## Lamia (Feb 9, 2022)

Alexander88207 said:


> Its possible to set current when using -v 14.0-CURRENT if i remember correctly.


Interesting. Thank you Sir. I shall get rid of the custom configs too.


----------

