Solved How to install and load AMD drivers for RX 580 on stable 12.2?

I did a pkg install drm-kmod and loaded amdgpu kernel module, but it causes kernel panic. In theory this should be the driver for my Sapphire RX 580, but it does not work. What did I do wrong?
 
Userspace ABI doesn't change with minor releases. But the kernel (inside) DOES change. This is a kernel driver/module.
Agree. I have this setup working (only RX 570, but this is almost identical). Did not even expect the module to work after upgrading from 12.1 to 12.2. This module should be rebuilt.
The same applies to other kernel modules, OpenZFS for example. The safest way is to rebuild them all (additional kernel modules).
 
In case anyone needs an explanation: This is NOT a "problem with the binary" but a consequence/shortcoming of the fact package repositories are only organized by (userspace) ABI.

As long as both 12.1 and 12.2 are supported releases, packages containing kernel modules can only fit ONE of them. Sticking with 12.1 makes sense, so it doesn't affect users "by surprise".

For users of 12.2, this means you have to build all ports/packages containing kernel modules yourself until EOL of 12.1.
 
Okay, I took a photo of it, not sure if this means anything to anybody. I'll try to build it and if that does not work, then with 12.1.
DSCN9584b.jpg
 
This picture doesn't help at all. Please read my post above. If you don't understand something, feel free to ask.
In a nutshell: build the port on your machine and it will work.
 
This picture doesn't help at all. Please read my post above. If you don't understand something, feel free to ask.
In a nutshell: build the port on your machine and it will work.
It asks for kernel source files, which I don't have. Are they on github? I am not sure if it is a good idea to mix ports + make and pkg binaries.
 
In case anyone needs an explanation: This is NOT a "problem with the binary" but a consequence/shortcoming of the fact package repositories are only organized by (userspace) ABI.

As long as both 12.1 and 12.2 are supported releases, packages containing kernel modules can only fit ONE of them. Sticking with 12.1 makes sense, so it doesn't affect users "by surprise".

For users of 12.2, this means you have to build all ports/packages containing kernel modules yourself until EOL of 12.1.
Installing 12.1 is not an option either. 12.1 RELEASE does not support NKRO keyboards as 12.1 STABLE did, and I don't find any option to download an old 12.1 STABLE from the server.
 
It asks for kernel source files, which I don't have.
Then how are you keeping your 12-STABLE up to date? The only way to update -STABLE is by compiling from source.
Does it matter that I installed 12.2 stable instead of release?
Yes, it matters. It should be /base/stable/12 for 12-STABLE.

Note that -STABLE is a development version. A supported development version as opposed to -CURRENT, which is an unsupported development version. I suggest you stick to a -RELEASE version, -RELEASE versions can be easily updated/upgraded using freebsd-update(8). Both -STABLE and -CURRENT can only be updated/upgraded by compiling from source.

The moniker -STABLE has nothing to do with its fitness to run, it refers to the ABI that's stable (at least it should be).
 
Then how are you keeping your 12-STABLE up to date? The only way to update -STABLE is by compiling from source.

Yes, it matters. It should be /base/stable/12 for 12-STABLE.

Note that -STABLE is a development version. A supported development version as opposed to -CURRENT, which is an unsupported development version. I suggest you stick to a -RELEASE version, -RELEASE versions can be easily updated/upgraded using freebsd-update(8). Both -STABLE and -CURRENT can only be updated/upgraded by compiling from source.

The moniker -STABLE has nothing to do with its fitness to run, it refers to the ABI that's stable (at least it should be).
I guess you missed the part where I wrote that RELASE does not support my NKRO keyboard and STABLE does. I tried with releng, it did not work. I don't have another half hour today for this. I'll continue tomorrow.
 
Ok in theory this is necessary for the keyboard: https://github.com/wulf7/iichid I am not sure why the 12.1-RELEASE does not contain it when the 12.1-STABLE did. So if it is possible to add this to the 12.1-RELEASE somehow, then I could go with it instead of using the 12.2-STABLE.
 
Ok, I tried with 12.2-RELEASE. It turned out it has the driver for NKRO keyboards by default, so I did not need to install anything from that perspective. I did pkg install drm-kmod and sysrc kld_list+="amdgpu". I got the same kernel panic as previously when loading the kernel module. I can try to build it, but I don't think it will work.
 
Ok now DID you read the replies you got on this thread or not? Seriously. You were told multiple times that right now, for 12.2, you HAVE to build ports with kernel modules yourself. I also gave an explanation why this is the case.
 
Ok now DID you read the replies you got on this thread or not? Seriously. You were told multiple times that right now, for 12.2, you HAVE to build ports with kernel modules yourself. I also gave an explanation why this is the case.
Now that I read back, that's why I wanted to try it with 12.1-RELEASE and the NKRO keyboard driver instead of 12.2-RELEASE as you suggested.
 
Why? What's the huge problem with compiling ONE port (I assume it's the only one you need with a kernel module) yourself? This will only be necessary until EOL of 12.1!
 
Why? What's the huge problem with compiling ONE port (I assume it's the only one you need with a kernel module) yourself? This will only be necessary until EOL of 12.1!
I don't want to mix pkg and ports if not necessary. But I think it will be, because the keyboard driver does not seem to work on 12.1-RELEASE. But that is a different topic. Now I managed to install the amdgpu driver with pkg on 12.1-RELEASE. First it wrote something like "ring 10 error". After that I found that adding "hw.syscons.disable" to the "boot/loader.conf" fixes this in theory, so I tried it out. I got some weird artifacts at boot, but after that I got higher resolution in console, so in theory it works. I cannot make it work with xorg though, it writes that "no screen" when I try "startx" even though I added a config file for a device with "amdgpu" driver to the "xorg.conf.d". So from this perspective it does not seem to work.
 
Consider this necessary then.


:rolleyes: You know it's a separate package, right?

Code:
% pkg search amdgpu
xf86-video-amdgpu-19.1.0_1     X.Org amdgpu display driver
Ohh, thanks! Does this xorg driver package require the amdgpu kernel module? Btw. I was able to start it by removing the xorg config file. I guess then it loaded a different xorg driver, which is compatible with AMD too.
 
Back
Top