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

I also faced the problem of supporting the new iGPU for AMD Ryzen 7 9700x.
After installing graphics/drm-61-kmod and graphics/gpu-firmware-kmod-amd, I load amdgpu.ko
The screen turned off, but the SSH system was available.

I tried to install different options gpu-firmware-kmod-amd, but this did not help.
After that, I installed all firmware files for all graphics card - installed graphics/gpu-firmware-kmod.
This also did not help. There were errors in the logs.

Code:
[drm ERROR :dc_dmub_srv_cmd_queue] Error queuing DMUB command: status=2
[drm ERROR :dc_dmub_srv_wait_idle] Error waiting for DMUB idle: status=3
By this error, I found a solution to the problem here issues/2666
I took the corrected file amdgpu/dcn_3_1_5_dmcub.bin here amdgpu/dcn_3_1_5_dmcub.bin

I compiled gpu-firmware-amd-kmod-dcn-3-1-5 with this "amdgpu/dcn_3_1_5_dmcub.bin". After that, everything worked fine.
Xorg.0.log (part)
Code:
[    21.145] (II) AMDGPU(0): glamor X acceleration enabled on AMD Radeon Graphics (radeonsi, raphael_mendocino, LLVM 15.0.7, DRM 3.49, 14.2-RELEASE)
[    21.145] (II) AMDGPU(0): glamor detected, initialising EGL layer.
[    21.145] (==) AMDGPU(0): TearFree property default: auto
[    21.145] (==) AMDGPU(0): VariableRefresh: disabled
[    21.145] (==) AMDGPU(0): AsyncFlipSecondaries: disabled
[    21.145] (II) AMDGPU(0): KMS Pageflipping: enabled
[    21.145] (II) AMDGPU(0): Output HDMI-A-0 has no monitor section
[    21.147] (II) AMDGPU(0): Output DisplayPort-0 has no monitor section
[    21.147] (II) AMDGPU(0): Output DisplayPort-1 has no monitor section
[    21.160] (II) AMDGPU(0): EDID for output HDMI-A-0
[    21.161] (II) AMDGPU(0): EDID for output DisplayPort-0
[    21.161] (II) AMDGPU(0): Year: 2024  Week: 14
[    21.161] (II) AMDGPU(0): EDID Version: 1.4
[    21.161] (II) AMDGPU(0): Digital Display Input
[    21.161] (II) AMDGPU(0): 10 bits per channel
[    21.161] (II) AMDGPU(0): Digital interface is DisplayPort
[    21.161] (II) AMDGPU(0): Max Image Size [cm]: horiz.: 60  vert.: 34
[    21.161] (II) AMDGPU(0): Gamma: 2.20
[    21.162] (II) AMDGPU(0): DPMS capabilities: Off
[    21.162] (II) AMDGPU(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 YCrCb 4:2:2
[    21.162] (II) AMDGPU(0): First detailed timing is preferred mode
[    21.162] (II) AMDGPU(0): Preferred mode is native pixel format and refresh rate
[    21.162] (II) AMDGPU(0): Display is continuous-frequency
[    21.162] (II) AMDGPU(0): redX: 0.666 redY: 0.328   greenX: 0.277 greenY: 0.665
[    21.162] (II) AMDGPU(0): blueX: 0.146 blueY: 0.050   whiteX: 0.313 whiteY: 0.329
[    21.162] (II) AMDGPU(0): Supported established timings:
[    21.162] (II) AMDGPU(0): 720x400@70Hz
[    21.162] (II) AMDGPU(0): 640x480@60Hz
[    21.162] (II) AMDGPU(0): 640x480@67Hz
[    21.162] (II) AMDGPU(0): 640x480@75Hz
[    21.162] (II) AMDGPU(0): 800x600@56Hz
[    21.162] (II) AMDGPU(0): 800x600@60Hz
[    21.162] (II) AMDGPU(0): 800x600@75Hz
[    21.162] (II) AMDGPU(0): 1024x768@60Hz
[    21.162] (II) AMDGPU(0): 1024x768@70Hz
[    21.162] (II) AMDGPU(0): 1024x768@75Hz
[    21.162] (II) AMDGPU(0): 1280x1024@75Hz
[    21.162] (II) AMDGPU(0): Manufacturer's mask: 0
[    21.162] (II) AMDGPU(0): Supported standard timings:
[    21.162] (II) AMDGPU(0): #0: hsize: 1152  vsize 864  refresh: 75  vid: 20337
[    21.162] (II) AMDGPU(0): #1: hsize: 1280  vsize 1024  refresh: 60  vid: 32897
[    21.162] (II) AMDGPU(0): #2: hsize: 1280  vsize 800  refresh: 60  vid: 129
[    21.162] (II) AMDGPU(0): #3: hsize: 1280  vsize 720  refresh: 60  vid: 49281
[    21.162] (II) AMDGPU(0): #4: hsize: 1440  vsize 900  refresh: 60  vid: 149
[    21.162] (II) AMDGPU(0): #5: hsize: 1680  vsize 1050  refresh: 60  vid: 179
[    21.162] (II) AMDGPU(0): Supported detailed timing:
[    21.162] (II) AMDGPU(0): clock: 241.5 MHz   Image Size:  597 x 336 mm
[    21.162] (II) AMDGPU(0): h_active: 2560  h_sync: 2608  h_sync_end 2640 h_blank_end 2720 h_border: 0
[ 21.162] (II) AMDGPU(0): v_active: 1440 v_sync: 1443 v_sync_end 1448 v_blanking: 1481 v_border: 0

To upgrade gpu-firmware-amd-kmod-dcn-3-1-5, you need:
Code:
pkg delete gpu-firmware-amd-kmod-dcn-3-1-5-20230625_2
cd /usr/ports/graphics/gpu-firmware-amd-kmod
make FLAVOR=dcn_3_1_5 patch
#copy new amdgpu/dcn_3_1_5_dmcub.bin
cp ~/amdgpu_dcn_3_1_5_dmcub.bin /usr/ports/graphics/gpu-firmware-amd-kmod/work-dcn_3_1_5/drm-kmod-firmware-20230625_8/amdgpukmsfw-files/dcn_3_1_5_dmcub.bin
make FLAVOR=dcn_3_1_5 install
# I am have installation error, but need only amdgpu_dcn_3_1_5_dmcub_bin.ko. Save to somewhere.
cp /usr/ports/graphics/gpu-firmware-amd-kmod/work-dcn_3_1_5/stage/boot/modules/amdgpu_dcn_3_1_5_dmcub_bin.ko ~/
# Reinstall gpu-firmware-amd-kmod-dcn-3-1-5
portmaster graphics/gpu-firmware-kmod@dcn_3_1_5
# OR
# portmaster graphics/gpu-firmware-amd-kmod
# Update /boot/modules with new saved amdgpu_dcn_3_1_5_dmcub_bin.ko
cp ~/amdgpu_dcn_3_1_5_dmcub_bin.ko /boot/modules/amdgpu_dcn_3_1_5_dmcub_bin.ko
kldload amdgpu
...

UPD:
You can try, without delete pkg. I think have worked:
Code:
cd /usr/ports/graphics/gpu-firmware-amd-kmod
make FLAVOR=dcn_3_1_5 patch
#copy new amdgpu/dcn_3_1_5_dmcub.bin
cp ~/amdgpu_dcn_3_1_5_dmcub.bin /usr/ports/graphics/gpu-firmware-amd-kmod/work-dcn_3_1_5/drm-kmod-firmware-20230625_8/amdgpukmsfw-files/dcn_3_1_5_dmcub.bin
make FLAVOR=dcn_3_1_5
# copy amdgpu_dcn_3_1_5_dmcub_bin.ko to /boot/modules/
cp /usr/ports/graphics/gpu-firmware-amd-kmod/work-dcn_3_1_5/stage/boot/modules/amdgpu_dcn_3_1_5_dmcub_bin.ko /boot/modules/amdgpu_dcn_3_1_5_dmcub_bin.ko
...
kldload amdgpu
...
 
I can confirm that following the above instructions worked wonders for me and my Ryzen 5 7600.
Great! I take it that you're mainly on -CURRENT because of these graphics issues. As you're using drm-61-kmod this might very well be an equally working solution on stable/14 and releng/14.2.

As this is now confirmed for two different zen 4 CPUs and the Partially revert "amdgpu: DMCUB updates for DCN 3.1.4 and 3.1.5" is from Wed, 5 Jul 2023, then, IMO, it should be reviewed (if that has not happened already) and evaluated if this can be integrated in FreeBSD ports.
 
I take it that you're mainly on -CURRENT
I'm actually on 14.2-RELEASE... that's where I did that patching. The FreeBSD installer for 14.2-RELEASE actually asked me if I want to install those AMDGPU modules from pkg. And now I know the answer is 'No', at least for my hardware, at least for now.

The patching that helped me so much - it is best done in /usr/ports, I'd think. I also checked the git history of that commit/revert update, and discovered that this DMCUB / DCN 3.1.4/3.1.5 module was not touched afterwards. Well, it should not be impossible to create a Raphael-flavored package for FreeBSD at this point!
1735339164603.png

(That's the Italian painter in whose honor AMD named this version of graphics tech!)
 
Just a Public Announcement:

BTW, just a heads up about downloading .bin files: Make sure they actually get downloaded as binary files! The correct URL for the DCM file in this conversation is:
https://git.kernel.org/pub/scm/linu...firmware.git/plain/amdgpu/dcn_3_1_5_dmcub.bin (note the 'plain' substring in the URL!).

If Konqueror (or another browser) doesn't show that it's downloading a binary, as shown in this screenshot, the file won't work!
 

Attachments

  • binary_download.png
    binary_download.png
    48 KB · Views: 376
I also faced the problem of supporting the new iGPU for AMD Ryzen 7 9700x.
After installing graphics/drm-61-kmod and graphics/gpu-firmware-kmod-amd, I load amdgpu.ko
The screen turned off, but the SSH system was available.

I tried to install different options gpu-firmware-kmod-amd, but this did not help.
After that, I installed all firmware files for all graphics card - installed graphics/gpu-firmware-kmod.
This also did not help. There were errors in the logs.

Code:
[drm ERROR :dc_dmub_srv_cmd_queue] Error queuing DMUB command: status=2
[drm ERROR :dc_dmub_srv_wait_idle] Error waiting for DMUB idle: status=3
By this error, I found a solution to the problem here issues/2666
I took the corrected file amdgpu/dcn_3_1_5_dmcub.bin here amdgpu/dcn_3_1_5_dmcub.bin

I compiled gpu-firmware-amd-kmod-dcn-3-1-5 with this "amdgpu/dcn_3_1_5_dmcub.bin". After that, everything worked fine.
Xorg.0.log (part)
Code:
[    21.145] (II) AMDGPU(0): glamor X acceleration enabled on AMD Radeon Graphics (radeonsi, raphael_mendocino, LLVM 15.0.7, DRM 3.49, 14.2-RELEASE)
[    21.145] (II) AMDGPU(0): glamor detected, initialising EGL layer.
[    21.145] (==) AMDGPU(0): TearFree property default: auto
[    21.145] (==) AMDGPU(0): VariableRefresh: disabled
[    21.145] (==) AMDGPU(0): AsyncFlipSecondaries: disabled
[    21.145] (II) AMDGPU(0): KMS Pageflipping: enabled
[    21.145] (II) AMDGPU(0): Output HDMI-A-0 has no monitor section
[    21.147] (II) AMDGPU(0): Output DisplayPort-0 has no monitor section
[    21.147] (II) AMDGPU(0): Output DisplayPort-1 has no monitor section
[    21.160] (II) AMDGPU(0): EDID for output HDMI-A-0
[    21.161] (II) AMDGPU(0): EDID for output DisplayPort-0
[    21.161] (II) AMDGPU(0): Year: 2024  Week: 14
[    21.161] (II) AMDGPU(0): EDID Version: 1.4
[    21.161] (II) AMDGPU(0): Digital Display Input
[    21.161] (II) AMDGPU(0): 10 bits per channel
[    21.161] (II) AMDGPU(0): Digital interface is DisplayPort
[    21.161] (II) AMDGPU(0): Max Image Size [cm]: horiz.: 60  vert.: 34
[    21.161] (II) AMDGPU(0): Gamma: 2.20
[    21.162] (II) AMDGPU(0): DPMS capabilities: Off
[    21.162] (II) AMDGPU(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 YCrCb 4:2:2
[    21.162] (II) AMDGPU(0): First detailed timing is preferred mode
[    21.162] (II) AMDGPU(0): Preferred mode is native pixel format and refresh rate
[    21.162] (II) AMDGPU(0): Display is continuous-frequency
[    21.162] (II) AMDGPU(0): redX: 0.666 redY: 0.328   greenX: 0.277 greenY: 0.665
[    21.162] (II) AMDGPU(0): blueX: 0.146 blueY: 0.050   whiteX: 0.313 whiteY: 0.329
[    21.162] (II) AMDGPU(0): Supported established timings:
[    21.162] (II) AMDGPU(0): 720x400@70Hz
[    21.162] (II) AMDGPU(0): 640x480@60Hz
[    21.162] (II) AMDGPU(0): 640x480@67Hz
[    21.162] (II) AMDGPU(0): 640x480@75Hz
[    21.162] (II) AMDGPU(0): 800x600@56Hz
[    21.162] (II) AMDGPU(0): 800x600@60Hz
[    21.162] (II) AMDGPU(0): 800x600@75Hz
[    21.162] (II) AMDGPU(0): 1024x768@60Hz
[    21.162] (II) AMDGPU(0): 1024x768@70Hz
[    21.162] (II) AMDGPU(0): 1024x768@75Hz
[    21.162] (II) AMDGPU(0): 1280x1024@75Hz
[    21.162] (II) AMDGPU(0): Manufacturer's mask: 0
[    21.162] (II) AMDGPU(0): Supported standard timings:
[    21.162] (II) AMDGPU(0): #0: hsize: 1152  vsize 864  refresh: 75  vid: 20337
[    21.162] (II) AMDGPU(0): #1: hsize: 1280  vsize 1024  refresh: 60  vid: 32897
[    21.162] (II) AMDGPU(0): #2: hsize: 1280  vsize 800  refresh: 60  vid: 129
[    21.162] (II) AMDGPU(0): #3: hsize: 1280  vsize 720  refresh: 60  vid: 49281
[    21.162] (II) AMDGPU(0): #4: hsize: 1440  vsize 900  refresh: 60  vid: 149
[    21.162] (II) AMDGPU(0): #5: hsize: 1680  vsize 1050  refresh: 60  vid: 179
[    21.162] (II) AMDGPU(0): Supported detailed timing:
[    21.162] (II) AMDGPU(0): clock: 241.5 MHz   Image Size:  597 x 336 mm
[    21.162] (II) AMDGPU(0): h_active: 2560  h_sync: 2608  h_sync_end 2640 h_blank_end 2720 h_border: 0
[ 21.162] (II) AMDGPU(0): v_active: 1440 v_sync: 1443 v_sync_end 1448 v_blanking: 1481 v_border: 0

To upgrade gpu-firmware-amd-kmod-dcn-3-1-5, you need:
Code:
pkg delete gpu-firmware-amd-kmod-dcn-3-1-5-20230625_2
cd /usr/ports/graphics/gpu-firmware-amd-kmod
make FLAVOR=dcn_3_1_5 patch
#copy new amdgpu/dcn_3_1_5_dmcub.bin
cp ~/amdgpu_dcn_3_1_5_dmcub.bin /usr/ports/graphics/gpu-firmware-amd-kmod/work-dcn_3_1_5/drm-kmod-firmware-20230625_8/amdgpukmsfw-files/dcn_3_1_5_dmcub.bin
make FLAVOR=dcn_3_1_5 install
# I am have installation error, but need only amdgpu_dcn_3_1_5_dmcub_bin.ko. Save to somewhere.
cp /usr/ports/graphics/gpu-firmware-amd-kmod/work-dcn_3_1_5/stage/boot/modules/amdgpu_dcn_3_1_5_dmcub_bin.ko ~/
# Reinstall gpu-firmware-amd-kmod-dcn-3-1-5
portmaster graphics/gpu-firmware-kmod@dcn_3_1_5
# OR
# portmaster graphics/gpu-firmware-amd-kmod
# Update /boot/modules with new saved amdgpu_dcn_3_1_5_dmcub_bin.ko
cp ~/amdgpu_dcn_3_1_5_dmcub_bin.ko /boot/modules/amdgpu_dcn_3_1_5_dmcub_bin.ko
kldload amdgpu
...

UPD:
You can try, without delete pkg. I think have worked:
Code:
cd /usr/ports/graphics/gpu-firmware-amd-kmod
make FLAVOR=dcn_3_1_5 patch
#copy new amdgpu/dcn_3_1_5_dmcub.bin
cp ~/amdgpu_dcn_3_1_5_dmcub.bin /usr/ports/graphics/gpu-firmware-amd-kmod/work-dcn_3_1_5/drm-kmod-firmware-20230625_8/amdgpukmsfw-files/dcn_3_1_5_dmcub.bin
make FLAVOR=dcn_3_1_5
# copy amdgpu_dcn_3_1_5_dmcub_bin.ko to /boot/modules/
cp /usr/ports/graphics/gpu-firmware-amd-kmod/work-dcn_3_1_5/stage/boot/modules/amdgpu_dcn_3_1_5_dmcub_bin.ko /boot/modules/amdgpu_dcn_3_1_5_dmcub_bin.ko
...
kldload amdgpu
...
Question: turns out my AMD PRO W5500 :

Graphics/Compute: 10.1.1
Shader ISA: GFX10.1 (gfx1012)
Display Core Next: 2.0.0
Video Core Next: 2.0.2
System DMA: 5.0.2
Platform Security Processor: 11.0.5

Does newer versions covers older versions or i have to get specific ones ? My issue is blank screen on 61 , but very laggy, slow, artifacts on amd-kmod.
 
Question: turns out my AMD PRO W5500 :
Code:
Graphics/Compute: 10.1.1
Shader ISA: GFX10.1 (gfx1012)
Display Core Next: 2.0.0
Video Core Next: 2.0.2
System DMA: 5.0.2
Platform Security Processor: 11.0.5
Does newer versions covers older versions or i have to get specific ones ? My issue is blank screen on 61 , but very laggy, slow, artifacts on amd-kmod.
I think you do have to get specific stuff, and to pay attention.

Initially, I thought that just putting together appropriately named/versioned modules is enough - it wasn't.

I had no idea that this was due to the simple fact that the module I needed - a buggy version of it was packaged in graphics/gpu-firmware-amd-kmod. If not for this thread, I'd probably be still stuck with llvmpipe...
 
I think you do have to get specific stuff, and to pay attention.

Initially, I thought that just putting together appropriately named/versioned modules is enough - it wasn't.

I had no idea that this was due to the simple fact that the module I needed - a buggy version of it was packaged in graphics/gpu-firmware-amd-kmod. If not for this thread, I'd probably be still stuck with llvmpipe...
Yeah you right, version 2 is different from version 3 according to AMD`s tech pages.
 
Well, 6 months later, it looks like the FreeBSD driver did get fixed. Right now, I grabbed a fresh copy of the ports - and it worked without needing to resort to the hack/workaround described in this thread.

I'm still glad this info was available back then, and still grateful for this thread's existence!

But now, if someone has a Ryzen 7000 series with Raphael iGPU, they can rest easy knowing that merely compiling graphics/drm-kmod (using a fresh copy of the ports tree) will produce a workable amdgpu driver.
 
So is 780M supported, or not? I tried it on 15.0-RC2 and when I run glmark2 it crashes immediatelly. Tried a couple of amdgpu options for power management but without any luck. Simply does not work.
 
So is 780M supported, or not? I tried it on 15.0-RC2 and when I run glmark2 it crashes immediatelly. Tried a couple of amdgpu options for power management but without any luck. Simply does not work.
It's supported, to the extent that you can run a graphical desktop environment on it. Running a benchmark that actually stresses the GPU - do that at your own risk, because nobody can guarantee that amdgpu will not crash when running benchmarking. If you succeed, please blog about it, and share links here!
 
It's supported, to the extent that you can run a graphical desktop environment on it. Running a benchmark that actually stresses the GPU - do that at your own risk, because nobody can guarantee that amdgpu will not crash when running benchmarking. If you succeed, please blog about it, and share links here!
It crashes even during standard Firefox/terminal workflow. Benchmark just makes things faster. I'm quite sad as I counted on 15.0 for 780M based laptops. Nvidia still much safer bet.
 
I tried 15.0-RC2 (with "latest" packages) on a Dell Pro Tower QCT1255 with a Ryzen 7 PRO 8700G (780M) a few days ago.

With a single 4K screen attached, it started and seemed to work fine. But then I made an xterm full-screen and started a command in it that generated tons of scrolling output. Ten seconds later--BOOM--X crashed. 'seems like it's not ready for normal use quite yet.
 
I tried 15.0-RC2 (with "latest" packages) on a Dell Pro Tower QCT1255 with a Ryzen 7 PRO 8700G (780M) a few days ago.

With a single 4K screen attached, it started and seemed to work fine. But then I made an xterm full-screen and started a command in it that generated tons of scrolling output. Ten seconds later--BOOM--X crashed. 'seems like it's not ready for normal use quite yet.
Agreed, it's not ready yet even for routine desktop work. Does anybody know whether it may be resolved any time soon?
 
Back
Top