# Trouble with drm-fbsd13-kmod pkg since 13.1-RELEASE



## Deleted member 67862 (May 23, 2022)

In the most recent release, I had trouble getting my AMDGPU firmware to work because after installing graphics/drm-fbsd13-kmod via `pkg` and adding it to rc.conf, the init system would freeze on "Loading kernel modules". It's frustrating since I just got a shiny Dell monitor that stopped displaying the bootup sequence (BIOS, bootloader, and init) until my graphics driver is loaded, so to see what's going on and launch into single-user mode I have to plug in my old one.

I got past the "loading kernel modules" part by compiling drm-fbsd13-kmod from ports, but I'm not sure what's different since I was using the latest branch of packages. I currently have drm-fbsd13-kmod locked and everything is well, but it'd be nice to figure out what's going on. I couldn't find any bug reports on this.


----------



## monwarez (May 23, 2022)

The pkg repository are only build with the oldest supported release branch (ie: 12.3 and 13.0 at the moment), so after a minor upgrade there is a 3 month period where some kernel based package will not work when there is an ABI incompatibility between minor release. Which can be the case with drm-kmod. Note that since you are using 13.1-RELEASE, you could use the newer graphics/drm-510-kmod or if it does not work fallback to graphics/drm-54-kmod


----------



## zirias@ (May 23, 2022)

My guess would be: no firmware installed. Before the firmware package was split up into individual packages, there was a dependency, so the one package with all firmwares was installed automatically.

You can start by installing `gpu-firmware-kmod` (which pulls in each and every firmware) and then read here:








						gpu-firmware-kmod split into individual packages
					

Just noticed this happened on the latest update of graphics/gpu-firmware-kmod. No need to change anything, the "main" package just depends on all firmware packages – but it's nice there's the possibility now to only install the firmware you actually need :cool:: save a bit of disk space and have...




					forums.freebsd.org


----------



## priyadarshan (May 23, 2022)

monwarez said:


> Note that since you are using 13.1-RELEASE, you could use the newer graphics/drm-510-kmod or if it does not work fallback to graphics/drm-54-kmod



Today I started experiencing the exact same behaviour, with a Intel Tiger Lake CPU on 13.1-RELEASE.

Unfortunately graphics/drm-510-kmod or graphics/drm-54-kmod are still not available via `pkg`.


----------



## grahamperrin@ (May 23, 2022)

hunter0one said:


> … freeze on "Loading kernel modules". …



When did you last run `pkg upgrade`?

Also: 

`sysrc kld_list`

`grep -v \# /boot/loader.conf | sort`


----------



## Deleted member 67862 (May 23, 2022)

grahamperrin said:


> When did you last run `pkg upgrade`?
> 
> Also:
> 
> ...


Yesterday, but since I have it locked it won't be upgraded. According to Freshports it hasn't been updated since May 8th.


`sysrc kld_list` gives `amdgpu`.

/boot/loader.conf:

```
loader_logo="beastie"
security.bsd.allow_destructive_dtrace=0
```


----------



## grahamperrin@ (May 24, 2022)

priyadarshan said:


> … graphics/drm-54-kmod … not available via `pkg`.



It _is_ in latest for the three tier 1 platforms: <https://www.freshports.org/graphics/drm-54-kmod/#packages>.


----------



## priyadarshan (May 24, 2022)

grahamperrin said:


> It _is_ in latest for the three tier 1 platforms: <https://www.freshports.org/graphics/drm-54-kmod/#packages>.



Thank you for pointing the platforms section out.  I was trying to install `drm-510-mod` which is not available for the `FreeBSD:13:amd64` platform.

graphics/drm-54-kmod installs fine, but it freezes the system at boot, at line "Loading kernel modules".

Am I correct in assuming the gpu associated with Intel Tiger Lake CPU is not dealt yet by `drm-54-kmod`?

Does that mean one needs to wait for RELEASE-13.2 to have `drm-510-mod` available?


----------



## priyadarshan (May 24, 2022)

My apologies to OP, it was not my intention to steal the thread. After all, he was asking about issues with AMDGPU firmware, not Intel. I have also posted here, since it seems related:

Thread iris-xe-graphics-on-13-1-release.85185/


----------



## Deleted member 67862 (May 24, 2022)

It's alright, I'm just going to keep it locked until we figure it out. I don't even have that graphics/drm-510-kmod in the latest branch.


----------



## grahamperrin@ (May 24, 2022)

hunter0one said:


> … I don't even have that graphics/drm-510-kmod in the latest branch.



<https://gitter.im/FreeBSDDesktop/Lobby/archives/2022/04/28?at=626ac8b8eaf3267f8537088e>



> … there will be no package of 5.10 for 13.1 as long as 13.0 is supported …


----------



## Deleted member 67862 (Jun 19, 2022)

Im having to revive this issue because on my most recent install it's occuring regardless of which port, whethers its drm-fbsd13-kmod, drm-54-kmod, or drm-510-kmod, that I build. Ive built all of the aforementioned and it freezes on loading kernel modules.


----------



## priyadarshan (Jun 19, 2022)

Recently I was able to get FreeBSD 13.1 with KDE running on latest AMD Ryzen CPU.


----------



## Deleted member 67862 (Jun 19, 2022)

I have an RX 580, so green sardine didnt apply to me. I did all flavors, and it seems to have worked, I assume my hardware is being probed as polaris which sounds right. I get an error about polaris being unable to be loaded. Because of this failure X still doesnt work.

EDIT: Turns out if you do not specify a flavor, no modules are installed. By specifying polaris10 this installed the needed modules and it now works. Thanks a ton!


----------



## priyadarshan (Jun 19, 2022)

hunter0one said:


> EDIT: Turns out if you do not specify a flavor, no modules are installed. By specifying polaris10 this installed the needed modules and it now works. Thanks a ton!



Glad to hear that.


----------



## First_Law_of_Unix (Aug 14, 2022)

monwarez said:


> The pkg repository are only build with the oldest supported release branch (ie: 12.3 and 13.0 at the moment), so after a minor upgrade there is a 3 month period where some kernel based package will not work when there is an ABI incompatibility between minor release. Which can be the case with drm-kmod. Note that since you are using 13.1-RELEASE, you could use the newer graphics/drm-510-kmod or if it does not work fallback to graphics/drm-54-kmod





zirias@ said:


> My guess would be: no firmware installed. Before the firmware package was split up into individual packages, there was a dependency, so the one package with all firmwares was installed automatically.
> 
> You can start by installing `gpu-firmware-kmod` (which pulls in each and every firmware) and then read here:
> 
> ...



Thank you, I was finally able to get my AMD RX 580 working at 4K resolution on my Sony TV on FreeBSD 13.1

I installed:


```
cd /usr/ports/graphics/drm-510-kmod/ && make install clean
```

and


```
gpu-firmware-kmod
```


----------



## blackhaz (Aug 14, 2022)

And people still continue to blow up on this mine, many years after... And there is no end in sight of this. I think drm-kmod needs to be separated from the packages or ports completely into some special "smart" repository that can take care of all these nuances. Obviously, pkg and ports are the wrong tools to handle this subsystem.


----------



## zirias@ (Aug 14, 2022)

blackhaz Not really. If you just install drm-kmod, you get gpu-firmware-kmod as a dependency, so everything is in place. There was a bug where this dependency was missing, but it was fixed.

With the split of firmware into individual packages, you now have the _option_ to manually install only what's really necessary for your hardware.


----------



## First_Law_of_Unix (Aug 15, 2022)

I originally installed:

```
pkg install drm-kmod
```
As mentioned in:


			Graphics - FreeBSD Wiki
		


However this did not do anything for me and had to uninstall the driver which it installed. 
(Maybe because I never installed the firmware?)

I then followed the guide from post #2 and #3 of this thread, which solved the issue.
I am using FreeBSD 13.1, seems like there are no RX580 drivers for it officially from pkg and had to install it via ports tree.


----------



## zirias@ (Aug 15, 2022)

First_Law_of_Unix as I said above, `pkg install drm-kmod` is _supposed_ to just install "everything" (through dependencies). You will have lots of firmwares installed you'll never need, but it will "just work".

This was previously broken because of errors in dependencies. First the dependency on firmware was missing completely, which was fixed in commit 934122ae6e, then the version was wrong, which was fixed in commit 9bb6e171870.

But in a nutshell, this was a bug that was fixed, and this command will continue to work (again). You only need to install a specific `drm-*-kmod` package and specific firmware packages manually if you want to _only_ install what's required for your hardware.


----------



## First_Law_of_Unix (Aug 17, 2022)

zirias So are you saying that everything are fixed as of now? Because I tried: 
	
	



```
pkg install drm-kmod
```
 on Sunday and did not work for me on FreeBSD 13.1 fresh install.

From the commit links you have provided shows it was fixed on May 2022 for both links. I'm not experienced but do not mind to install all drivers so long my driver is included, I don't expect AMD GPU drivers to consume more than 1GB of space.


----------



## zirias@ (Aug 17, 2022)

First_Law_of_Unix said:


> did not work for me


This is like my "favorite" error description....

You wrote earlier you followed advice in a post on this thread that hints about a _newer_ version of the drivers. Maybe you own a GPU that needs these newer versions. Then, that's completely unrelated to the (meanwhile fixed) problem of missing firmware after just installing the _default_ meta package.


----------



## First_Law_of_Unix (Aug 18, 2022)

Alright, so I guess all is needed then is 
	
	



```
gpu-firmware-kmod
```
 after installing 
	
	



```
pkg install drm-kmod
```
.
I have an AMD Radeon RX 580.


----------

