AMD Ryzen 9 7940HS (Radeon 780M) - Graphics now working!

This was a very rocky road and maybe its just me, but I found next to no helpful information in getting the 780M graphics of the fairly new AMD 7940HS to work on FreeBSD. Here is a short list of the things I had to do to get this working:

  • Upgrade to FreeBSD 15-CURRENT, it looks like the drm-61-kmod package required to support this APU is not available for FreeBSD 14 or 13. This is a bummer, I do not usually like to run bleeding edge development branches
  • Install drm-61-kmod from packages or port (I installed everything from ports)
  • Add the required kld_list="amdgpu" to your rc.conf
  • Now install the following firmware packages/ports:
    • gpu-firmware-amd-kmod-dcn-3-1-4
    • gpu-firmware-amd-kmod-gc-11-0-1
    • gpu-firmware-amd-kmod-gc-11-0-4
    • gpu-firmware-amd-kmod-psp-13-0-4
    • gpu-firmware-amd-kmod-sdma-6-0-1
    • gpu-firmware-amd-kmod-vcn-4-0-2
If you install from ports, the part after "gpu-firmware-amd-kmod" indicates the flavour you need to build.

Now the GPU should properly initialize on reboot. If you forget any of the firmware packages or get the wrong flavour, you will get a kernel panic during boot. Actually, output from these kernel panics showed me which firmware packages were needed. So if you are installing a slightly different APU and do get a kernel panic, pay close attention to the AMD driver messages, these are really helpful.

The "friendly name" of the Ryzen 9 7940HS platform is "Phoenix", in case that gets later added to the AMD GPU firmware flavours.

If anybody is interested, the PC in question is a Minisforum UM790 Pro (which I was almost ready to throw out of the windows before I got this to work, finally). This also required the realtek-re-kmod package for the 2.5 GBit Ethernet interface to work.
 
… CURRENT, … a bummer, I do not usually like to run bleeding edge development branches …

If you make good use of ZFS boot environments, you should have no fear.

A few hours ago in Discord we walked someone through upgrading from 14.0-RELEASE to 15.0-CURRENT. Partly with reference to the wiki, which currently focuses on RELEASE, so some variation was required (plus, we noticed some gaps).
 
Hi! Followed everything here, and I have graphics drivers working well. I have not managed to get audio working though. If you did get audio working, would sharing your solution be possible?
(Minisforum UM790)
 
The audio is too quiet and I haven't figured out how to increase the volume. Standard audio mixer settings don't seem to have an effect.
 
Hi! Followed everything here, and I have graphics drivers working well. I have not managed to get audio working though. If you did get audio working, would sharing your solution be possible?
(Minisforum UM790)
I do not need audio on this box, so I never looked into this. In general terms, you could either use a standard USB audio device or use audio via HDMI (AMD audio).
 
Just as a warning, upgrading from 14.1-RELEASE to 14.2-RELEASE left me with a blank screen. I was able to get things working again by rebuilding drm-61-kmod and the firmware packages listed above.

Before upgrading, consider removing "amdgpu" from being loaded automatically on system start. Doing this before upgrading would have saved me some time.
 
Just as a warning, upgrading from 14.1-RELEASE to 14.2-RELEASE left me with a blank screen. I was able to get things working again by rebuilding drm-61-kmod and the firmware packages listed above.

Before upgrading, consider removing "amdgpu" from being loaded automatically on system start. Doing this before upgrading would have saved me some time.
And beware of per-RELEASE Errata every time upgrading base.;)
 
Interesting... I have a Ryzen 5 7600 with Raphael graphics. It's fast, and supposedly has integrated graphics. This really gives me hope for using that as the compile machine with a desktop.
 
Hmmm...this post is interesting. I have been battling with a Toshiba Satellite laptop which has an AMD E1-2100 CPU which has an integrated "Kabini" Radeon HD 8210 graphics adapter in it.

I have installed FreeBSD 14.2-RELEASE on it just fine. It is only when I try to get X to work that I have problems.

I have tried everything I could find (so far) on this forum to get it to work with X and nothing works....yet.

I get a kernel panic with kld_list="amdgpu", and a black screen on boot with kld_list="/boot/modules/radeonkms.ko" in rc.conf

Further more, when I try to start X, I get a "Cannot run in frame buffer mode....." error.

Well, I have been working on this all day, and I am going to bed. I MAY restart the battle tomorrow...

Ken Gordon
 
I have AMD Radeon PRO W5500 had similar issues just no kernel panic.
this is what i had to do:
drm-515-kmod / kld_list="amdgpu" and had to install xf86-video-amdgpu. created file in /usr/local/etc/X11/xorg.conf.d/20-amdgpu.conf
Code:
Section "Device"
    Identifier "Card0"
    Driver "amdgpu"
    BusID "PCI:4:0:0"
EndSection

I maybe can use drm-61-kmod but i had issues so i fixed everything with 515-kmod. ( When i had 61-kmod i did not knew i need xf86-video-amdgpu driver to install ) so im stick with 515-drm. Running 14.2-Stable. But you can try same with 61-kmod.
p.s. iff you have amdgpu in rc.conf you have to use amdgpu in xorg.conf.d/20-amdgpu.conf file.
EDIT: drm-61-kmod will give me black screen all the time. just tested.
 
I have AMD Radeon PRO W5500 had similar issues just no kernel panic.
this is what i had to do:
drm-515-kmod / kld_list="amdgpu" and had to install xf86-video-amdgpu. created file in /usr/local/etc/X11/xorg.conf.d/20-amdgpu.conf
Code:
Section "Device"
    Identifier "Card0"
    Driver "amdgpu"
    BusID "PCI:4:0:0"
EndSection

I maybe can use drm-61-kmod but i had issues so i fixed everything with 515-kmod. ( When i had 61-kmod i did not knew i need xf86-video-amdgpu driver to install ) so im stick with 515-drm. Running 14.2-Stable. But you can try same with 61-kmod.
p.s. iff you have amdgpu in rc.conf you have to use amdgpu in xorg.conf.d/20-amdgpu.conf file.
EDIT: drm-61-kmod will give me black screen all the time. just tested.

Thank you so very much!! I was about to set this project aside for the next few years. I will immediately try what you suggest, and I very much thank you for your kindness and expertise.

This is yet another reason why I view this forum as one of the very best I have ever been on.

Ken Gordon
 
Ha ha!!!! 🤣🤣🤣🤣

Well, that resulted in another kernel panic, and automatic reboot. Reviewing the crash dump, I find a LONG core.txt.2 which goes into great detail concerning the Kabini video device, which I am having difficulty interpreting, but at least it appears to me that progress is being made! I will review the files I just edited to make sure I haven't fat-fingered something somewhere, and will report back.

When I remove the kld_list="amdgpu" entry from my rc.conf the system boots normally, (except that I get a bunch of unnecessary notices about ugen devices being "...not a drive", but the cause of that is NOT related to THIS issue.)

BTW, my xorg config files are not in /usr/local/etc/X11/xorg.conf.d, but are in /usr/local/share/X11/xorg.conf.d along with a bunch of other such files, just FYI.

Ken Gordon
 
I was using handbook for file locations thats why my files are in /usr/local/etc/X11/xirg.conf.d/
You is post HD7000 and documentation says amdgpu to use, but just out of curiosity - have you tried radeonkms ? You never know ... but if you try radeonkms, change driver in your xorg.config to radeon instead of amdgpu and then install radeon firmware instead of amd :)
 
I was using handbook for file locations thats why my files are in /usr/local/etc/X11/xorg.conf.d/
Actually, Xorg looks in that directory first, calling it the "config directory",then it looks in the "/share/" directory, calling it the "system directory". I would think that either should work OK.

You is post HD7000 and documentation says amdgpu to use, but just out of curiosity - have you tried radeonkms ?

Well, I tried that some time ago, and got a black screen and had to reboot then go into single-user mode to change it, but I had not loaded the radeon firmware then either.

You never know ... but if you try radeonkms, change driver in your xorg.config to radeon instead of amdgpu and then install radeon firmware instead of amd :)
I'll try that next.

What is confusing me at the moment is that when I use the BusId which I find in both dmesg and in pciconf -lv of PCI 0:1:0 in the xorg config file, Xorg doesn't find it.

Thanks again. :)
Ken Gordon
 
OK. I substituted radeonkms for amdgpu in rc.conf, and installed xf86-video-ati and although it took a LONG time to load everything after startx NOW everything is working!!! Thank you!!!

BTW, the correct firmware that takes care of the Radeon is xf86-video-ati

Later! 👍

Ken Gordon
 
BTW, although FreeBSD makes this Toshiba Satellite laptop far more usable than it ever was under WinDOZE 10, it is still slower than molasses in January.

I think the OP might consider this subject SOLVED. At least it sure is for me! Thanks again!

Ken Gordon
 
BTW, although FreeBSD makes this Toshiba Satellite laptop far more usable than it ever was under WinDOZE 10, it is still slower than molasses in January.

I think the OP might consider this subject SOLVED. At least it sure is for me! Thanks again!

Ken Gordon
Nope, "Kabini" is the older stuff (launched in May of 2013) that has been working for over 10 years now. OP was about Ryzen 7000 iGPU, and that was released only after 2020 in 2023-2024...

Checking pkg info for the installed packages that OP points to - it turns out that
is the place to look.

BUT... While the firmwares for recent stuff are there, it still takes learning how to deal with kernel panics! Dunno if I have it in me at this point to go down THAT rabbit hole. Somebody will need to at some point if FreeBSD is to be capable of supporting recent hardware.
 
Update for the Ryzen 5 7600 (Raphael graphics):
Per techpowerup.com:
  • Graphics/Compute: 10.3.6 (gc_10_3_6)
  • Display Core Next: 3.1.5 (dcn_3_1_5)
  • Video Core Next: 3.1.2 (vcn_3_1_2)
  • System DMA: 5.2.6 (sdma_5_2_6)
  • Platform Security Processor: 13.0.5 (psp_13_0_5)

Compiling graphics/drm-61-kmod is a bit of an adventure, because by default, it would somehow not compile the proper flavors that I listed in this post. I had to find and compile them by hand. And even then, amdgpu.ko doesn't load all the psp components, amdgpu_psp_13_0_5_asd_bin.ko gets left out until loaded manually.
Code:
#  kldstat | grep amd
 4    1 0xffffffff83510000    2c2e0 amdgpu_psp_13_0_5_asd_bin.ko
11    1 0xffffffff83600000   66a888 amdgpu.ko
18    1 0xffffffff835fc000     27e0 amdgpu_psp_13_0_5_toc_bin.ko
19    1 0xffffffff83c6b000    344e0 amdgpu_psp_13_0_5_ta_bin.ko
20    1 0xffffffff83ca0000    4ba00 amdgpu_dcn_3_1_5_dmcub_bin.ko
21    1 0xffffffff83cec000    425e0 amdgpu_gc_10_3_6_pfp_bin.ko
22    1 0xffffffff83d2f000    425e0 amdgpu_gc_10_3_6_me_bin.ko
23    1 0xffffffff83d72000    42560 amdgpu_gc_10_3_6_ce_bin.ko
24    1 0xffffffff83db5000    2d4a0 amdgpu_gc_10_3_6_rlc_bin.ko
25    1 0xffffffff83de3000    43a10 amdgpu_gc_10_3_6_mec_bin.ko
26    1 0xffffffff83e27000    43a10 amdgpu_gc_10_3_6_mec2_bin.ko
27    1 0xffffffff83e6b000     a5e0 amdgpu_sdma_5_2_6_bin.ko
28    1 0xffffffff83e76000    8da90 amdgpu_vcn_3_1_2_bin.ko

But even with this, I think I missed something. amdgpu.ko loads fine, no complaints, but something is not working right. The dmesg dump that I took - it's attached as a text file in case anyone is interested in going through and figuring out what's missing. That's because my screen is mostly blank, I can see just the top half of the topmost line of the TTY terminal. Yeah, I'm on 15-CURRENT like OP. I know that 15-CURRENT is not supported on the Forums, but if someone can point out something to me, I'd love that! Especially considering that the graphics/drm-61-kmod is available on the -RELEASE versions of FreeBSD, as well... 😅

Edit: forgot to attach that text dump from dmesg...
 

Attachments

Update: Just putting firmwares together is not quite enough... apparently, I also need to figure out the SMU (System Management Unit) flavors (this notebookcheck.com page got me started):
In /usr/ports/graphics/gpu-firmware-amd-kmod
Code:
smu_13_0_0
smu_13_0_10
smu_13_0_7
Recompiling the port, playing with different combinations of .ko files and port flavors, that got me nowhere... any ideas on where to go from this would be appreciated!
 
If the GPU is already supported on FreeBSD and just unclear which firmware to be required, what about letting fwget(8) to do the job?
Possibly you need to deinstall firmware pkgs to avoid complaints with conflicts.
 
Back
Top