Radeon Dual Screen
Foreword
ATI graphics card configuration in Linux was always a real pain for me. I was so annoyed by the fact that with proprietary driver I couldn't get both games and 3D desktop acceleration work the same time that on my main computer I decided to get rid of my ATI GPU and bought myself a shiny NVidia GPU which did the job. Unfortunately getting rid of my notebook GPU wasn't a real option so I had to find another solution to my problem. For most of the times I used my notebook with proprietary fglrx driver which with XGL gave me 3D desktop features. I had to accept the fact that I won't be able to play any games on it. I also ignored a lot of fglrx related warnings reported by kernel. This way this driver never real work stable for me, and in the end as I have an old Radeon 9600 card newer version of ATI catalyst driver for Linux have removed support for my GPU. I had to make decision what is more important to me haveing proprietary driver with very old kernel or update the kernel and stop using this crappy driver. I prefer to have newer kernel. That was a very good decision because I found out that opensource Radeon driver offered me features I never wasn't able to use with propriety driver. What is also important it supports RandR 1.2 specification so I can use modern dual or even triple screen configuration effectively. This is another prove that opensource development is the best way to solve common diver problems. I will try to share my configuration hoping it will help someone else.
I want to point that I have no idea what level of quality todays ATI proprietary Linux drivers offers. It's possible that AMD after acquisition of ATI fixed a lot of things. But as I had very bad experience with Linux support from ATI, it will take a lot of time to convince me to buy any of their products.
As I wrote above I had quite old ATI Mobility Radeon 9600 GPU in my notebook, but as I'm using Gentoo Linux with full hardware optimalization I'm able to effectively use even very old hardware. My configuration is supporting 3D desktop configuration, dual screen configuration and also accelerated graphics in some old games using free and opensource Radeon driver. Just remember if you are following my configuration you are doing this at your won risk. I will start my description with kernel support.
Kernel Configuration
To have accelerated desktop or games experience you will need to make sure that you have DRM support for Readon compiled into your kernel. I did not recommend compiling DRM Radeon as module, I personally experienced hard locks with DRI Readon loaded as module. You can check your kernel configuration for Radeon by running following commands in shell (I assume you have your current kernel sources in /usr/src/linux):
cd /usr/src/linux cat .config | grep DRM_RADEON
If you can see:
CONFIG_DRM_RADEON=y
Then you can move to open source driver installation. If you however see:
CONFIG_DRM_RADEON=n
or
# CONFIG_DRM_RADEON is not set
Then you need to mark this option in your kernel. You can do it by running:
cd /usr/src/linux make menuconfig
Then you have to go to Device Drivers --> Graphics Support --> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support), mark it if it's not already marked and then go in and mark ATI Radeon. Save changes and go out of menuconfig. Now you have to recompile and install new kernel. If you don't know how to do it consult your distribution documentation. I do it this way in my Gentoo Linux:
cd /usr/src/linux make && make modules_install install
Now you should have Radeon DRM support directly in kernel. You can reboot your computer using new kernel.
Open Source Driver Installation
Open source driver installation may differ from distribution. It's possible that your distribution X server installation has the driver and you don't have to do anything. If in doubt consult your distribution documentation. Below steps will work for Gentoo Linux and Gentoo Linux based distributions. First we need to make sure we have proper graphics card configuration in our make.conf file. We can check it by running following command in the shell:
cat /etc/make.conf | grep VIDEO_CARDS VIDEO_CARDS="radeon vesa v4l"
As you can see I have radeon card support. If you don't, edit /etc/make.conf and append radeon string to VIDEO_CARDS. Now we need to make sure that all system packages that depend on this settings will be reemerged. You can check what packages are using this setting by using gentoolkit equery utility like this:
equery hasuse video_cards_radeon [ Searching for USE flag video_cards_radeon in all categories among: ] * installed packages [I--] [ ~] x11-base/xorg-drivers-1.8 (0) [I--] [ ~] x11-libs/libdrm-2.4.20-r1 (0) [I--] [ ~] sys-power/pm-utils-1.3.0-r3 (0) [I--] [ ~] media-libs/mesa-7.8.1 (0) [I--] [ ~] dev-libs/DirectFB-1.4.3 (0)
As you can see there is xorg-drivers package on my list. This package will pull and install Radeon opensource driver. Make sure you will reemerge all this packages, before going any further with configuration. If you want to be 100% sure you have Readon opensource driver in your system you can additionally run:
emerge -pv x11-drivers/xf86-video-ati [ebuild R ] x11-drivers/xf86-video-ati-6.12.6
Last thing you should do is to make sure you will use Xorg server opengl acceleration. This is extremly important if you are moving from proprietary driver to opensource one. You can do it by running following command in terminal:
eselect opengl set xorg-x11 Switching to xorg-x11 OpenGL interface... done
Xorg Server Configuration
Here you will find my full Xorg.conf that is ensuring Dual screen configuration using RandR 1.2 specification and 3D acceleration features for opensource Radeon driver.
Section "ServerLayout" Identifier "X.org Configured" Screen "Radeon Main Screen" InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Synaptics0" Option "AIGLX" "on" Option "AllowEmptyInput" "off" EndSection Section "Files" ModulePath "/usr/lib/xorg/modules" FontPath "/usr/share/fonts/misc/" FontPath "/usr/share/fonts/TTF/" FontPath "/usr/share/fonts/OTF" FontPath "/usr/share/fonts/Type1/" FontPath "/usr/share/fonts/100dpi/" FontPath "/usr/share/fonts/75dpi/" FontPath "/usr/share/fonts/Speedo" EndSection Section "Module" Load "ddc" Load "glx" Load "extmod" SubSection "extmod" Option "omit xfree86-dga" EndSubSection Load "record" Load "dbe" Load "dri" Load "bitmap" Load "freetype" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "evdev" Option "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-event-kbd" Option "AutoRepeat" "500 5" Option "Xleds" "1 2 3" Option "XkbDisable" Option "XkbModel" "asus_laptop" Option "XkbLayout" "pl" Option "XkbVariant" ",winkeys" Option "XkbOptions" "eurosign:5,terminate:ctrl_alt_bksp" EndSection Section "InputDevice" Identifier "Mouse0" Driver "evdev" Option "Protocol" "auto" Option "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse" Option "ZAxisMapping" "4 5 6 7" EndSection Section "InputDevice" Identifier "Synaptics0" Driver "synaptics" Option "Protocol" "auto" Option "SendCoreEvents" "true" Option "Protocol" "auto" Option "SHMConfig" "on" EndSection #Modes configuration for TV Sony Bravia 32 KDL32S2030 Section "Modes" Identifier "Modes_SONY" Mode "WXGA_1360x768" # vfreq 60.015Hz, hfreq 47.712kHz DotClock 85.500000 HTimings 1360 1424 1536 1792 VTimings 768 771 777 795 Flags "+HSync" "+VSync" EndMode Mode "WXGA_1280x768" # vfreq 59.870Hz, hfreq 47.776kHz DotClock 79.500000 HTimings 1280 1344 1472 1664 VTimings 768 771 778 798 Flags "+HSync" "-VSync" EndMode Mode "XGA_1024x768" # vfreq 60Hz, hfreq 48.4kHz DotClock 65.000000 HTimings 1024 1032 1176 1344 VTimings 768 771 777 806 Flags "+HSync" "-VSync" EndMode EndSection # Configuration for Default LVDMS panel Section "Monitor" Identifier "DefaultMonitor" Option "DPMS" "true" Option "PreferredMode" "1280x800" EndSection # Configuration for Generic Monitor as 2nd screen Section "Monitor" Identifier "Generic" VendorName "Unknown" ModelName "Unknown" Option "DPMS" "true" Option "Right Of" "DefaultMonitor" Option "PreferredMode" "1024x768" EndSection # Configuration for TV-Monitor Section "Monitor" Identifier "TV-Monitor" VendorName "Unknown" ModelName "Unknown" Option "DPMS" "true" Option "Left Of" "DefaultMonitor" Option "PreferredMode" "800x600" EndSection #Configuration for Sony Bravia 32in Secondary LCD TV/Monitor Section "Monitor" Identifier "Sony_Bravia_32in" Option "DPMS" "true" VendorName "Sony" ModelName "Bravia 32 inches" UseModes "Modes_SONY" #HorizSync 31.5-47.8 #VertRefresh 60 Option "Right Of" "DefaultMonitor" Option "PreferredMode" "WXGA_1360x768" EndSection # Radeon Open Source Driver 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" "False" #Option "SWcursor" # [<bool>] #Option "Dac6Bit" # [<bool>] #Option "Dac8Bit" # [<bool>] Option "BusType" "AGP" #Option "CPPIOMode" # [<bool>] #Option "CPusecTimeout" # <i> Option "AGPMode" "4" #Option "AGPFastWrite" "True" This option makes the system hardlock #Option "AGPSize" "64" Option "GARTSize" "64" #Option "RingSize" # <i> #Option "BufferSize" # <i> #Option "EnableDepthMoves" # [<bool>] Option "EnablePageFlip" "True" #Option "NoBackBuffer" # [<bool>] Option "DMAForXv" "True" #Option "FBTexPercent" # <i> #Option "DepthBits" # <i> #Option "PCIAPERSize" # <i> Option "AccelDFS" "True" #Option "IgnoreEDID" # [<bool>] #Option "DisplayPriority" # [<str>] #Option "PanelSize" # [<str>] #Option "ForceMinDotClock" # <freq> Option "ColorTiling" "True" #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" "True" #Option "SubPixelOrder" # [<str>] #Option "ShowCache" # [<bool>] #Option "DynamicClocks" "True" #Option "VGAAccess" # [<bool>] #Option "ReverseDDC" # [<bool>] #Option "LVDSProbePLL" # [<bool>] Option "AccelMethod" "XAA" Option "DRI" "True" #Option "ConnectorTable" # <str> #Option "DefaultConnectorTable" # [<bool>] #Option "DefaultTMDSPLL" # [<bool>] Option "TVDACLoadDetect" "True" #Option "ForceTVOut" # [<bool>] Option "TVStandard" "pal" #Option "IgnoreLidStatus" # [<bool>] #Option "DefaultTVDACAdj" # [<bool>] #Option "Int10" # [<bool>] #Option "EXAVSync" # [<bool>] #Option "ATOMTVOut" # [<bool>] #Option "R4xxATOM" # [<bool>] Identifier "Radeon Open Driver" Driver "radeon" VendorName "ATI Technologies Inc" BoardName "RV350 [Mobility Radeon 9600 M10]" BusID "PCI:1:0:0" Option "monitor-LVDS" "DefaultMonitor" Option "monitor-VGA-0" "Generic" # Option "monitor-VGA-0" "Sony_Bravia_32in" Option "monitor-S-video" "TV-Monitor" EndSection #Configuration for Generic Vesa Device Driver no 3D accel Section "Device" Identifier "Generic Vesa" Driver "vesa" BusID "PCI:1:0:0" # Driver specific options Option "ShadowFB" "on" Option "ModeSetClearScreen" "on" Option "monitor-LVDS" "DefaultMonitor" EndSection Section "Screen" Identifier "Radeon Main Screen" Device "Radeon Open Driver" DefaultDepth 24 SubSection "Display" Depth 24 Virtual 2960 1050 EndSubSection EndSection Section "Screen" Identifier "Vesa Main Screen" Device "Generic Vesa " DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 1 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Viewport 0 0 Depth 4 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Viewport 0 0 Depth 8 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Viewport 0 0 Depth 15 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Viewport 0 0 Depth 16 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Depth 24 Modes "1024x768" "800x600" ViewPort 0 0 EndSubSection EndSection Section "dri" Mode 0666 EndSection Section "Extensions" Option "Composite" "Enable" EndSection
Now I will try to explain this configuration file. I will focus on most important settings for both dual screen and 3D acceleration settings.
First thing you may see is ServerLayout section. This section is using configuration defined below in my xorg.conf file. Important thing here is Option "AIGLX" "on", this option will let me use 3D accelerated desktop.
Second section is my configuration file is Files section. The lines here are pointing to Fonts catalogs and X server modules catalog.
In Module section you may see X server modules that are loaded during X server startup. The modules glx and dri are important for 3D acceleration.
Next thing is InputDevice sections. You can see here that I'm using evdev driver for my mouse and keyboard and that I'm also using asus_laptop keyboard model, which let me use some of my notebook multimedia keys in my system. Another important thing is Option "SHMConfig" "on" in Synaptics touchpad configuration section. This option lets me enable and disable Touchpad support in runtime.
Next sections are very important as they are defining my monitor settings. First thing you can see here are modes configurations for my Sony Bravia TV. I need them because sometimes I use my TV as my second screen. In my monitor definitions important things are PrefferedMode options which determine default screen resolutions for every screen. Mostly I use my Notebook attached to projector and most of the projectors I use have native resolution 1024x768, thats why I choose this resolution as PreferredMode for Generinc monitor definition. As you can see positioning of screen is defined in monitor section. By default my Generic monitor will be positioned on the right of my Default monitor. Same I did for my Sony Bravia TV monitor definition. Thats how you define screen positioning for RandR 1.2 specification. Additionally you may find here a monitor definition for S-Video TV out connector of my notebook graphics card. If I will use this output I will have a TV screen on the left with native resolution 800x600.
Now the most important thing here the Device section definition which will use opensource Radeon driver. First important thing here is: Option "NoAccel" "False", this way I will have 3D acceleration from graphics driver. My old graphics card is using 4x AGP bus thats why I put: Option"BusType""AGP" and Option "AGPMode" "4" options into my configuration. My graphics card has 64MB of dedicated video memory I set this by adding: Option "GARTSize" "64". Another important options for acceleration are: Option "RenderAccel" "True" and Option "DRI" "True". You can experiment with the setting Option "AccelMethod". The "XAA" is considered as more stable then "EXA" thats why I decided to use this one. The Driver "radeon" and BusID "PCI:1:0:0" are important for choosing the opensource Radeon driver. The last options are monitor definitions according to RandR 1.2 and Radeon driver specifications. LVDS is build in laptop screen, VGA-0 is VGA secondary output and S-video is TV S-video output. As you can see I'm able to change my definitions for VGA-0 from generic to Sony Bravia TV monitor definitions by uncommenting and commenting its definition lines. You can experiment with other options I do not use, but beware some of them may be highly experimental and can behave ugly. As an example I can say that Option "AGPFastWrite" "True" was cosing a hard lock of my notebook just after logging into X server.
As you can see below of Radeon Device section I have also generic Vesa Device driver definition. it's always good to have some backup in case of problems with configuration.
The last important sections are Screen sections on the lower part of my configuration file. As you can see I do not define modes in my screen section for Radeon Driver instead I'm setting virtual screen size to 2960x1050. You have to define virtual screen size to be large enough to accommodate all defined above monitors. Using sizes above 2048x2048 is not recommended as this may end in not being able to use 3D acceleration support. As you can see Screen settings for generic Vesa driver are standard.
If you intend to use 3D desktop you can not disable the Option "Composite" extension.
I would additionally recommend installation of driconf GUI DRI configuration tool. This tool will let you utilize 3D acceleration in more advanced way. In Gentoo Linux you can install this tool by running following command in terminal:
emerge -av driconf
Prove that it's working
Sources
- ThinkWiki RandR 1.2 HowTo
- man radeon
- man xorg.conf
- man Xorg
- man xrandr
Wstęp
Konfiguracja karty graficznej ATI w Linuxie zawsze doprowadzała mnie do szału. Byłem tak zirytowany faktem, że przy wykorzystaniu sterownika własnościowego nie mogłem uzyskać jednocześnie akceleracji w grach i na pulpicie 3D, że pozbyłem się karty graficznej ATI z głównego komputera i kupiłem sobie lśniącą kartę NVidia, która oczywiście działała w tym zakresie bez zarzutu. Niestety pozbycie się karty graficznej ATI z mojego notebooka nie mogło być brane pod uwagę, musiałem znaleźć inne rozwiązanie problemu. Przez dłuższy czas używał notebooka z własnościowym sterownikiem fglrx, który wraz z serwerem XGL zapewniał mi funkcjonowanie desktopu 3D. Musiałem pogodzić się z faktem, że nie będę mógł na nim pograć. Przez dłuższy czas ignorowałem także wiele związanym z funkcjonowaniem sterownika fglrx komunikatów kernela. Tak naprawdę ten sterownik nigdy nie działał zbyt stabilnie, a w końcu jako, że mam starą kartę Radeon 9600, okazało się, że nowsze wersje sterownika ATI catalyst dla Linuxa mają usunięte wsparcie dla mojej karty graficznej. Musiałem więc podjąć decyzję co jest dla mnie ważniejsze, czy posiadanie własnościowego sterownika ATI ze starym kernelem, czy też możliwość aktualizowanie kernela i rezygnacja z tego nie trzymającego się kupy sterownika. Zdecydowania wolę mięć możliwość aktualizowania kernela. I to była bardzo dobra decyzja bo okazało się, że otwarty sterownik Radeon oferuje funkcje, z których nie mogłem skorzystać z własnościowym sterownikiem. Dodatkowo istotne jest, że ten sterownik wspiera specyfikację RandR 1.2, daje mi to więc możliwość efektywnego wykorzystania konfiguracji podwójnych lub nawet potrójnych ekranów. Stanowi to dodatkowy dowód, że rozwijanie oprogramowania opartego na otwartych źródłach jest najlepszą metodą na rozwiązywanie typowych problemów ze sterownikami. Postaram się podzielić moją konfiguracją mając nadzieję, że pomoże ona komuś jeszcze.
Muszę dodać, że nie mam pojęcia jaką jakość prezentują dzisiejsze sterowniki własnościowe ATI dla Linuxa. Możliwe, że AMD po przejęciu ATI naprawiło bardzo wiele rzeczy. Ale jako, że miałem bardzo złe doświadczenia ze wsparciem dla Linuxa ze strony ATI, minie sporo czasu zanim ktokolwiek przekona mnie abym kupił, jakikolwiek produkt sygnowany znakiem ATI.
Jak napisałem powyżej mam starą kartę ATI Mobility Radeon 9600 w swoim notebooku, jako że używam Gentoo Linuxa z pełną optymalizacją sprzętową mogę efektywnie wykorzystać nawet bardzo stary sprzęt. Moja konfiguracja wspiera pulpit 3D, konfigurację dwóch ekranów a także akcelerację grafiki dla starszych gier przy użyciu wolnego i opartego na otwartych źródłach sterownika Radeon. Pamiętaj jeśli stosujesz moje rozwiązanie robisz to na własną odpowiedzialność. Rozpocznę opis od konfiguracji kernela.
Konfiguracja kernela
Aby używać akceleracji zarówno dla pulpitu 3D jak i gier będziesz musiał się upewnić, że posiadasz wsparcie dla DRM Radeon wkompilowane do kernela. Nie polecam kompilacji DRM Radeon jako modułu, osobiście doświadczyłem twardych zawieszeń systemu, kiedy próbowałem ładować DRM Radeon jako moduł. Możesz sprawić konfigurację swojego kernela pod tym kątem wydając następujące komendy w terminalu (zakładam, że posiadasz źródła kernela w /usr/src/linux):
cd /usr/src/linux cat .config | grep DRM_RADEON
Jeśli widzisz:
CONFIG_DRM_RADEON=y
to możesz przejśc do instalacji sterownika opensource Radeon. Jeśli natomiast widzisz:
CONFIG_DRM_RADEON=n
lub
# CONFIG_DRM_RADEON is not set
to muszisz zaznaczyć tę opcję w swom kernelu. Możesz tego dokonać wykonując:
cd /usr/src/linux make menuconfig
Następnie przejdź do Device Drivers --> Graphics Support --> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support), zaznacz ostatnią wymienioną opcję, jeśli nie jest już zaznaczona a nstępnie wejdź do niej i zaznacz ATI Radeon. Zapisz zmiany i wyjdź z menuconfig. Teraz musisz przekompilować i zainstalować nowy kernel. Jeśli nie wiesz jak to zrobić zajrzyj do dokumentacji twojej dystrybucji. Ja zwykle robię to w ten sposób w Gentoo Linuxie:
cd /usr/src/linux make && make modules_install install
Teraz powinieneś mieć wsparcie dla DRM Radeon bezpośrednio w kernelu. Możesz zrestartować komputer używając nowego kernela.
Instalacja otwartego sterownika Radeon
Instalacja opartego na otwartych źródłach sterownika może się różnić w zależności od dystrybucji systemu. Możliwe, że instalacja serwera X dla twojej dystrybucji posiada ten sterownik i nie musisz robić nic więcej. Jeśli masz wątpliwości zajrzyj do dokumentacji twojej dystrybucji. Poniżej opisane kroki będą działać w Gentoo Linuxie i oprarych na nim dystrybucjach. Najpierw musimy się upewnić, że mamy właściwą konfigurację kart graficznych w naszym pliku make.conf. Możemy to sprawdzić wykonując następujące polecenie w terminalu:
cat /etc/make.conf | grep VIDEO_CARDS VIDEO_CARDS="radeon vesa v4l"
Jak widzisz posiadam obsługę karty radeon. Jeśli otrzymałeś inny wynik, wyedytuj plik /etc/make.conf i dodaj ciąg radeon do zmiennej VIDEO_CARDS. Kolejna rzecz to upewnienie się, że wszystkie pakiety, które wykorzystują to ustawienie zostaną przekompilowane. Możesz sprawdzić, które pakiety korzystają z tego ustawienia wykorzystując narzędzie equery z pakietu gentoolkit w ten sposób:
equery hasuse video_cards_radeon [ Searching for USE flag video_cards_radeon in all categories among: ] * installed packages [I--] [ ~] x11-base/xorg-drivers-1.8 (0) [I--] [ ~] x11-libs/libdrm-2.4.20-r1 (0) [I--] [ ~] sys-power/pm-utils-1.3.0-r3 (0) [I--] [ ~] media-libs/mesa-7.8.1 (0) [I--] [ ~] dev-libs/DirectFB-1.4.3 (0)
Jak widzisz na liście pakieŧów znajduje się pakiet xorg-drivers. Ten pakiet zainstaluje otwarty sterownik Radeon jako zależność. Upewnij się, że przekompilowałeś wszystkie te pakiety, zanim przystąpisz do dalszych kroków konfiguracji. Jeśli chcesz w 100% upewnić się, że posiadasz otwarty sterownik Radeon w swoim systemie, możesz dodatkowo wykonać następujące polecenie:
emerge -pv x11-drivers/xf86-video-ati [ebuild R ] x11-drivers/xf86-video-ati-6.12.6
Ostatnią rzeczą jaką musisz wykonać na tym etapie jest sprawdzenie, że twój system używa akceleracji opengl serwera Xorg. To jest szczególnie ważne, jeśli zmieniasz sterownik własnościowy na steronik otwarty. Możesz dokonać tego wykonując następujące polecenie w terminalu:
eselect opengl set xorg-x11 Switching to xorg-x11 OpenGL interface... done
Konfiguracja serwera Xorg
Tutaj znajdziesz kompletny plik Xorg.conf, który zapewnia konfigurację dwóch ekranów używając specyfikacji RandR 1.2 i akcelerację 3D dla otwartego sterownika Radeon.
Section "ServerLayout" Identifier "X.org Configured" Screen "Radeon Main Screen" InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Synaptics0" Option "AIGLX" "on" Option "AllowEmptyInput" "off" EndSection Section "Files" ModulePath "/usr/lib/xorg/modules" FontPath "/usr/share/fonts/misc/" FontPath "/usr/share/fonts/TTF/" FontPath "/usr/share/fonts/OTF" FontPath "/usr/share/fonts/Type1/" FontPath "/usr/share/fonts/100dpi/" FontPath "/usr/share/fonts/75dpi/" FontPath "/usr/share/fonts/Speedo" EndSection Section "Module" Load "ddc" Load "glx" Load "extmod" SubSection "extmod" Option "omit xfree86-dga" EndSubSection Load "record" Load "dbe" Load "dri" Load "bitmap" Load "freetype" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "evdev" Option "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-event-kbd" Option "AutoRepeat" "500 5" Option "Xleds" "1 2 3" Option "XkbDisable" Option "XkbModel" "asus_laptop" Option "XkbLayout" "pl" Option "XkbVariant" ",winkeys" Option "XkbOptions" "eurosign:5,terminate:ctrl_alt_bksp" EndSection Section "InputDevice" Identifier "Mouse0" Driver "evdev" Option "Protocol" "auto" Option "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-event-mouse" Option "ZAxisMapping" "4 5 6 7" EndSection Section "InputDevice" Identifier "Synaptics0" Driver "synaptics" Option "Protocol" "auto" Option "SendCoreEvents" "true" Option "Protocol" "auto" Option "SHMConfig" "on" EndSection #Modes configuration for TV Sony Bravia 32 KDL32S2030 Section "Modes" Identifier "Modes_SONY" Mode "WXGA_1360x768" # vfreq 60.015Hz, hfreq 47.712kHz DotClock 85.500000 HTimings 1360 1424 1536 1792 VTimings 768 771 777 795 Flags "+HSync" "+VSync" EndMode Mode "WXGA_1280x768" # vfreq 59.870Hz, hfreq 47.776kHz DotClock 79.500000 HTimings 1280 1344 1472 1664 VTimings 768 771 778 798 Flags "+HSync" "-VSync" EndMode Mode "XGA_1024x768" # vfreq 60Hz, hfreq 48.4kHz DotClock 65.000000 HTimings 1024 1032 1176 1344 VTimings 768 771 777 806 Flags "+HSync" "-VSync" EndMode EndSection # Configuration for Default LVDMS panel Section "Monitor" Identifier "DefaultMonitor" Option "DPMS" "true" Option "PreferredMode" "1280x800" EndSection # Configuration for Generic Monitor as 2nd screen Section "Monitor" Identifier "Generic" VendorName "Unknown" ModelName "Unknown" Option "DPMS" "true" Option "Right Of" "DefaultMonitor" Option "PreferredMode" "1024x768" EndSection # Configuration for TV-Monitor Section "Monitor" Identifier "TV-Monitor" VendorName "Unknown" ModelName "Unknown" Option "DPMS" "true" Option "Left Of" "DefaultMonitor" Option "PreferredMode" "800x600" EndSection #Configuration for Sony Bravia 32in Secondary LCD TV/Monitor Section "Monitor" Identifier "Sony_Bravia_32in" Option "DPMS" "true" VendorName "Sony" ModelName "Bravia 32 inches" UseModes "Modes_SONY" #HorizSync 31.5-47.8 #VertRefresh 60 Option "Right Of" "DefaultMonitor" Option "PreferredMode" "WXGA_1360x768" EndSection # Radeon Open Source Driver 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" "False" #Option "SWcursor" # [<bool>] #Option "Dac6Bit" # [<bool>] #Option "Dac8Bit" # [<bool>] Option "BusType" "AGP" #Option "CPPIOMode" # [<bool>] #Option "CPusecTimeout" # <i> Option "AGPMode" "4" #Option "AGPFastWrite" "True" This option makes the system hardlock #Option "AGPSize" "64" Option "GARTSize" "64" #Option "RingSize" # <i> #Option "BufferSize" # <i> #Option "EnableDepthMoves" # [<bool>] Option "EnablePageFlip" "True" #Option "NoBackBuffer" # [<bool>] Option "DMAForXv" "True" #Option "FBTexPercent" # <i> #Option "DepthBits" # <i> #Option "PCIAPERSize" # <i> Option "AccelDFS" "True" #Option "IgnoreEDID" # [<bool>] #Option "DisplayPriority" # [<str>] #Option "PanelSize" # [<str>] #Option "ForceMinDotClock" # <freq> Option "ColorTiling" "True" #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" "True" #Option "SubPixelOrder" # [<str>] #Option "ShowCache" # [<bool>] #Option "DynamicClocks" "True" #Option "VGAAccess" # [<bool>] #Option "ReverseDDC" # [<bool>] #Option "LVDSProbePLL" # [<bool>] Option "AccelMethod" "XAA" Option "DRI" "True" #Option "ConnectorTable" # <str> #Option "DefaultConnectorTable" # [<bool>] #Option "DefaultTMDSPLL" # [<bool>] Option "TVDACLoadDetect" "True" #Option "ForceTVOut" # [<bool>] Option "TVStandard" "pal" #Option "IgnoreLidStatus" # [<bool>] #Option "DefaultTVDACAdj" # [<bool>] #Option "Int10" # [<bool>] #Option "EXAVSync" # [<bool>] #Option "ATOMTVOut" # [<bool>] #Option "R4xxATOM" # [<bool>] Identifier "Radeon Open Driver" Driver "radeon" VendorName "ATI Technologies Inc" BoardName "RV350 [Mobility Radeon 9600 M10]" BusID "PCI:1:0:0" Option "monitor-LVDS" "DefaultMonitor" Option "monitor-VGA-0" "Generic" # Option "monitor-VGA-0" "Sony_Bravia_32in" Option "monitor-S-video" "TV-Monitor" EndSection #Configuration for Generic Vesa Device Driver no 3D accel Section "Device" Identifier "Generic Vesa" Driver "vesa" BusID "PCI:1:0:0" # Driver specific options Option "ShadowFB" "on" Option "ModeSetClearScreen" "on" Option "monitor-LVDS" "DefaultMonitor" EndSection Section "Screen" Identifier "Radeon Main Screen" Device "Radeon Open Driver" DefaultDepth 24 SubSection "Display" Depth 24 Virtual 2960 1050 EndSubSection EndSection Section "Screen" Identifier "Vesa Main Screen" Device "Generic Vesa " DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 1 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Viewport 0 0 Depth 4 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Viewport 0 0 Depth 8 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Viewport 0 0 Depth 15 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Viewport 0 0 Depth 16 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Depth 24 Modes "1024x768" "800x600" ViewPort 0 0 EndSubSection EndSection Section "dri" Mode 0666 EndSection Section "Extensions" Option "Composite" "Enable" EndSection
Teraz postaram się wyjaśnić tę konfigurację. Skupię się na ustawieniach najważniejszych dla konfiguracji dwóch ekranu i akceleracji 3D.
Pierwszą rzeczą jaką zobaczysz jest sekcja ServerLayout. Ta sekcja wykorzystuje konfiguracje zdefiniowane poniżej w moim pliku konfiguracyjnym xorg.conf. Ważną rzeczą jest Option "AIGLX" "on", ta opcja pozwala mi korzystać z pulpitu 3D.
Drugą sekcją w moim pliku konfiguracyjnym jest sekcja Files. W tej sekcji wskazuje ścieżki do katalogów z czcionkami i katalog z modułami serwera X.
W sekcji Module możesz zobaczyć moduły serwera X, które są ładowane podczas jego startu. Moduły glx i dri są ważne dla akceleracji 3D.
Kolejną sekcją jest sekcja InputDevice. Tutaj możesz zobaczyć, że używam sterownika evdev dla mojej myszy i klawiatury a także, że wskazałem asus_laptop jako model mojej klawiatury. Pozwala mi to wykorzystać w systemie niektóre z przycisków multimedialnych mojego notebooka. Kolejną ważną rzeczą jest opcja: Option "SHMConfig" "on" w konfiguracji touchpada Synaptics. Ta opcja pozwala mi włączać i wyłączać obsługę touchpada w trakcie pracy systemu.
Kolejne sekcje są bardzo istotne, jako że definiują one ustawienia monitorów. Pierwszą rzeczą jaką możesz tutaj zobaczyć jest konfiguracja modów dla mojego telewizora Sony Bravia. Wpisałem je ponieważ czasami wykorzystuję mój telewizor jako drugi ekran. W moich definicjach monitorów kluczową rzeczą są opcje PrefferedMode, które określają domyślną rozdzielczość każdego z ekranów. Najczęściej wykorzystuję notebooka podłączonego do projektora a większość projektorów do, których go podłączam, używa natywnej rozdzielczości 1024x768, właśnie dla tego wybrałem tę rozdzielczość jako PreferredMode dla definicji monitora Generinc. Jak możesz zobaczyć pozycjonowanie ekranów względem siebie jest określone w sekcji definicji monitora. Domyślnie mój monitor Generic będzie umiejscowiony po prawej mojego monitora domyślnego. Tak samo postąpiłem z konfiguracją monitora dla telewizora Sony Bravia. W ten sposób definiuje się pozycjonowanie ekranów dla specyfikacji RandR 1.2. Dodatkowo możesz zobaczyć tutaj definicję monitora dla wyjścia S-Video karty graficznej mojego notebooka. Jeśli wykorzystam to wyjście będę miał ekran TV po lewej stronie z natywną rozdzielczością 800x600.
Teraz najważniejsza rzecz w moim pliku konfiguracyjnym czyli definicja sekcji Device, która wykorzysta otwarty sterownik Radeon. Pierwszą ważną rzeczą tutaj jest opcja: Option "NoAccel" "False", dzięki temu będę miał akcelerację 3D ze sterownika graficznego. Moja stara karta posiada złącze AGP 4x właśnie dla tego dodałem opcję: Option"BusType""AGP" i opcję: Option "AGPMode" "4" do mojej konfiguracji. Moja karta graficzna posiada 64MB dedykowanej pamięci video, ustawiłem to dodając opcję: Option "GARTSize" "64". Kolejnymi ważnymi opcjami dla akceleracją są opcje: Option "RenderAccel" "True" i Option "DRI" "True". Możesz poeksperymentować z ustawieniem Option "AccelMethod". Wartość "XAA" jest uznawana za bardziej stabilną niż "EXA" właśnie dla tego wykorzystuję tą pierwszą. Opcje Driver "radeon" i BusID "PCI:1:0:0" są kluczowe dla sterownika otwartego Radeon. Ostatnie opcje to definicję monitorów zgodna ze specyfikacją RandR 1.2 i specyfikacją sterownika Radeon. LVDS to wbudowany ekran laptopa, VGA-0 to dodatkowe złącze VGA a S-video to wyjście telewizyjne S-video. Jak widzisz mogę zmieniać definicję dla VGA-0 z definicji monitora Generic na monitor Sony Bravia TV poprzez odkomentowywanie i zakomentowywanie odpowiednich linii w pliku konfiguracyjnym. Możesz poeksperymentować z innymi opcjami, których ja nie wykorzystuję, ale uważaj gdyż niektóre z ich są eksperymentalne i mogą zachowywać się w niesympatyczny sposób. Jako przykład mogę powiedzieć, że opcja Option "AGPFastWrite" "True" powodowała zawieszanie się mojego komputera zaraz po zalogowaniu do systemu graficznego.
Jak widzisz poniżej sekcji Device dla sterownika Radeon mam definicję sekcji Device dla sterownika Vesa. Dobrze jest mieć konfigurację zapasową na wypadek problemów.
Ostatnimi ważnymi sekcjami są sekcje Screen w dolnej części mojego pliku konfiguracyjnego. Jak widzisz nie definiuję modów w sekcji Screen dla sterownika otwartego Radoen zamiast nich ustawiam rozmiar ekranu wirtualnego na 2960x1050. Należy zdefiniować rozmiar ekranu wirtualnego tak aby był wystarczająco duży aby pomieścić wszystkie powyższe definicję monitorów. Zdefiniowanie rozmiaru większego niż 2048x2048 nie jest zalecane, jako że może się zakończyć niemożliwością wykorzystania akceleracji 3D. Jak widzisz ustawienia sekcji Screen dla sterownika Vesa są standardowe.
Jeśli zamierzasz używać pulpit 3D nie możesz wyłączyć opcji: Option "Composite".
Dodatkowo polecam instalację narzędzia z graficznym interfejsem użytkownika driconf. To narzędzie pozwoli ci skonfigurować akcelerację 3D w bardziej zaawansowany sposób. W Gentoo Linuxie możesz zainstalować to narzędzie wydając następujące polecenie w terminalu:
emerge -av driconf
Dowód, że to działa
Źródła
- ThinkWiki RandR 1.2 HowTo
- man radeon
- man xorg.conf
- man Xorg
- man xrandr
Here you can find screenshots proving that above configuration is acting as expected.
If larger picture is still to small for you click it to enlarge it.