What was the reason why you suggested it?If you installed mesa-devel, remove it.
What an odd question.What was the reason why you suggested it?
Did not help. Xorg fails with the message that cannot load amdpgu since it does not exist. While kldstat clearly shows this module is loaded. dmesg shows that correct AMD firmware modules are also loaded.If you installed mesa-devel, remove it.
The kernel doesn't have a monopoly on the word "module". (What happened to "0x2"?)Xorg fails with the message that cannot load amdpgu since it does not exist. While kldstat clearly shows this module is loaded.
The crash at 0x2 is gone, but it seems it was kind of intermittent before. While playing with installing/reinstalling AMD related packages I remember I had 2 errors: either the fault at 0x2 or failure to load amdgpu.The kernel doesn't have a monopoly on the word "module". (What happened to "0x2"?)
When you reinstallThe crash at 0x2 is gone, but it seems it was kind of intermittent before. While playing with installing/reinstalling AMD related packages I remember I had 2 errors: either the fault at 0x2 or failure to load amdgpu.
amdgpu
, it's a good idea to check that /boot/modules/amdgpu or/boot/kernel/amdgpu actually exists with an ls -l
... if it looks suspiciously small, that's a problem.Well, graphics/mesa-devel is not needed in this case, and can potentially interfere.What was the reason why you suggested it?
-devel
in the name, that usually suggests header files, libs, and templates to set up your own copy of the project to hack on. Sometimes it means alpha or beta quality work that is aimed at devs, rather than regular users. Precise meaning of that term has been rather inconsistent from one project to another (which is an unfortunate reality of Open Source), so keep your eyes peeled.When you reinstallamdgpu
, it's a good idea to check that /boot/modules/amdgpu or/boot/kernel/amdgpu actually exists with anls -l
... if it looks suspiciously small, that's a problem.
andrew@obama:~$ ll /boot/modules/amd*
-r-xr-xr-x 1 root wheel 8581752 Jan 1 00:17 /boot/modules/amdgpu.ko
-rw-r--r-- 1 root wheel 8621776 Feb 18 10:41 /boot/modules/amdgpu.ko-built
-r-xr-xr-x 1 root wheel 275976 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_ce_bin.ko
-r-xr-xr-x 1 root wheel 125496 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_dmcub_bin.ko
-r-xr-xr-x 1 root wheel 276104 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_me_bin.ko
-r-xr-xr-x 1 root wheel 281440 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_mec2_bin.ko
-r-xr-xr-x 1 root wheel 281424 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_mec_bin.ko
-r-xr-xr-x 1 root wheel 276128 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_pfp_bin.ko
-r-xr-xr-x 1 root wheel 149936 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_rlc_bin.ko
-r-xr-xr-x 1 root wheel 46768 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_sdma_bin.ko
-r-xr-xr-x 1 root wheel 257608 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_smc_bin.ko
-r-xr-xr-x 1 root wheel 223120 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_sos_bin.ko
-r-xr-xr-x 1 root wheel 231048 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_ta_bin.ko
-r-xr-xr-x 1 root wheel 592272 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_vcn_bin.ko
andrew@obama:~$ ll /boot/kernel/amd*
-r-xr-xr-x 2 root wheel 18928 Jan 4 17:18 /boot/kernel/amd_ecc_inject.ko
-r-xr-xr-x 2 root wheel 31336 Jan 4 17:18 /boot/kernel/amdgpio.ko
-r-xr-xr-x 2 root wheel 26456 Jan 4 17:18 /boot/kernel/amdpm.ko
-r-xr-xr-x 2 root wheel 23688 Jan 4 17:18 /boot/kernel/amdsbwd.ko
-r-xr-xr-x 2 root wheel 21544 Jan 4 17:18 /boot/kernel/amdsmb.ko
-r-xr-xr-x 2 root wheel 18272 Jan 4 17:18 /boot/kernel/amdsmn.ko
-r-xr-xr-x 2 root wheel 31392 Jan 4 17:18 /boot/kernel/amdtemp.ko
This part, I'd question the need for it to be in there at all, especially alongside plain-rw-r--r-- 1 root wheel 8621776 Feb 18 10:41 /boot/modules/amdgpu.ko-built
amdgpu.ko
... An educated guess on my part, it's probably the thing that's messing up your setup. make && make install
...sienna_cichlid
driver: Thread sienna_cichlid-driver.86670 . It uses the same logic, but pay attention to filenames and look for dimgrey_cavefish
on your setup.Check that link, maybe?I think this discussion on Bugzilla might be relevant
Just use official FreeBSD mirror at cgit.freebsd.org... get a fresh ports tarball, put it into /usr/ports, and go from there with simple make config, make && make install... no need to compile stuff on the side in your /home directory, it's a LOT of work to stuff THAT into into the system and getting it to work correctly.I cloned the repo https://github.com/wulf7/drm-kmod.git, switched to the branch 515-lts-focal, built from the root and got a bunch of *.ko files:
andrew@obama:drm-kmod$ find . -name \*.ko
./ttm/ttm.ko
./i915/i915kms.ko
./dmabuf/dmabuf.ko
./amd/amdgpu/amdgpu.ko
./radeon/radeonkms.ko
./drm/drm.ko
Do I just copy them over to /boot/modules? What about a bunch of amdgpu_dimgrey_cavefish*.ko files I have in /boot/modules?
That was my failed experiment, will delete.This part, I'd question the need for it to be in there at all, especially alongside plainamdgpu.ko
... An educated guess on my part, it's probably the thing that's messing up your setup.
Good idea, I'll try to use the normal ports procedures.File sizes look OK. And yeah, it's /boot/modules/ where you want to look.
If you want to build and deploy the resulting binaries, then start in /usr/ports/graphics/drm-515-kmod/, but don't do any manual copying or renaming - that will mess things up for you.
The link doesn't workgraphics/gpu-firmware-amd-kmod will get installed as a dependency, I think. If not, go to that dir, as well, and runmake && make install
...
Check out my thread aboutsienna_cichlid
driver: Thread sienna_cichlid-driver.8667 . It uses the same logic, but pay attention to filenames and look fordimgrey_cavefish
on your setup.
Check that link, maybe?
If you did mean the mentioned thread, here it is.The link doesn't work
Fixed link to my thread... ?That was my failed experiment, will delete.
Good idea, I'll try to use the normal ports procedures.
The link doesn't work
...
[ 41.095] (II) LoadModule: "amdgpu"
[ 41.095] (WW) Warning, couldn't open module amdgpu
[ 41.095] (EE) Failed to load module "amdgpu" (module does not exist, 0)
[ 41.095] (EE) No drivers available.
...
amdgpu.ko
AND related dimgrey_cavefish
modules... cat /etc/rc.conf | grep amd
? Mine is kld_list="amdgpu fusefs"
kldstat | grep amd
?$ kldstat | grep amd
5 1 0xffffffff83400000 413220 amdgpu.ko
11 1 0xffffffff83388000 64d8 amdgpu_green_sardine_sdma_bin.ko
12 1 0xffffffff8338f000 2c2d8 amdgpu_green_sardine_asd_bin.ko
13 1 0xffffffff833bc000 16fd8 amdgpu_green_sardine_pfp_bin.ko
14 1 0xffffffff833d3000 12fd8 amdgpu_green_sardine_me_bin.ko
15 1 0xffffffff833e6000 afd8 amdgpu_green_sardine_ce_bin.ko
16 1 0xffffffff833f1000 bcd0 amdgpu_green_sardine_rlc_bin.ko
17 1 0xffffffff83814000 437e8 amdgpu_green_sardine_mec_bin.ko
18 1 0xffffffff83858000 437e8 amdgpu_green_sardine_mec2_bin.ko
19 1 0xffffffff8389c000 1fb60 amdgpu_green_sardine_dmcub_bin.ko
20 1 0xffffffff838bc000 64298 amdgpu_green_sardine_vcn_bin.ko
kldunload amdgpu.ko
, then kldload amdgpu.ko
. After that, try startx again.If it's Xorg complaining, then check /boot/modules/ directory for existence ofamdgpu.ko
AND relateddimgrey_cavefish
modules...
andrew@obama:~$ ll /boot/modules/amdgpu.ko
-r-xr-xr-x 1 root wheel 8581752 Feb 22 15:42 /boot/modules/amdgpu.ko
andrew@obama:~$ ll /boot/modules/*dimgrey*
-r-xr-xr-x 1 root wheel 275976 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_ce_bin.ko
-r-xr-xr-x 1 root wheel 125496 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_dmcub_bin.ko
-r-xr-xr-x 1 root wheel 276104 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_me_bin.ko
-r-xr-xr-x 1 root wheel 281440 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_mec2_bin.ko
-r-xr-xr-x 1 root wheel 281424 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_mec_bin.ko
-r-xr-xr-x 1 root wheel 276128 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_pfp_bin.ko
-r-xr-xr-x 1 root wheel 149936 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_rlc_bin.ko
-r-xr-xr-x 1 root wheel 46768 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_sdma_bin.ko
-r-xr-xr-x 1 root wheel 257608 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_smc_bin.ko
-r-xr-xr-x 1 root wheel 223120 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_sos_bin.ko
-r-xr-xr-x 1 root wheel 231048 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_ta_bin.ko
-r-xr-xr-x 1 root wheel 592272 Jan 12 17:21 /boot/modules/amdgpu_dimgrey_cavefish_vcn_bin.ko
After that, what's the output ofcat /etc/rc.conf | grep amd
? Mine iskld_list="amdgpu fusefs"
andrew@obama:~$ grep amd /etc/rc.conf
kld_list="amdgpu linux"
After that, what's the output ofkldstat | grep amd
?
This is mine (Well, my graphics are Green Sardine):
Code:$ kldstat | grep amd 5 1 0xffffffff83400000 413220 amdgpu.ko 11 1 0xffffffff83388000 64d8 amdgpu_green_sardine_sdma_bin.ko 12 1 0xffffffff8338f000 2c2d8 amdgpu_green_sardine_asd_bin.ko 13 1 0xffffffff833bc000 16fd8 amdgpu_green_sardine_pfp_bin.ko 14 1 0xffffffff833d3000 12fd8 amdgpu_green_sardine_me_bin.ko 15 1 0xffffffff833e6000 afd8 amdgpu_green_sardine_ce_bin.ko 16 1 0xffffffff833f1000 bcd0 amdgpu_green_sardine_rlc_bin.ko 17 1 0xffffffff83814000 437e8 amdgpu_green_sardine_mec_bin.ko 18 1 0xffffffff83858000 437e8 amdgpu_green_sardine_mec2_bin.ko 19 1 0xffffffff8389c000 1fb60 amdgpu_green_sardine_dmcub_bin.ko 20 1 0xffffffff838bc000 64298 amdgpu_green_sardine_vcn_bin.ko
If your kldstat output doesn't look like mine, do akldunload amdgpu.ko
, thenkldload amdgpu.ko
. After that, try startx again.
andrew@obama:~$ kldstat | grep amd
8 1 0xffffffff83000000 502958 amdgpu.ko
15 1 0xffffffff82ebf000 356d0 amdgpu_dimgrey_cavefish_sos_bin.ko
16 1 0xffffffff82ef5000 375e0 amdgpu_dimgrey_cavefish_ta_bin.ko
17 1 0xffffffff82f2d000 3dd88 amdgpu_dimgrey_cavefish_smc_bin.ko
18 1 0xffffffff82f6b000 1d958 amdgpu_dimgrey_cavefish_dmcub_bin.ko
19 1 0xffffffff82f89000 425e0 amdgpu_dimgrey_cavefish_pfp_bin.ko
20 1 0xffffffff83503000 425e0 amdgpu_dimgrey_cavefish_me_bin.ko
21 1 0xffffffff83546000 42560 amdgpu_dimgrey_cavefish_ce_bin.ko
22 1 0xffffffff82fcc000 238f0 amdgpu_dimgrey_cavefish_rlc_bin.ko
23 1 0xffffffff83589000 43a90 amdgpu_dimgrey_cavefish_mec_bin.ko
24 1 0xffffffff835cd000 43a90 amdgpu_dimgrey_cavefish_mec2_bin.ko
25 1 0xffffffff82ff0000 a5e0 amdgpu_dimgrey_cavefish_sdma_bin.ko
26 1 0xffffffff83611000 8f8d0 amdgpu_dimgrey_cavefish_vcn_bin.ko
OK, next up is making sure your regular user is in the following groups: wheel, operator, video.
The video group is especially important here.
Group membership is best done at fresh install.
what's the output ofgroups
for you?
# groups andrew
andrew wheel operator video
# sysctl hw.syscons.disable=1
Dunno what to say at this point... Rebooting your rig might work, but it's a 50-50 proposition. :/
I'm seeing lots of threads on these Forums that complain about freebsd-update(8) breaking something. Sometimes, the process (outlined in the Handbook's ch. 26) was not followed correctly, sometimes packages break...
Re-reading my own thread, there's little nugget/reminder:
That tip really should be in the Handbook at this point, but it's not. And it's difficult to spot even in the wikis... ?Code:# sysctl hw.syscons.disable=1
I frankly recommend setting that tunable in /etc/sysctl.conf or /boot/loader.conf so that it survives reboots.
I checked the wikis mentioned in my thread - the URL is alive, but the contents of the page have been updated (and technical correctness screwed up, too), so small wonder people are getting confused!
have you tried drm-510-kmod ? That one is known to work, and is still in ports. 515 is for freebsd 14 and later, but it looks like it's got issues...Thank you for trying to help. Of course I rebooted many times while tinkering with this problem. I think this particular card is not (yet) supported by updated drm-515-kmod. I'll wait for fixes, the developer seems to be active on Bugzilla.
I’m running 14 releasehave you tried drm-510-kmod ? That one is known to work, and is still in ports. 515 is for freebsd 14 and later, but it looks like it's got issues...