Solved Issue with drm-kmod on 12.2 and laptop with dual graphics

Hi all,

I daily work on a laptop with Intel integrated and an AMD Radeon HD 8670M/8750M Mars, this last GPU is not in use but I believe it prevents Xorg to run properly. This card has not being used in any previous FreeBSD versions because loading the module would trow a kernelpanic or Xorg would refuse to work because the VGA arbiter didn’t support multicard.

Having followed any indication on the Handbook and other sources, I’m in the need of requesting your advice.

Things I’ve already tested:
- make a fresh FreeBSD 12.2 install
- loading and not loading kms drivers on rc.conf
- using default and created by Xorg -configuration generated xorg.conf file, also I played around with Cards and Screens

I attach some logs and all the system information that I could be usefull.

Saludos,


off-topic:
Initially FreeBSD 12.2 was upgraded from 12.2.p10. Before upgrading a new boot environment was created, but I couldn’t go back to it after the freebsd-update and pkg upgrade process. Booting did stop because shell wasn’t valid, /bin/sh. Issuing a freebsd-update rollback broke something on zfs.
Sorry I’ve not more details.
 

Attachments

Thank you for the live saver tip.

Compiling and installing graphics/drm-kmod did the job, but just be sure to not have a previous version of drm-kmod installed.

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



That was an issue on 12.1 and it will stay with us.


PD: amdgpu still doesn't work because at module loading it complains about BIOS ROM
 
I'm trying to get a Radeon board (which worked on 12.1) back online, but see these problems, see
From the bug report linked Xorg.0.log:

Rich (BB code):
.....
[   642.427] (II) LoadModule: "amdgpu"
[   642.427] (II) Loading /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
[   642.427] (II) Module amdgpu: vendor="X.Org Foundation"
[   642.427]     compiled for 1.20.9, module version = 19.1.0
[   642.427]     Module class: X.Org Video Driver
[   642.427]     ABI class: X.Org Video Driver, version 24.1
[   642.427] (II) AMDGPU: Driver for AMD Radeon:
.....
[   642.662] (EE) 8: /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so (?+0x0) [0x80206ab10]
[   642.663] (EE) 9: /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so (?+0x0) [0x802076670]
[   642.664] (EE) 10: /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so (?+0x0) [0x802077970]
The loaded driver is not the kernel module provided by graphics/drm-kmod (graphics/drm-fbsd12.0-kmod) but the driver from x11-drivers/xf86-video-amdgpu.

The loaded amdgpu driver from package x11-drivers/xf86-video-amdgpu, forced by configuration file upon xorg, is unsuitable for the graphics card. The recommended amdgpu DRM module from graphics/drm-kmod, respectively graphics/drm-fbsd12.0-kmod, should be used instead.

Please
- delete xorg.conf. If there is a need to configure xorg (graphics card driver excluded), set the parameters in the recommended way, in split files, after the AMD GPU is detected correctly
- make sure kld_list="/boot/modules/amdgpu.ko" is set in /etc/rc.conf
- check kldstat(8) if module is loaded, if not
- kldload /boot/modules/amdgpu.ko
- make sure the user is in the 'video' group
- run startx
 
Last edited:
  • Thanks
Reactions: pi@
Thanks to you both! I was not aware that xf86-video-amdgpu and the one from drm-kmod are different drivers and assumed I need the xf...amdgpu one as well. Doing the steps described above and I'm back up and running!
 
xdriinfo says:
Screen 0: not direct rendering capable.

So far I'm not missing it 8-} But how would I activate it ?
 
Without truss, this is printed:

X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 151 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 26
Current serial number in output stream: 27

With truss, approx. 14K lines of getpid, with approx. 600 lines non-getpid 8-}
 
Without truss, this is printed:

X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 151 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 26
Current serial number in output stream: 27
Does it work with LIBGL_ALWAYS_SOFTWARE=1?
 
I had nvidia-driver installed. Why it interferes with glxgears, is beyond me, but thanks -- deleting it fixed it!
 
Thanks for the pointer. I once stumbled upon that review and it looks there's a conflict, but honestly: I don't understand the reason for that conflict.
 
Back
Top