radeon hd 4250 3d acceleration, dri, drm and all that?

i've got this 880g chipset with the radeon hd 4250 video onboard... flash animations, games and stuff like that lag... can someone point me on how to? thanks
Code:
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
	Option		"DontZap"		"0"
	Option		"AllowEmptyInput"	"0"
	Option		"AutoAddDevices"	"0"
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/"
EndSection

Section "Module"
	Load  "extmod"
	Load  "record"
	Load  "dbe"
	Load  "glx"
	Load  "dri"
	Load  "dri2"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option		"XkbOptions"		"terminate:ctrl_alt_bksp,grp:ctrl_shift_toggle"
	Option		"XkbLayout"		"us,ru"
EndSection

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

Section "Monitor"
	#DisplaySize	  340   270	# mm
	Identifier   "Monitor0"
	VendorName   "NEC"
	ModelName    "LCD72VX"
	HorizSync    31.0 - 81.0
	VertRefresh  56.0 - 75.0
	Option	    "DPMS"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"            	# [<bool>]
        #Option     "SWcursor"           	# [<bool>]
        #Option     "Dac6Bit"            	# [<bool>]
        #Option     "Dac8Bit"            	# [<bool>]
        #Option     "BusType"            	# [<str>]
        #Option     "CPPIOMode"          	# [<bool>]
        #Option     "CPusecTimeout"      	# <i>
        #Option     "AGPMode"            	# <i>
        #Option     "AGPFastWrite"       	# [<bool>]
        #Option     "AGPSize"            	# <i>
        #Option     "GARTSize"           	# <i>
        #Option     "RingSize"           	# <i>
        #Option     "BufferSize"         	# <i>
        #Option     "EnableDepthMoves"   	# [<bool>]
        #Option     "EnablePageFlip"     	# [<bool>]
        #Option     "NoBackBuffer"       	# [<bool>]
        #Option     "DMAForXv"           	# [<bool>]
        #Option     "FBTexPercent"       	# <i>
        #Option     "DepthBits"          	# <i>
        #Option     "PCIAPERSize"        	# <i>
        #Option     "AccelDFS"           	# [<bool>]
        #Option     "IgnoreEDID"         	# [<bool>]
        #Option     "CustomEDID"         	# [<str>]
        #Option     "DisplayPriority"    	# [<str>]
        #Option     "PanelSize"          	# [<str>]
        #Option     "ForceMinDotClock"   	# <freq>
        #Option     "ColorTiling"        	# [<bool>]
        #Option     "VideoKey"           	# <i>
        #Option     "RageTheatreCrystal" 	# <i>
        #Option     "RageTheatreTunerPort" 	# <i>
        #Option     "RageTheatreCompositePort" 	# <i>
        #Option     "RageTheatreSVideoPort" 	# <i>
        #Option     "TunerType"          	# <i>
        #Option     "RageTheatreMicrocPath" 	# <str>
        #Option     "RageTheatreMicrocType" 	# <str>
        #Option     "ScalerWidth"        	# <i>
        #Option     "RenderAccel"        	# [<bool>]
        #Option     "SubPixelOrder"      	# [<str>]
        #Option     "ClockGating"        	# [<bool>]
        #Option     "VGAAccess"          	# [<bool>]
        #Option     "ReverseDDC"         	# [<bool>]
        #Option     "LVDSProbePLL"       	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "DRI"                	# [<bool>]
        #Option     "ConnectorTable"     	# <str>
        #Option     "DefaultConnectorTable" 	# [<bool>]
        #Option     "DefaultTMDSPLL"     	# [<bool>]
        #Option     "TVDACLoadDetect"    	# [<bool>]
        #Option     "ForceTVOut"         	# [<bool>]
        #Option     "TVStandard"         	# <str>
        #Option     "IgnoreLidStatus"    	# [<bool>]
        #Option     "DefaultTVDACAdj"    	# [<bool>]
        #Option     "Int10"              	# [<bool>]
        #Option     "EXAVSync"           	# [<bool>]
        #Option     "ATOMTVOut"          	# [<bool>]
        #Option     "R4xxATOM"           	# [<bool>]
        #Option     "ForceLowPowerMode"  	# [<bool>]
        #Option     "DynamicPM"          	# [<bool>]
        #Option     "NewPLL"             	# [<bool>]
        #Option     "ZaphodHeads"        	# <str>
	Identifier  "Card0"
	Driver      "radeon"
	VendorName  "ATI Technologies Inc"
	BoardName   "RS880 [Radeon HD 4250]"
	BusID       "PCI:1:5: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
 
What's the output of [cmd=]glxinfo | grep -i render[/cmd]
?

EDIT: And please show us your /var/log/Xorg.0.log file too.

Adam
 
cL0N31 said:
i've got this 880g chipset with the radeon hd 4250 video onboard... flash animations, games and stuff like that lag...

"Lag" as in "doesn't do things until I move the mouse?"

Code:
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
	Option		"DontZap"		"0"
	[del]Option		"AllowEmptyInput"	"0"[/del]
	Option		"AutoAddDevices"	"0"
EndSection

AllowEmptyInput, FreeBSD, and Xorg Input

Short version: delete that line with the strike-through. It's actively bad. It causes input lag.

Using "Off" instead of "0" is more readable.

Adding a DRI section shouldn't hurt:
Code:
Section "DRI"
        Group 0
        Mode  0660
EndSection

Put your /var/log/Xorg.0.log on pastebin.com and post the link here.
 
3d xscreensavers lag and hedgewars lag unbelievably, doesn't matter if i move mouse or not

http://pastebin.com/cHymdY45

with

Code:
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
	Option		"DontZap"		"0"
	Option		"AutoAddDevices"	"0"
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/"
EndSection

Section "Module"
	Load  "extmod"
	Load  "record"
	Load  "dbe"
	Load  "glx"
	Load  "dri"
	Load  "dri2"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option		"XkbOptions"		"terminate:ctrl_alt_bksp,grp:ctrl_shift_toggle"
	Option		"XkbLayout"		"us,ru"
EndSection

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

Section "Monitor"
	#DisplaySize	  340   270	# mm
	Identifier   "Monitor0"
	VendorName   "NEC"
	ModelName    "LCD72VX"
	HorizSync    31.0 - 81.0
	VertRefresh  56.0 - 75.0
	Option	    "DPMS"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"            	# [<bool>]
        #Option     "SWcursor"           	# [<bool>]
        #Option     "Dac6Bit"            	# [<bool>]
        #Option     "Dac8Bit"            	# [<bool>]
        #Option     "BusType"            	# [<str>]
        #Option     "CPPIOMode"          	# [<bool>]
        #Option     "CPusecTimeout"      	# <i>
        #Option     "AGPMode"            	# <i>
        #Option     "AGPFastWrite"       	# [<bool>]
        #Option     "AGPSize"            	# <i>
        #Option     "GARTSize"           	# <i>
        #Option     "RingSize"           	# <i>
        #Option     "BufferSize"         	# <i>
        #Option     "EnableDepthMoves"   	# [<bool>]
        #Option     "EnablePageFlip"     	# [<bool>]
        #Option     "NoBackBuffer"       	# [<bool>]
        #Option     "DMAForXv"           	# [<bool>]
        #Option     "FBTexPercent"       	# <i>
        #Option     "DepthBits"          	# <i>
        #Option     "PCIAPERSize"        	# <i>
        #Option     "AccelDFS"           	# [<bool>]
        #Option     "IgnoreEDID"         	# [<bool>]
        #Option     "CustomEDID"         	# [<str>]
        #Option     "DisplayPriority"    	# [<str>]
        #Option     "PanelSize"          	# [<str>]
        #Option     "ForceMinDotClock"   	# <freq>
        #Option     "ColorTiling"        	# [<bool>]
        #Option     "VideoKey"           	# <i>
        #Option     "RageTheatreCrystal" 	# <i>
        #Option     "RageTheatreTunerPort" 	# <i>
        #Option     "RageTheatreCompositePort" 	# <i>
        #Option     "RageTheatreSVideoPort" 	# <i>
        #Option     "TunerType"          	# <i>
        #Option     "RageTheatreMicrocPath" 	# <str>
        #Option     "RageTheatreMicrocType" 	# <str>
        #Option     "ScalerWidth"        	# <i>
        #Option     "RenderAccel"        	# [<bool>]
        #Option     "SubPixelOrder"      	# [<str>]
        #Option     "ClockGating"        	# [<bool>]
        #Option     "VGAAccess"          	# [<bool>]
        #Option     "ReverseDDC"         	# [<bool>]
        #Option     "LVDSProbePLL"       	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "DRI"                	# [<bool>]
        #Option     "ConnectorTable"     	# <str>
        #Option     "DefaultConnectorTable" 	# [<bool>]
        #Option     "DefaultTMDSPLL"     	# [<bool>]
        #Option     "TVDACLoadDetect"    	# [<bool>]
        #Option     "ForceTVOut"         	# [<bool>]
        #Option     "TVStandard"         	# <str>
        #Option     "IgnoreLidStatus"    	# [<bool>]
        #Option     "DefaultTVDACAdj"    	# [<bool>]
        #Option     "Int10"              	# [<bool>]
        #Option     "EXAVSync"           	# [<bool>]
        #Option     "ATOMTVOut"          	# [<bool>]
        #Option     "R4xxATOM"           	# [<bool>]
        #Option     "ForceLowPowerMode"  	# [<bool>]
        #Option     "DynamicPM"          	# [<bool>]
        #Option     "NewPLL"             	# [<bool>]
        #Option     "ZaphodHeads"        	# <str>
	Identifier  "Card0"
	Driver      "radeon"
	VendorName  "ATI Technologies Inc"
	BoardName   "RS880 [Radeon HD 4250]"
	BusID       "PCI:1:5: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

Section "DRI"
	Group	0
	Mode	0660
EndSection
 
Code:
$ glxinfo | grep -i render
direct rendering: Yes
OpenGL renderer string: Software Rasterizer
 
And here's why:
Code:
drmOpenDevice: Open failed
[drm] failed to load kernel module "radeon"

But what caused that? Please check that this matches:
Code:
% pkg_info -Ix dri-
dri-7.6.1,2         OpenGL hardware acceleration drivers for the DRI

Running pkg_libchk(1) from sysutils/bsdadminscripts would show library problems.
 
Since the kernel module is part of the base system, and not any part of ports, I'd think that the version of the dri port the OP has installed doesn't actually play any role. The port only includes the Mesa drivers.

Instead, I'd guess that this is due to PCI ID 9715 not being listed in /usr/src/sys/dev/drm/drm_pciids.h.

I wonder if the fix is as simple as adding an entry for it and recompiling the DRM drivers (or the entire kernel)?

EDIT: Alright, so it's in /usr/src/sys/dev/drm/drm_pciids.h in -CURRENT. I wonder if it's in 8.2...
 
Maybe time for an import from upstream, but their wiki is remarkably poor. I tried and failed to locate the latest version of the drm_pciids.txt file to see if it was already in there.
 
Well I can confirm that 0x9715 is in /usr/src/sys/dev/drm/drm_pciids.h on -CURRENT and isn't in /usr/src/sys/dev/drm/drm_pciids.h on 8.2. I do not know about -STABLE.

Importing from upstream isn't going to do any good in this specific case since the PCI ID has already been added to -CURRENT. And importing from upstream might do more harm than good if PCI IDs get added that only work with KMS. Also, in this case, upstream is the Linux kernel, since that's where all DRM development is done these days.

To the OP: You can try simply adding your PCI ID to the aforementioned file. Should be rather simple.

Also, since you are using an older version of the DRI port, make sure you have WITHOUT_NOUVEAU set to yes in /etc/make.conf and then rebuild the DRI and libdrm ports.
 
You have an older version of the DRI port because you didn't define
Code:
WITHOUT_NOUVEAU=yes
in your /etc/make.conf file (and please note that it is WITHOUT_NOUVEAU, not WITH_NOUVEAU like I originally said above). dri 7.6.1 should be the default, frankly, and not require some special option in /etc/make.conf. I asked about that on one of the mailing lists a while back and though I don't remember the explanation I was given, I vaguely recall it being a non-answer.

This is the line from drm_pciids.h on -CURRENT:

Code:
 {0x1002, 0x9715, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4250"},

EDIT: Not sure if it matters, but on -CURRENT it goes after the entry for 0x9714, not surprisingly.
 
i added the line to make.conf and added the line to drm_pciids.h accordingly, rebooted, updated dri to dri-7.6.1,2 ... rebooted, it still the same, OpenGL renderer string: Software Rasterizer and hedgewars lags as before... here's my log now http://pastebin.com/DMfbqrkA
 
Ok, what library do I need to rebuild? To rebuild the kernel module, I assume I need to rebuild the radeon driver, right?
 
To rebuild the kernel module, you need to run [cmd=""]make[/cmd] in /usr/src/sys/modules/drm/radeon followed by [cmd=""]make install[/cmd]

The other parts you need to rebuild are ports... graphics/dri and graphics/libdrm. You only need to rebuild them if you have not already done so since adding
Code:
WITHOUT_NOUVEAU=yes
to /etc/make.conf

Adam
 
i've rebuilt the radeon module, now i get this
Code:
$ glxinfo |grep render
unknown chip id 0x9715, can't guess.
direct rendering: Yes
OpenGL renderer string: Software Rasterizer
 
Did you rebuild graphics/dri after setting WITHOUT_NOUVEAU? I wonder if that PCI ID is too new for mesa 7.6 now...

Let's make sure the DRM driver attached properly. What's the output of [cmd=""]dmesg | grep drm[/cmd]? Can you show us you new Xorg log file?
 
i went to update everything with portmaster after i added WITHOUT_NOUVEAU=yes ... it resulted in building and installing the newer dri...

Xorg.0.log http://pastebin.com/BnuTf5XL

Code:
$ dmesg | grep drm
drm0: <ATI Radeon HD 4250> on vgapci0
info: [drm] MSI enabled 1 message(s)
vgapci0: child drm0 requested pci_enable_busmaster
info: [drm] Initialized radeon 1.31.0 20080613
info: [drm] Setting GART location based on new memory map
info: [drm] Loading RS780/RS880 Microcode
info: [drm] Resetting GPU
info: [drm] writeback test succeeded in 1 usecs
drm0: [ITHREAD]
info: [drm] Resetting GPU
info: [drm] Setting GART location based on new memory map
info: [drm] Loading RS780/RS880 Microcode
info: [drm] Resetting GPU
info: [drm] writeback test succeeded in 1 usecs
drm0: [ITHREAD]
info: [drm] Resetting GPU
info: [drm] Setting GART location based on new memory map
info: [drm] Loading RS780/RS880 Microcode
info: [drm] Resetting GPU
info: [drm] writeback test succeeded in 1 usecs
drm0: [ITHREAD]
 
No. The radeonhd driver is no longer developed and completely unsupported. The only thing radeonhd supports on FreeBSD, that is unsupported by the radeon driver, is HDMI audio (which requires KMS with radeon).
 
adamk said:
No. The radeonhd driver is no longer developed and completely unsupported. The only thing radeonhd supports on FreeBSD, that is unsupported by the radeon driver, is HDMI audio (which requires KMS with radeon).

Ah. Did not know that. Thanks for the info.
 
Back
Top