Solved Can't get video acceleration

Hi, I recently installed FreeBSD 10.1-RC4. I have a Radeon 4670 and I'm getting this error when I use any 3D software
Code:
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/local/lib/dri/swrast_dri.so
That's the output of $ glxgears.

uname -a says:
Code:
 FreeBSD casav 10.1-RC4 FreeBSD 10.1-RC4 #0 r273874: Fri Oct 31 08:49:44 UTC 014  root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

My /etc/make.conf says:
Code:
WITH_CCACHE_BUILD=yes
QT4_OPTIONS=  CUPS QGTKSTYLE
OVERRIDE_LINUX_BASE_PORT=c6
OVERRIDE_LINUX_NONBASE_PORTS=c6

I have used the GALLIUM TEXTURE options when building graphics/dri. I'm using the x11-drivers/xf86-video-ati driver.

Please tell me if you need more information.
 
My /etc/make.conf has:
Code:
OPTIONS_SET=GALLIUM

Other than that, the ports were built standard. I'm not sure what the situation is with packages now.
 
Some weeks ago I wrote another post about an acceleration problem, in that case, the solution was to define permission policies over /dev/dri/card0 using devfs(8). Well, this is not the case, in this system everyone has access to card0, and I still can't get acceleration (note that the error message is different).
 
What does OpenGL renderer string: Gallium 0.4 on AMD JUNIPER?

Just to be sure, was X installed from ports or packages? Is it up to date?

I have this in xorg.conf, but it might not be needed:
Code:
Section "DRI"
  Group 0
  Mode  0660
EndSection
 
In fact, I previously added that to /etc/X11/xorg.conf and unfortunately hasn't any effect.
Situation doesn't change when I manually make # chmod 777 /dev/dri/card0 (In the previous case this was a fast workaround, and everything went fine after this until system reboot).

Note that this is not the same installation of the previous case, I have reinstalled FreeBSD completely the last week.

/etc/devfs.conf says

Code:
 perm  card0  0777

/etc/X11/xorg.conf

Code:
Section "ServerLayout"
   Identifier  "X.org Configured"
   Screen  0  "Screen0" 0 0
   InputDevice  "Mouse0" "CorePointer"
   InputDevice  "Keyboard0" "CoreKeyboard"
   Option     "AutoAddDevices" "Off"
EndSection

Section "Files"
   ModulePath  "/usr/local/lib/xorg/modules"
   FontPath  "/usr/local/lib/X11/fonts/misc/"
   FontPath  "/usr/local/lib/X11/fonts/TTF/"
   FontPath  "/usr/local/lib/X11/fonts/OTF/"
   FontPath  "/usr/local/lib/X11/fonts/Type1/"
   FontPath  "/usr/local/lib/X11/fonts/100dpi/"
   FontPath  "/usr/local/lib/X11/fonts/75dpi/"
   FontPath   "/usr/local/lib/X11/fonts/djvu"
   FontPath "/usr/local/lib/X11/fonts/GentiumBasic/"
EndSection

Section "Module"
   Load  "dbe"
   Load  "dri"
   Load  "dri2"
   Load  "extmod"
   Load  "record"
   Load  "glx"
   Load "freetype"
EndSection
Section "DRI"
   Mode   0777
EndSection

Section "InputDevice"
   Identifier  "Keyboard0"
   Driver  "kbd"
EndSection

Section "InputDevice"
   Identifier  "Mouse0"
   Driver  "mouse"
   Option    "Protocol" "auto"
   Option    "Device" "/dev/sysmouse"
   Option    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
   Identifier  "Monitor0"
   VendorName  "Monitor Vendor"
   ModelName  "Monitor Model"
EndSection

Section "Device"
   Identifier  "Card0"
   Driver  "radeon"
   BusID  "PCI:3:0:0"
EndSection

Section "Device"
   Identifier  "Card1"
   Driver  "fbdev"
   BusID  "PCI:3:0:0"
EndSection

Section "Device"
   Identifier  "Card2"
   Driver  "vesa"
   BusID  "PCI:3:0:0"
EndSection

Section "Screen"
   Identifier "Screen0"
   Device  "Card0"
   Monitor  "Monitor0"
   SubSection "Display"
     Viewport  0 0
     Depth  1
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  4
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  8
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  15
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  16
   EndSubSection
   SubSection "Display"
     Viewport  0 0
     Depth  24
   EndSubSection
EndSection

All comes from ports(8) and is up to date (today a couple of hours ago).


$ glxinfo | grep render
Code:
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/local/lib/dri/swrast_dri.so
direct rendering: Yes
  GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
  GLX_MESA_query_renderer, GLX_OML_swap_method, GLX_SGIS_multisample,
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)
  GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
  GL_MESA_ycbcr_texture, GL_NV_blend_square, GL_NV_conditional_render,

Also I set LIBGL_DEBUG=verbose (Curiously $glxinfo reports direct rendering capability).
 
Code:
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)
makes me think it is using software rendering. I don't know why that would happen. The 4670 should be roughly the same as the 4650, which worked the last time I tried it.

I would remove the fbdev and vesa devices from xorg.conf.

For now, please post /var/log/Xorg.0.log somewhere like www.pastebin.com and give a pointer. It might be necessary to take this to the freebsd-x11 mailing list.
 
http://pastebin.com/zWk6EgUi contains /var/log/Xorg.0.log.

Clearly line 386 says
Code:
[    26.824] (II) RADEON(0): GPU accel disabled or not working, using shadowfb for KMS"

Acceleration worked for me without problems on previous installations so it's not a hardware nor a driver capabilities problem.

Considering I have a huge CPU (i7-3930k), performance statistics do not reveal problems ( $ glxgears runs above 800 fps, games/minecraft-client is surprisingly playable at 25-30 fps), but when I ran those with acceleration things change dramatically, textures look completely different and everything runs much faster.

Also I provide /boot/loader.conf:
Code:
radeonkmsfw_R700_rlc_load=YES
radeonkmsfw_RV730_me_load=YES
radeonkmsfw_RV730_pfp_load=YES
radeonkms_load=YES
smbus_load=YES
kern.ipc.shmall=32768
kern.ipc.shmmni=1024
kern.ipc.shmseg=1024
cuse4bsd_load=YES
 
Why are the first four lines there? A lot of people who manually load those modules experience problems. And they are unnecessary, they are autoloaded when X starts.
 
Why are the first four lines there? A lot of people who manually load those modules experience problems. And they are unnecessary, they are autoloaded when X starts.

They let me use hi-res text mode over TTYs without X. Anyway, they did not prevent getting acceleration the last time. I'll test without those lines.

UPDATE: I commented those lines, rebooted and acceleration worked :D
 
Back
Top