marți, 24 august 2010

linux and radeon 3200

If you have an integrated graphic chip like i have one ( radeon hd 3200 ) and you want to use linux then you probabily have spent many hours trying to fix the damn thing !

Oficial ATI drivers , fglrx , sucks if you want to use powersaving mode for processor! Best i have managed was white strips drifting on my screen ! To see a decent image you must disable powersave mode and that's no good !

If you give up fglrx and want to use open source drivers ( radeon or radeonhd ) wich are installed by default ( i use linux mint 9 ) that's good until you want to use your tv tunner ! Tvtime suddenly disappear with an ugly message that you need yuy2 overlay support ! But radeon drivers has support for xvideo so you must have to do something !

Newer linux distributions don't have an xorg.conf file in etc/X11. So you have to use the old way : log in to console ( Xorg is stopped ) and run Xorg -configure. That way you will have a basic xorg.conf file in its place ! Edit this file , keep your hardware specific information but add some specific rules ! My xorg.conf looks like that :



Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerFlags"
Option "AIGLX" "On"
# this section is added by me
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "built-ins"
EndSection

Section "Module"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "dri2"
Load "record"
Load "v4l" # this line is added by me
Load "freetype" #this line is added by me

EndSection

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

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

Section "Monitor"
#DisplaySize 310 230 # mm
Identifier "Monitor0"
VendorName "PHL"
ModelName "PHILIPS 107E6"
HorizSync 30.0 - 71.0
VertRefresh 50.0 - 160.0
Option "DPMS"
EndSection

Section "Device"
### Available Driver options are:-
###
###
###
#Option "NoAccel"
#Option "SWcursor"
#Option "Dac6Bit"
#Option "Dac8Bit"
#Option "BusType"
#Option "CPPIOMode"
#Option "CPusecTimeout"
#Option "AGPMode"
#Option "AGPFastWrite"
#Option "AGPSize"
#Option "GARTSize"
#Option "RingSize"
#Option "BufferSize"
#Option "EnableDepthMoves"
#Option "EnablePageFlip"
#Option "NoBackBuffer"
#Option "DMAForXv"
#Option "FBTexPercent"
#Option "DepthBits"
#Option "PCIAPERSize"
#Option "AccelDFS"
#Option "IgnoreEDID"
#Option "CustomEDID"
#Option "DisplayPriority"
#Option "PanelSize"
#Option "ForceMinDotClock"
#Option "ColorTiling"
#Option "VideoKey"
#Option "RageTheatreCrystal"
#Option "RageTheatreTunerPort"
#Option "RageTheatreCompositePort"
#Option "RageTheatreSVideoPort"
#Option "TunerType"
#Option "RageTheatreMicrocPath"
#Option "RageTheatreMicrocType"
#Option "ScalerWidth"
#Option "RenderAccel"
#Option "SubPixelOrder"
#Option "ShowCache"
#Option "ClockGating"
#Option "VGAAccess"
#Option "ReverseDDC"
#Option "LVDSProbePLL"
#Option "AccelMethod"
#Option "DRI"
#Option "ConnectorTable"
#Option "DefaultConnectorTable"
#Option "DefaultTMDSPLL"
#Option "TVDACLoadDetect"
#Option "ForceTVOut"
#Option "TVStandard"
#Option "IgnoreLidStatus"
#Option "DefaultTVDACAdj"
#Option "Int10"
#Option "EXAVSync"
#Option "ATOMTVOut"
#Option "R4xxATOM"
#Option "ForceLowPowerMode"
#Option "DynamicPM"
#Option "NewPLL"
#Option "ZaphodHeads"
Option "DRI" "On" #this line is added by me
Option "AccelMethod" "EXA" #idem
Identifier "Card0"
Driver "radeon"
VendorName "ATI Technologies Inc"
BoardName "Radeon HD 3200 Graphics"
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
#if you want a specific resolution to load at boot you can add a line with Mode #"..." here
EndSubSection
EndSection

Section "DRI"
Group "video"
Mode 0660
#this section is added by me
EndSection


Now reboot your machine and enjoy tvtime . By the way,before that, don't forget to add a line in etc/modprobe.d/alsa-base.conf like that :

options saa7134 card=xxx tuner=yyy

(where xxx and yyy are specific to your hardware) !

Here come the amazing thing : tvtime is using no more than 8-10 % cpu time ! I know , for sure, that in my other linux distribution, wich i used before, tvtime usually was running somewhere between 24 % and 35 % cpu time. And vlc is using, too, small cpu time - under 27-28% wich is , again, excelent. Take a look at this pictures if you don't trust my words ( look at the graph history, not at the numbers - probabily cpu numbers are big because the capture software ) !



using tvtime with radeonhd 3200


tvtime and radeon hd 3200


vlc and tvtime on linux using a graphic chipset radeon hd 3200


linux tvtime and radeon hd 3200