Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Installing latest xf86-video-ati for r500 on Gentoo

  1. #1
    Join Date
    Jun 2008
    Posts
    3

    Thumbs up Installing latest xf86-video-ati for r500 on Gentoo

    For the first time since I bought my notebook (over two years ago), I now finally have what I consider a perfect linux install thanks to the r500 support in the xf86-video-ati-drivers.

    The biggest advantages over the fglrx driver, when it comes to the r500 cards, are
    1. HD video playback using xv without tearing. (Yay!)
    2. Smooth Compiz-Fusion with AIGLX.
    3. No need to run old kernel versions just because of video driver compatibility!
    4. No more proprietary junk in /opt!

    Some fglrx driver versions had decent xv, others had decent aiglx support. None of them have worked as well as should be expected.


    This is development software which can and probably will mess stuff up for some people. It worked flawlessly for me, but don't try this if you're not willing to spend some time sorting out the quirks.

    I started out with a baselayout without X and a vanilla 2.6.26-rc8 with the following config:
    Code:
     CONFIG_AGP=m
     CONFIG_AGP_INTEL=m
     CONFIG_DRM_RADEON=m
    To get all the goodies we want and avoid dependency hell, we need to be running a newer version of xorg than the one in portage. The easiest way to to this is by adding the x11 overlay using layman.
    Code:
    layman -a x11
    The git versions of xf86-video-ati and the xorg components and dependencies have to be unmasked by:
    1. Adding the following to /etc/portage/package.keywords
    Code:
    #### xorg-server dev
    x11-base/xorg-server **
    =x11-libs/libpciaccess-0.10.2
    =x11-proto/xproto-7.0.13
    =x11-proto/inputproto-9999
    =x11-apps/xauth-1.0.3
    =x11-libs/libX11-9999
    =x11-proto/xproto-9999
    =x11-libs/libXrender-0.9.4
    =x11-proto/renderproto-0.9.3
    =x11-proto/xextproto-7.0.3
    =x11-misc/xkeyboard-config-1.3
    =x11-apps/xinit-1.0.8-r3
    =x11-apps/rgb-1.0.3
    =media-libs/mesa-9999
    =x11-proto/dri2proto-1.1
    =x11-libs/libXext-9999
    =x11-proto/xextproto-9999
    =x11-libs/xtrans-1.2
    =x11-libs/libXi-9999
    =x11-libs/pixman-0.11.4
    =x11-libs/libXfont-1.3.2
    =x11-drivers/xf86-video-ati-9999
    =x11-drivers/xf86-input-mouse-9999
    =x11-drivers/xf86-input-keyboard-9999
    =x11-drivers/xf86-input-evdev-9999
    =sys-apps/hal-0.5.11-r1
    =dev-python/pyxf86config-0.3.34-r1
    =app-misc/hal-info-20080310
    =x11-proto/xf86driproto-9999
    =x11-libs/libxcb-9999
    =dev-lang/python-2.5.2-r5
    =x11-proto/xcb-proto-9999
    ####
    2. Adding the following to /etc/portage/package.unmask
    Code:
    #### xorg-server dev
    =x11-proto/dri2proto-1.1
    =x11-libs/pixman-0.11.4
    =x11-drivers/xf86-video-ati-9999
    =x11-libs/libdrm-9999
    =media-libs/mesa-9999
    =x11-drivers/xf86-input-keyboard-9999
    =x11-base/xorg-server-9999
    =x11-proto/xproto-9999
    =x11-libs/libXext-9999
    =x11-libs/libXi-9999
    =x11-proto/xextproto-9999
    =x11-drivers/xf86-input-mouse-9999
    =x11-drivers/xf86-input-evdev-9999
    =x11-libs/libX11-9999
    =x11-libs/libXft-9999
    =media-libs/fontconfig-9999
    =x11-proto/inputproto-9999
    =x11-proto/xf86driproto-9999
    ####
    Make sure you have the line VIDEO_CARDS="radeon" in your /etc/make.conf and then install xorg (xf86-video-ati will be pulled in as a dependency)
    Code:
    emerge -av xorg-server
    Edit your /etc/X11/xorg.conf to your liking. I'm using
    Code:
    Section "ServerLayout"
    	Identifier	"X.Org Configured"
    	Screen 0	"Screen0"		0 0
    	InputDevice	"Keyboard0"		"CoreKeyboard"
    	InputDevice	"USB Mouse"		"AlwaysCore"
    EndSection
    
    Section "Module"
    	Load "ddc"
    	Load "vbe"
    	Load "GLcore"
    	Load "dbe"
    	Load "dri"
    	Load "extmod"
    	Load "glx"
    	Load "bitmap"
    	Load "freetype"
    EndSection
    
    Section "ServerFlags"
    	Option		"AllowMouseOpenFail"	"true"
    	Option		"IgnoreABI"		"on"
    	Option		"AIGLX"			"true"
    EndSection
    
    Section "InputDevice"
    	Identifier	"Keyboard0"
    	Driver		"kbd"
    	Option		"CoreKeyboard"
    	Option		"XkbRules"		"xorg"
    	Option		"XkbModel"		"pc105"
    	Option		"XkbLayout"		"se"
    	Option		"XkbVariant"		",winkeys,winkeys"
    	Option		"XkbOptions"		"grp:alt_shift_toggle,grp_led:scroll"
    EndSection
    
    Section "InputDevice"
    	Identifier	"USB Mouse"
    	Driver		"mouse"
    	Option		"Device"		"/dev/input/mice"
    	Option		"SendCoreEvents"	"true"
    	Option		"Protocol"		"IMPS/2"
    	Option		"ZAxisMapping"		"4 5"
    	Option		"Buttons"		"5"
    EndSection
    
    Section "Monitor"
    	Identifier	"LVDS"
    	Option		"VendorName"		"Monitor"
    	Option		"ModelName"		"Generic"
    	Option		"DPMS"			"true"
    EndSection
    
    Section "Device"
    	Identifier	"X1600"
    	Driver		"ati"
    	Option		"AGPMode"		"8"
    	Option		"AccelMethod"		"EXA"
    	Option		"ColorTiling"		"on"
    	Option		"EnablePageFlip"	"true"
    	Option		"TripleBuffer"		"true"
    	Option		"DMAForXv"		"true"
    	Option		"GARTSize"		"64"
    	Option		"DynamicClocks"		"on"
    EndSection
    
    Section "Screen"
    	Identifier	"Screen0"
    	Device		"X1600"
    	Monitor		"LVDS"
    	DefaultDepth	24
    	SubSection "Display"
    	 Viewport	0 0
    	 Depth		24
    	EndSubSection
    EndSection
    
    Section "DRI"
    	Mode		0666
    EndSection
    
    Section "Extensions"
    	Option		"Composite" "true"
    	Option		"DAMAGE" "true"
    	Option		"RENDER" "true"
    EndSection
    
    Section "Files"
    	FontPath	"/usr/share/fonts/util"
    	FontPath	"/usr/share/fonts/encodings"
    	FontPath	"/usr/share/fonts/misc"
    	FontPath	"/usr/share/fonts/corefonts"
    	FontPath	"/usr/share/fonts/default"
    	FontPath	"/usr/share/fonts/100dpi"
    	FontPath	"/usr/share/fonts/75dpi"
    	FontPath	"/usr/share/fonts/default/ghostscript"
    EndSection
    Start up X and make sure everything seems to work ok
    Code:
    #dmesg | grep drm
    [drm] Initialized drm 1.1.0 20060810
    [drm] Initialized radeon 1.29.0 20080528 on minor 0
    [drm] Loading R500 Microcode
    
    #glxinfo | grep direct
    direct rendering: Yes
    
    #xvinfo | grep Adaptor
    Adaptor #0: "Radeon Textured Video"
    
    #grep AIGLX /var/log/Xorg.0.log
    (**) Option "AIGLX" "true"
    (**) AIGLX enabled
    And just like that, two years of frustration come to an end.
    To everybody who has ever worked on this driver, thank you, thank you, thank you!

  2. #2
    Join Date
    Dec 2007
    Location
    /dev/hell
    Posts
    297

    Default

    The same happened to me when I switched to radeon on my old r200 XD

    I hope will happen on my r600 soon XD (RadeonHD isn't an option for now)

  3. #3
    Join Date
    Jul 2008
    Posts
    2

    Default

    I did all the installation on my T60 and in principle, the driver works. But I've got a very annoying configuration issue: Xorg doesn't start up if I don't attach an external monitor to the VGA output. Here's my conf file:
    Code:
    #Section "ServerLayout"
    #	Identifier     "ATI"
    #	Screen         "Screen0" 0 0
    #	InputDevice    "Mouse1" "CorePointer"
    #	InputDevice    "USBMouse" "SendCoreEvents"
    #	InputDevice    "Keyboard1" "CoreKeyboard"
    #EndSection
    Section "ServerLayout"
    	Identifier     "R500"
    	Screen         "Screen1" 0 0
    	InputDevice    "Mouse1" "CorePointer"
    	InputDevice    "USBMouse" "SendCoreEvents"
    	InputDevice    "Keyboard1" "CoreKeyboard"
    EndSection
    
    
    
    Section "Files"
    
    EndSection
    
    Section "Module"
    	SubSection "extmod"
    		Option	    "omit xfree86-dga"   # don't initialise the DGA extension
    	EndSubSection
    EndSection
    
    Section "ServerFlags"
    	Option	    "AIGLX" "on"
    EndSection
    
    Section "Extensions"
    	Option      "Composite" "on"
    #	Option      "DAMAGE" "true"
    EndSection
    
    Section "InputDevice"
    	Identifier  "Keyboard1"
    	Driver      "kbd"
    #	Option	    "AutoRepeat" "500 30"
    	Option	    "XkbRules" "xorg"
    	Option	    "XkbModel" "pc105"
    	Option	    "XkbLayout" "de"
    #	Option	    "XkbVariant" "nodeadkeys"
    	Option      "XkbOptions"    "lv3:ralt_switch"
    #	Option	    "CustomKeycodes" "on"
    EndSection
    
    Section "InputDevice"
    	Identifier	"Mouse1"
            Driver          "synaptics"
    	Option		"Device" "/dev/input/mouse0"
            Option          "Protocol"              "auto-dev"
            Option          "SHMConfig"             "true"
    	Option          "TouchpaddOff"          "0"
    
            # How fast the two-finger scrolling scrolls. The lower, the faster.
            Option          "VertScrollDelta"       "100"
            Option          "HorizScrollDelta"      "350"
    
            # Location of the touchpad edges
    #        Option          "RightEdge"             "1120"
    #        Option          "BottomEdge"            "1050"
    #        Option		"TopEdge"		"50"
    #	Option		"LeftEdge"		"100"
    
            # Touch and "untouch" thresholds
    #        Option          "FingerLow"             "25"
    #        Option          "FingerHigh"            "50"
            
            # We DO NOT want palm triggering middle/right mouse
            # button events, so a tap has to be quite fast
    #        Option          "MaxTapTime"            "100"
    #        Option          "MaxTapMove"            "30"
    #        Option          "MaxDoubleTapTime"      "250"
    #	Option		"MaxTripleTapTime"	"250"
    #	Option		"SingleTapTimeout"	"150"
    
            # Disable two finger scrolling, as we have the edge scrolling enabled already
            Option          "VertTwoFingerScroll"   "1"
            Option          "HorizTwoFingerScroll"  "0"
    
            # Fast taps
            Option          "FastTaps"              "0"
    
            # Disable tapping of the touchpad (excluding the corners, of course)
            Option		"TapButton1"		"1"
    	Option          "TapButton2"            "3"
            Option          "TapButton3"            "2"
    
            # Movement speed settings
    #        Option          "MinSpeed"              "0.5"
    #        Option          "MaxSpeed"              "1"
    #        Option          "AccelFactor"           "0.3"
    
    EndSection
    
    
    Section "InputDevice"
    	Identifier  "Mouse2"
    	Driver      "mouse"
    	Option	    "Device" "/dev/input/mouse1"
    	Option 	    "Protocol" "PS/2"
    EndSection
    
    Section "InputDevice"
    	Identifier  "USBMouse"
    	Driver      "mouse"
    	Option	    "Device" "/dev/input/mice"
    	Option 	    "Protocol" "Auto"
    EndSection
    
    Section "Monitor"
    	Identifier   "LVDS"
    	HorizSync    30.0 - 90.0
    	VertRefresh  55.0 - 75.0
    	Option	    "DPMS"
    EndSection
    
    Section "Monitor"
    	Identifier	"VGA-0"
    	Option		"Enable"	"false"
    EndSection
    
    Section "Device"
    	Identifier  "R500"
    	Driver		"ati"
    	Option		"AGPMode"		"8"
    	Option		"AccelMethod"		"EXA"
    	Option		"ColorTiling"		"on"
    	Option		"EnablePageFlip"	"true"
    	Option		"TripleBuffer"		"true"
    	Option		"DMAForXv"		"true"
    	Option		"GARTSize"		"64"
    	Option		"DynamicClocks"		"on"
    #	Driver      "radeon"
    #	Driver      "radeonhd"
    #	Option	    "AccelMethod" "XAA"
    #	Option	    "XAANoOffscreenPixmaps" "true"
    #	Option      "ShadowFB" "true"
    #	Option      "DRI"
    #	VendorName  "ATI"
    #	BoardName   "Fire GL Mobility X1400"
    #	BusID       "PCI:1:0:0"
    EndSection
    
    Section "Device"
    	Identifier  "ATI"
    	Driver      "fglrx"
    # === Video Overlay for the Xv extension ===
    	Option	    "VideoOverlay" "on"
    	Option	    "TexturedVideo" "on"
    # === OpenGL Overlay ===
    	Option	    "OpenGLOverlay" "off"
    	Option	    "EnableMonitor" "auto"
    	Option	    "XAANoOffscreenPixmaps" "true"
    EndSection
    
    Section "Screen"
    	Identifier "Screen0"
    	Device     "ATI"
    	Monitor    "LVDS"
    	DefaultDepth     24
    	SubSection "Display"
    		Depth     24
    		Modes    "1400x1050" "1024x768" "800x600" "640x480"
    	EndSubSection
    	SubSection "Display"
    		Depth     32
    		Modes    "1400x1050" "1024x768" "800x600" "640x480"
    	EndSubSection
    EndSection
    
    Section "Screen"
    	Identifier "Screen1"
    	Device     "R500"
    	Monitor    "LVDS"
    	DefaultDepth     24
    	SubSection "Display"
    		Depth     16
    		Modes    "1400x1050" "1024x768" "800x600" "640x480"
    		Virtual   2800 1050
    	EndSubSection
    	SubSection "Display"
    		Depth     24
    		Modes    "1400x1050" "1024x768" "800x600" "640x480"
    		Virtual   2800 1050
    	EndSubSection
    EndSection
    
    Section "DRI"
    
    # Access to OpenGL ICD is allowed for all users:
    # Access to OpenGL ICD is restricted to a specific user group:
    #    Group 100    # users
    #    Mode 0660
    	Mode         0666
    EndSection
    The last line in my Xorg.log says
    (II) RADEON(0): Output: VGA-0, Detected Monitor Type: 0

    and after that, the server terminates.

  4. #4
    Join Date
    May 2008
    Posts
    343

    Default

    Quote Originally Posted by torfbolt View Post
    The last line in my Xorg.log says
    (II) RADEON(0): Output: VGA-0, Detected Monitor Type: 0

    and after that, the server terminates.
    You'll need to map monitor outputs with monitor identifiers inside your Device section. See http://wiki.debian.org/XStrikeForce/HowToRandR12 for how to do this properly.

  5. #5
    Join Date
    Dec 2007
    Posts
    2,404

    Default

    Quote Originally Posted by torfbolt View Post
    I did all the installation on my T60 and in principle, the driver works. But I've got a very annoying configuration issue: Xorg doesn't start up if I don't attach an external monitor to the VGA output.
    Quote Originally Posted by torfbolt View Post
    The last line in my Xorg.log says
    (II) RADEON(0): Output: VGA-0, Detected Monitor Type: 0

    and after that, the server terminates.
    The driver should detect your panel since this is a laptop. pastebin your xorg log and I'll take a look.

  6. #6
    Join Date
    Sep 2006
    Location
    PL
    Posts
    915

    Default

    i think the same thread was on gentoo forums. so i'll just re-iterate what i wrote there.

    two notes (valid only until 2.6.26 comes out)
    do not build in-kernel drm ,and use x11-drm ebuild from x11 overlay to build kernel drm modules.

    it installs more up-to date drm modules. x11-drm installs them into different location ( /lib/modules/<kernel>/x11-drm ) than in-kernel modules ( /lib/modules/<kernel>/kernel/drivers/char/drm ). it's likely that kernel will load the old modules, so either delete them or don't have them built at all, to avoid possible issues. 2.6.26 will have more up-to date drm modules, so this will be optional.

    you need only these git-packages :
    libdrm
    dri2proto
    libdrm
    mesa
    xf86-video-ati

    the first four packages are only for 3d. you can have only xf86-video-ati if you just need 2d and decent video playback.

    the rest can be from current non-git x.org (meaning from ~arch gentoo).

  7. #7
    Join Date
    Jul 2008
    Posts
    2

    Default

    Quote Originally Posted by agd5f View Post
    The driver should detect your panel since this is a laptop. pastebin your xorg log and I'll take a look.
    Problem solved, Xorg had used the older, manually compiled version of the radeon driver instead of the emerged one. Thank you anyway.

  8. #8
    Join Date
    Nov 2007
    Posts
    1,353

    Default

    Hey guys, I managed to get my hands on a 1950Pro. My card died on me, and my father was kind enough to loan me his old card.

    Anyhow, I followed this guide to get hardware acceleration working, and I have found that there is a memory leak somewhere. The problem is that I have no clue how to figure out where. All I know for sure is that after several hours the memory becomes full, and starts swapping out. Then after several more hours the swap becomes full, and the system becomes totally unresponsive. If I restart X both the swap and memory suddenly become normal again, but then it starts filling up again.

    I have no idea how to identify and pin point the memory leak. Any advise would be awesome. Thanks in advance guys.

    Also I have found that if I hit ctrl-alt-f1, or whatever to try and change to a different VT the monitor goes into standby and the computer becomes totally unresponsive.

    Also if I try to use Xv in mplayer the screen just goes black. I can use x11 and that works good. I can also use gl and gl2 and those seem to work good as well

    Anyhow the biggest problem I have is the memory leak. If you guys can think of any information that you need, I'll gladly provide it. Thank you so much for this. Imagine an Open Source driver that provides functional 3D support on decent hardware. I am very impressed. Thank you.

  9. #9
    Join Date
    Nov 2007
    Posts
    1,353

    Default

    Hey guys I'm just replying to myself. I managed to get the memory leak solved. I dont know how, or why, but it seems to be working fine now. After reading a few benches on the front page that Micheal did comparing EXA and XAA, I enable EXA support in the xorg.conf. Then after erstarting X the memory leak went away. Prior to adding EXA to the xorg.conf, I didnt have anything specified in there for 2d acceleration. So I'm assuming that whatever is used for 2D acceleration by default is what is causing the memory leak. In any case adding EXA to the make.conf seems to have solved that problem.

    The second problem with Xv support seems to be solved as well, though I get what can only be described as "tearing" when watching video in mplayer. To enable Xv support I had to add DMAForXv to the xorg.conf. After restarting xorg, Xv seems to work now, but when playing video back in mplayer it has straight lines that pass through the video especially on high motion scenes like when the camera pans across an image. It's not like a line though, it's almost as if the image is cropped at a certain point and the part above that line is slightly ahead of the part below it. It's almost like the image is torn. The best word for it is "tearing"

    Then also the third problem with switching to a virtual terminal still persists, but after updating the radeon driver to the newest git checkout it no longer freezes the whole system. Now it'll let me switch back to VT7. When I switch to any other VT the monitor just goes into standby, though unlike with the last checkout, this time it will allow me to switch back to VT7.

  10. #10
    Join Date
    Oct 2007
    Location
    Toronto-ish
    Posts
    7,565

    Default

    I believe the tearing you are describing is caused by lack of "sync to vblank" support in the driver stack, so the new frame can be drawn part way through the screen refresh. Don't *think* there is a workaround for this today.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •