sienna_cichlid driver

Discussion: Last year, I got a water-cooled RX 6900 XT GPU (Yeah, worst possible time to get it, at height of GPU shortage, but deed is done 😅 ). Spent some time mating it to an aftermarket cooling system, and it's finally working under Windows, and the hardware is fine, I can use the latest AMD Adrenalin to tell the GPU to use less power, change the backlight to orange (Via Gigabyte's RGB Fusion 2.0), etc.

Now, the issue is trying to get it to work under FreeBSD... After doing some homework, I discovered that my GPU requires the sienna_cichlid driver... which in itself requires the FreeBSD kernel to be at 13.1. So, I upgraded from 13.0 to 13.1 via the freebsd-update(8) as described in the Handbook... That upgrade went off without a hitch, smooth as butter. Then I compiled the port: graphics/drm-510-kmod (under /usr/ports, of course) on Sept. 14, 2022 (Just a day after the update to drm_v5.10.113_7). Edited the /etc/rc.conf file to load /boot/modules/amdgpu.ko... booted my rig... and oh, man...

Driver loads, screen flickers, command line starts showing higher resolution - but upon starting SDDM, the display just freezes, and shows an immovable mouse pointer in the middle. When I SSH into the rig, and run /usr/local/bin/systemsettings5, I can see that the graphics driver is llvmpipe...

Updating to drm_v5.10.113_8 (from Oct. 1, 2022) may not make much sense... because graphics/gpu-firmware-amd-kmod has not been updated since Sept. 7.

FWIW, on the rig, I have Plasma 5.20 and Frameworks 5.77... the reason for that is that I've got a different project going (upgrading KDE independently of everything else), it stalled partly thanks to the GPU driver issues... 😅

So, after reading all that, any ideas on what I can do?
 
Update: Got it working (Screenshot coming later). Plasma 5.24 / Frameworks 5.98, drm_info shows the correct GPU. This was accomplished by doing the following:
  1. installing 13.1 from scratch.
  2. Get a ports snapshot from Oct. 7, 2022, 5 pm.
  3. Install Xorg via the metaport x11/xorg - this will help install ALL the components needed, and saves the time for hunting down errors because something is missing.
  4. Install graphics/drm-510-kmod - this will pull in the necessary firmware files, including the sienna_cichlid driver that I need.
  5. Install the graphics/gpu-firmware-amd-kmod
  6. Find all 12 parts of the sienna_cichlid driver under the port's graphics/gpu-firmware-amd-kmod/work/ directory, and run make && make install on each of them.
    1. The reason for this step - neither graphics/drm-510-kmod nor graphics/gpu-firmware-amd-kmod put the .ko driver files into /boot/modules/... Go figga.
  7. Install graphics/drm-kmod. The amdgpu.ko from that port will be the one to find all 12 parts of the sienna_cichlid driver and load them properly.
  8. Specify /boot/modules/amdgpu.ko in /etc/rc.conf as per https://wiki.freebsd.org/Graphics ...
Now that I think about it, steps 4-7 probably could have worked on my frankenstein setup described in the previous post... if done as described in this post... 😅

This is not quite the standard way to do it, but as things stand now, the ports in question don't finish the installation process correctly...

Still need to use some Windows utils to tell my GPU to consume less power.
 
Promised screenies:
1666026701051.jpeg

1666026770283.png

:p
 
Update: Got it working (Screenshot coming later). Plasma 5.24 / Frameworks 5.98, drm_info shows the correct GPU. This was accomplished by doing the following:
  1. installing 13.1 from scratch.
  2. Get a ports snapshot from Oct. 7, 2022, 5 pm.
  3. Install Xorg via the metaport x11/xorg - this will help install ALL the components needed, and saves the time for hunting down errors because something is missing.
  4. Install graphics/drm-510-kmod - this will pull in the necessary firmware files, including the sienna_cichlid driver that I need.
  5. Install the graphics/gpu-firmware-amd-kmod
  6. Find all 12 parts of the sienna_cichlid driver under the port's graphics/gpu-firmware-amd-kmod/work/ directory, and run make && make install on each of them.
    1. The reason for this step - neither graphics/drm-510-kmod nor graphics/gpu-firmware-amd-kmod put the .ko driver files into /boot/modules/... Go figga.
  7. Install graphics/drm-kmod. The amdgpu.ko from that port will be the one to find all 12 parts of the sienna_cichlid driver and load them properly.
  8. Specify /boot/modules/amdgpu.ko in /etc/rc.conf as per https://wiki.freebsd.org/Graphics ...
Now that I think about it, steps 4-7 probably could have worked on my frankenstein setup described in the previous post... if done as described in this post... 😅

This is not quite the standard way to do it, but as things stand now, the ports in question don't finish the installation process correctly...

Still need to use some Windows utils to tell my GPU to consume less power.
Please report 6 to the port's maintainer. Perhaps the (new) firmware was overlooked by the maintainer(s) after it was added upstream.
 
Please report 6 to the port's maintainer. Perhaps the (new) firmware was overlooked by the maintainer(s) after it was added upstream.
4. Install graphics/drm-510-kmod - this will pull in the necessary firmware files, including the sienna_cichlid driver that I need.

6. Find all 12 parts of the sienna_cichlid driver under the port's graphics/gpu-firmware-amd-kmod/work/ directory, and run make && make install on each of them.
  1. The reason for this step - neither graphics/drm-510-kmod nor graphics/gpu-firmware-amd-kmod put the .ko driver files into /boot/modules/... Go figga.
graphics/drm-510-kmod has no dependency on graphics/gpu-firmware-amd-kmod. If you run make run-depends-list there is nothing returned. One must install the firmware separately.

graphics/gpu-firmware-gpu-amd: Add new port
Code:
This is a port with the firmware for all and only amd GPUs.
Each generation is a flavor so one can just install the needed
firmware.

Same when installing graphics/drm-510-kmod from package, no dependency is pulled in. The firmware must be installed separately after flavor (gpu-firmware-amd-kmod-<flavor>).

graphics/gpu-firmware-amd-kmod has 33 flavors ( make -V FLAVORS). Without specifying the flavor the first flavor on the list (banks) will be build.

No need to descent in the work directory, run make install clean FLAVOR=sienna_cichlid . This will install all kernel modules under /boot/modules.

7. Install graphics/drm-kmod. The amdgpu.ko from that port will be the one to find all 12 parts of the sienna_cichlid driver and load them properly.
This step isn't necessary. graphics/drm-kmod is a META port with no driver. The amdgpu.ko driver is provided by graphics/drm-510-kmod.
Code:
# pkg which /boot/modules/amdgpu.ko
/boot/modules/amdgpu.ko was installed by package drm-510-kmod-5.10.113_7

# cd /usr/ports/graphics/drm-kmod

# make run-depends-list
/usr/ports/graphics/gpu-firmware-kmod
/usr/ports/graphics/drm-510-kmod
Both dependencies are already installed. In case of graphics/gpu-firmware-kmod this would pull in besides amd (all 33 flavors) also intel and radeon firmware.
Code:
# cd /usr/ports/graphics/gpu-firmware-kmod

# make run-depends-list
/usr/ports/graphics/gpu-firmware-radeon-kmod
/usr/ports/graphics/gpu-firmware-intel-kmod
/usr/ports/graphics/gpu-firmware-amd-kmod
 
I'm trying to fresh install 13.1 and I've done everything above and my system looses signal when it tries to load the driver.
I have a Powercolor RX 6800 Fighter
drm-510-kmod-5.10.113_8 is what gets installed as of this writing.
graphics/gpu-firmware-amd-kmod-sienna_cichlid
I've tried installing both of the above from ports and pkg with no luck.
sysrc kld_list+=amdgpu
X11/xorg is installed as well.
Reboot and it looses signal
Am I missing something?
 
Am I missing something?
This notice seems relevant to your problem:
If UEFI boot results in a conflict between a driver and the EFI frame buffer, you can add this line to /boot/loader.conf to disable the buffer:
  • hw.syscons.disable=1
With the buffer disabled, console output will not appear until the driver loads. https://github.com/FreeBSDDesktop/DEPRECATED-freebsd-base-graphics/issues/170 explains.
(https://wiki.freebsd.org/Graphics)

Alternatively, you can try booting in legacy BIOS mode, if your motherboard supports it.
 
Both dependencies are already installed. In case of graphics/gpu-firmware-kmod this would pull in besides amd (all 33 flavors) also intel and radeon firmware.
Thing is, thanks to sloppy packaging, they don't do that.

An easy way to verify: (Yes, do run updatedb as root, that's key to the rest of the verification process)
Code:
# updatedb
# locate sienna_cichlid | grep ko
# locate amdgpu.ko

amdgpu.ko obviously needs to be found in /boot/modules/, but all 12 parts of sienna_cichlid also need to be found where amdgpu.ko wants to look.
 
astyle I don't quite understand how to "specify /boot/modules/amdgpu.ko" in /etc/rc.conf. The Wiki doesn't really help.
Are you serious??? The wiki outright gives you the command to do that:
1688136176267.png


I personally don't like the sysrc command, so I use editors/nano to add the following line: kld_list="/boot/modules/amdgpu.ko"... And yes, you have to be root to do that.
 
I've tried doing it both ways, but it still refuses to work... I'm on 13.2... Does this driver only work on 13.1?
A lot of different ports seem to be broken on 13.2-RELEASE... and 'broken' is just an umbrella term I'm using for sake of brevity. There are problems with compiling the packages for various reasons.

graphics/drm-kmod is by now on v. 5.15 (this thread talks about v. 5.10 on 13.1-RELEASE)...

TBH, I have no idea if the steps I outlined earlier in the thread will work on 13.2-RELEASE.

A few things I can suggest:
  • Read the Handbook.
  • Try to follow the steps exactly... the order of steps really matters. If you do stuff out of order, don't be surprised if things don't work.
  • Do pay attention to versions and tags of stuff in use. Stick to -RELEASE-tagged FreeBSD versions. Generally, it's better to use more recent stuff.
  • There's a difference between ports and packages, and yes, it's kind of important to understand it. Mixing the two is not a good idea if the versions are too far apart. BTW, I personally always stick to ports.
In your case, I'd suggest repeating the steps I outlined in post #2 of this thread. But do adjust things: Like in step 1, do 13.2-RELEASE, in step 2, fetch the latest tarball (and don't do packages, just compile everything). Yeah, that will take a LONG time. In step 4, drm-kmod will need to be at version 5.15 (as opposed to 5.10 so far in this thread).

And, take some good notes. If a step doesn't work, retrace back up, and troubleshoot. :)
 
Dunno, I'm on 13.1-RELEASE right now, don't see a need for myself to upgrade, and I'm watching complaints about port compilation failures on 13.2-RELEASE fly past my screen... 🍿 and I'm not a dev, just a user...
 
Dunno, I'm on 13.1-RELEASE right now, don't see a need for myself to upgrade, and I'm watching complaints about port compilation failures on 13.2-RELEASE fly past my screen... 🍿 and I'm not a dev, just a user...
Ugh tho I followed what you said to do as close as I could and I still can't get Xorg working right....
 
I know it is risky since module errors may prevent the system from booting but echo amdgpu_load="YES" >> /boot/loader.conf followed by reboot may improve stability due to early stage module loading. At least Nvidia recommends this procedure for their drivers (helps with Wayland afair).
 
I actually wrote a guide about this last year (after I noticed astyle got his card working. Thanks for that astyle, your success was the reason I even purchased my AMD card specifically for a FreeBSD main desktop computer I was building back then). At the time it was 13.1-RELEASE. I recently re-installed FreeBSD on it after having a different OS on it and went with 13.2-RELEASE (of course ;D). I noticed that after I followed my own steps, the desktop environment wasn't starting up and was complaining about specifying the card / framebuffer / complaining about modesetting. I probably had done this before but maybe I forgot to document this step. Essentially, I just had to add a new `00_video.conf` into my `/usr/local/etc/X11/xorg.conf.d/` which had the PCI device for the dedicated card, since my integrated raphael card on my AMD Ryzen 9 7950X isn't supported on FreeBSD (at least not with modesetting, I'm not sure about using the 'xf86-*' drivers since I haven't tested that, I also didn't test with the generic vesa driver but that might work if I needed some sort of output). I've updated my guide here and you can also see my desktop's screenshot running with the card on 13.2-RELEASE.

I hope this helps!

weshly-Screenshot_20230702_132332.png
 
I also didn't test with the generic vesa driver but that might work if I needed some sort of output)
Just a note the VESA driver is only for LegacyBIOS install. For EFI the barebones is scfb.
Both are included in Xorg meta install.
Nice because we have a basic video driver for either. No configuration necessary.
 
Raphael graphics are not supported yet... if you look at pkg-plist for graphics/gpu-firmware-amd-kmod, and look for the raphael string, it's not there.

If you find the raphael string, that's how you know the support for Raphael graphics is even there for FreeBSD. Try looking for dimgrey cavefish (RX 6600). It will be there.

YMMV with scfb... when I tried with Ryzen 5 7600, scfb didn't work for me.
 
So thanks for this, I managed to get my 6750XT Navi_Flounder running under 14 current with drm515. However, Blender is laggy and doesn't look like it's working with acceleration. Running 3d games however runs fast with acceleration. Can anyone confirm this issue as well? Just trying to spin a cube around in Blender lags /stutters.
 
Back
Top