# ATI Dual Head Tweaking

## jserink

Hello All:

I've managed to get my X1600 Mobility card working in dual head mode with acceleration enabled. I used the aticonfig utility to do it and I highly recommend everyone to use it as the glxgears performance was ~3times better than the hand written xorg.conf I was previously using and is much simpler to look at.

The only problem I'm having is X events on the screen 1 seem to be lagging. Page scrolling, mouse clicking, that sort of thing has a noticeable lag on the right screen as compared to screen 0 which is the lap top screen.

Relevant sections of my xorg.conf file:

Section "Screen"

        Identifier "aticonfig-Screen[0]"

        Device     "aticonfig-Device[0]"

        Monitor    "aticonfig-Monitor[0]"

        DefaultDepth     24

        SubSection "Display"

                Viewport   0 0

                Depth     24

        EndSubSection

EndSection

Section "Screen"

        Identifier "aticonfig-Screen[1]"

        Device     "aticonfig-Device[1]"

        Monitor    "aticonfig-Monitor[1]"

        DefaultDepth     24

        SubSection "Display"

                Viewport   0 0

                Depth     24

        EndSubSection 

Section "Device"

        Identifier  "aticonfig-Device[0]"

        Driver      "fglrx"

        Option      "VideoOverlay" "on"

        Option      "OpenGLOverlay" "off"

        Option      "OverlayOnCRTC2" "1"

        Option      "Capabilities" "0x00000800"

        Option      "PseudoColorVisuals" "on"

        Option      "UseFastTLS" "off"

        BusID       "PCI:1:0:0"

EndSection

Section "Device"

        Identifier  "aticonfig-Device[1]"

        Driver      "fglrx"

        BusID       "PCI:1:0:0"

        Screen      1

EndSection

Section "Monitor"

        Identifier   "aticonfig-Monitor[0]"

        Option      "VendorName" "ATI Proprietary Driver"

        Option      "ModelName" "Generic Autodetecting Monitor"

        Option      "DPMS" "true"

EndSection

Section "Monitor"

        Identifier   "aticonfig-Monitor[1]"

        Option      "VendorName" "ATI Proprietary Driver"

        Option      "ModelName" "Generic Autodetecting Monitor"

        Option      "DPMS" "true"

EndSection

Section "Module"

        Load  "dbe"     # Double buffer extension

        SubSection "extmod"

                Option      "omit xfree86-dga"   # don't initialise the DGA extension

        EndSubSection

        Load  "freetype"

EndSection

Section "ServerLayout"

        Identifier     "Simple Layout"

        Screen      0  "aticonfig-Screen[0]" 0 0

        Screen         "aticonfig-Screen[1]" RightOf "aticonfig-Screen[0]"

        InputDevice    "Mouse1" "CorePointer"

        InputDevice    "Keyboard1" "CoreKeyboard"

EndSection

Cheers,

JohnLast edited by jserink on Mon Aug 25, 2008 1:40 am; edited 2 times in total

----------

## jserink

Hi All:

Ok, to review, the symptoms...slow redraw response on screen1, primarily when using the mouse wheel. Particularly annoying when using a web browser. This does not occur on screen0, the laptop display.

Screen0:

jserink@jerinkturion ~ $ glxgears

27467 frames in 5.0 seconds = 5493.344 FPS

27501 frames in 5.0 seconds = 5500.004 FPS

27491 frames in 5.0 seconds = 5498.000 FPS

Screen1:

jserink@jerinkturion ~ $ glxgears

18546 frames in 5.0 seconds = 3709.196 FPS

18672 frames in 5.0 seconds = 3734.241 FPS

18731 frames in 5.0 seconds = 3746.054 FPS

If I run glxgears on both at the sametime, it can lockup the whole machine.

I have tired disabling xinerama, aiglx and both together, no effect.

Looking for some pointers on how to improve response on screen1. Particularly so as it is my primary monitor.

Cheers,

John

----------

## jserink

Right, I got this going....

The trick is you MUST use amdcccle, the ATI catalyst control centre, to activate bigdesktop. EVEN if you had it working and you took your laptop home, ran it without the second screen, then return to the office, you need to run the ATI control centre to re-enable it...it comes up the last way it was everytime;

Here is my Xorg config....I'm on an Acer Ferarri 5000 with an X1600 mobility.

Section "ServerLayout"

        Identifier     "Simple Layout"

        Screen      0  "aticonfig-Screen[0]" 0 0

        InputDevice    "Mouse1" "CorePointer"

        InputDevice    "Synaptic Pad" "SendCoreEvents"

        InputDevice    "Keyboard1" "CoreKeyboard"

EndSection

Section "Files"

        FontPath     "/usr/share/fonts/misc/"

        FontPath     "/usr/share/fonts/Type1/"

        FontPath     "/usr/share/fonts/100dpi/"

        FontPath     "/usr/share/fonts/75dpi/"

        FontPath     "/usr/share/fonts/arphicfonts/"

        FontPath     "/usr/share/fonts/baekmuk-fonts/"

        FontPath     "/usr/share/fonts/corefonts/"

        FontPath     "/usr/share/fonts/freefont-ttf/"

        FontPath     "/usr/share/fonts/liberation-fonts-ttf/"

        FontPath     "/usr/share/fonts/Speedo/"

        FontPath     "/usr/share/fonts/TTF/"

        FontPath     "/usr/share/fonts/truetypemine/"

        FontPath     "/usr/share/fonts/Type1/"

EndSection

Section "Module"

        Load  "dbe"     # Double buffer extension

        SubSection "extmod"

                Option      "omit xfree86-dga"   # don't initialise the DGA extension

        EndSubSection

        Load  "freetype"

EndSection

Section "InputDevice"

        Identifier  "Keyboard1"

        Driver      "kbd"

        Option      "AutoRepeat" "500 30"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))

        Option      "XkbRules" "xorg"

        Option      "XkbModel" "pc104"

        Option      "XkbLayout" "us"

EndSection

Section "InputDevice"

        Identifier  "Mouse1"

        Driver      "mouse"

        Option      "Protocol" "IMPS/2" # IntelliMouse PS/2

        Option      "Device" "/dev/input/mice"

# When using XQUEUE, comment out the above two lines, and uncomment

        Option      "ZAxisMapping" "4 5 6 7"

# Emulate3Buttons is an option for 2-button mice

        Option      "Emulate3Buttons"

#    Option "Emulate3Timeout"    "50"

# ChordMiddle is an option for some 3-button Logitech mice

#    Option "ChordMiddle"

EndSection

Section "InputDevice"

#       Option      "Corepointer"

        Identifier  "Synaptic Pad"

        Driver      "synaptics"

        Option      "Device" "/dev/misc/psaux"

        Option      "Protocol" "auto-dev"

        Option      "LeftEdge" "1900"

        Option      "RightEdge" "5400"

        Option      "TopEdge" "1900"

        Option      "BottomEdge" "4000"

        Option      "FingerLow" "25"

        Option      "FingerHigh" "30"

        Option      "MaxTapTime" "0"

        Option      "MaxTapMove" "220"

        Option      "VertScrollDelta" "100"

        Option      "MinSpeed" "0.02"

        Option      "MaxSpeed" "0.18"

        Option      "AccelFactor" "0.0010"

        Option      "SHMConfig" "on"

        Option      "Buttons" "7"

        Option      "ZAxisMapping" "4 5"

EndSection

Section "Monitor"

        Identifier   "aticonfig-Monitor[0]"

        Option      "VendorName" "ATI Proprietary Driver"

        Option      "ModelName" "Generic Autodetecting Monitor"

        Option      "DPMS" "true"

EndSection

Section "Device"

#       Option      "Textured2D" "on"

#       Option      "VideoOverlay" "On"

#       Option      "OpenGLOverlay" "Off"

#       Option      "Centermode" "on"

        Identifier  "aticonfig-Device[0]"

        Driver      "fglrx"

        Option      "DesktopSetup" "horizontal"

#       Option      "UseFastTLS" "0"

        Option      "Capabilities" "0x00000800"

#       Option      "PseudoColorVisuals" "on"

        Option      "PairModes" "1680x1050+1680x1050"

#       Option      "EnableMonitor" "lvds,lvds"

        Option      "Centermode" "on"

        BusID       "PCI:1:0:0"

EndSection

Section "Screen"

        Identifier "aticonfig-Screen[0]"

        Device     "aticonfig-Device[0]"

        Monitor    "aticonfig-Monitor[0]"

        DefaultDepth     24

        SubSection "Display"

                Viewport   0 0

                Depth     24

        EndSubSection

EndSection

Cheers,

John

----------

## Phlogiston

Can you have real dual head now? I mean can you move windows from one "screen" to another?

----------

## jserink

 *Phlogiston wrote:*   

> Can you have real dual head now? I mean can you move windows from one "screen" to another?

 

Yup, works a treat.

The only issue is that sometimes the adjustments in the amdcccle app are greyed out, don't know why. If that happens I use randr to adjust the resolution.

Cheers,

John

----------

## jserink

I have however, been unsuccessful thus far getting the HDMI port working.

What I really want to do is use the VGA port and HDMI port and close my laptop so that I have 2 x 22" LCDs wot work with rather than my laptop screen and my single 22" LCD.

Has anyone got HDMI working with an X1600 based card?

Cheers,

john

----------

## Phlogiston

 *jserink wrote:*   

>  *Phlogiston wrote:*   Can you have real dual head now? I mean can you move windows from one "screen" to another? 
> 
> Yup, works a treat.
> 
> The only issue is that sometimes the adjustments in the amdcccle app are greyed out, don't know why. If that happens I use randr to adjust the resolution.
> ...

 

how did you do it? Did you just use the generated xorg.conf?

----------

## jserink

use aticonfig, aticonfig --help gives you all the options.

----------

## Phlogiston

 *jserink wrote:*   

> use aticonfig, aticonfig --help gives you all the options.

 

Yes, but what base config do you use? its important to have only one screen?

This is my current old config: http://rafb.net/p/lv57UV47.html

----------

## Phlogiston

What I got working so far is a true dualhead output, but the resolution on the external monitor was only 800x600 and I could not change it... anyone has an idea?

jserink: Could you remove the [solved]?

/edit: Anyone knows what the Centermode Option is for?

----------

## jserink

There are a bunch of Ubuntu forum threads I used as my guide in setting it up....and a bit of mucking about.

If you look at the aticonfig --help ....note, its actually /opt/bin/aticonfig --help there is a switch called "initial".

What you do is start out with a super simple xorg.conf, like something generated by xorgconfig. Then you run the aticonfig --initial blah, blah

Like this:

xorgconfig (answer all the questions),

aticonfig --initial=dual-head --screen-layout=right

I think that is how I did it. Keep the xorg simple, most of the advanced ATI options will be set automatically and you'll get the fastest glxgears results with the simpliest xrog.conf file.

STart from there and go for you. You should also have xrandr installed as that will help you when amdccc grays out the bigdesktop option.

Note, it does NOT boot into bigdesktop, it always boots into clone mode. You have to change it once its running.

Cheers,

john

----------

## Phlogiston

Ok thanks, when I tried yesterday I either had no real bigdesktop (could not move windows) or the external monitor complained about wrong input (maybe too high refresh rate or resolution).

You did not use other options? I mean you start X after aticonfig --initial=dual-head --screen-layout=right  and then play around with amdccle and xrandr? Can you (with this xorg setting) have one single mode too? I mean without touching the config again? Because here, I still could move the cursor out of the screen although there was no monitor connected nor set in amdccle.

All in all its really annoying. :S 

Last question: When its working, does everything work? I mean video plaing in fullscreen? Flash from youtube for example did not scale correctly here... what about glx? Do you have direct rendering on whole "screen"?

Thanks a lot for answering my questions.

----------

## jserink

 *Phlogiston wrote:*   

> 
> 
> Last question: When its working, does everything work? I mean video plaing in fullscreen? Flash from youtube for example did not scale correctly here... what about glx? Do you have direct rendering on whole "screen"?
> 
> Thanks a lot for answering my questions.

 

At first I tried dual monitors which is 2 different desktops on two different screens this was OK except the DRI on the VGA port screen sucked. It said it was there but fps was ~275 on glsgears and only ~500 on the laptop primary.

Now its this:

Laptop screen:

jserink@jerinkturion ~/Solar $ glxgears

21774 frames in 5.0 seconds = 4354.719 FPS

21956 frames in 5.0 seconds = 4391.163 FPS

On the VGA port:

jserink@jerinkturion ~ $ glxgears

21177 frames in 5.0 seconds = 4235.252 FPS<--- started on the laptop screen

17255 frames in 5.0 seconds = 3450.886 FPS<---dragged it over on this session

21360 frames in 5.0 seconds = 4271.954 FPS<---from here down, totally on the external VGA monitor.

21601 frames in 5.0 seconds = 4320.065 FPS

21446 frames in 5.0 seconds = 4288.890 FPS

Yah, everything works.

Check out these links:

http://www.jumpingbean.co.za/blogs/mark/linux-ati-driver-tutorial-how-to

http://adventuresinswitching.blogspot.com/2008/04/ubuntu-desktop-screenshot-of-day-7-ati.html

The last one is good as it has about 6 links to others on Ubuntu that got ATI working.

The think you need to understand about the ATI proprietary drivers is that the aticonfig utility actually modifies your xorg.cong file for you. My xorg.conf file is shown above and it works perfectly, its quite simple as both my monitors are in 1680x1050 resolution so my total resolution is 3360x1050 with DRI. It rocka, I love it but it took some fiddling to get going. No matter what I do however, everytime I power up, I must either run amdccc or randr to get bigdesktop back. It never boots up like that, it ALWAYS comes up in clone mode.

Good luck.

Cheers,

John

----------

## Phlogiston

 *jserink wrote:*   

>  My xorg.conf file is shown above and it works perfectly, its quite simple as both my monitors are in 1680x1050 resolution so my total resolution is 3360x1050 with DRI. It rocka, I love it but it took some fiddling to get going. No matter what I do however, everytime I power up, I must either run amdccc or randr to get bigdesktop back. It never boots up like that, it ALWAYS comes up in clone mode.
> 
> Good luck.
> 
> Cheers,
> ...

 

I hope that it does work with different resolutions too. 

When you need to run amdcccle or xrandr, you start the application and then it works or you need to do the settings there everytime?

----------

## jserink

 *Phlogiston wrote:*   

>  *jserink wrote:*    My xorg.conf file is shown above and it works perfectly, its quite simple as both my monitors are in 1680x1050 resolution so my total resolution is 3360x1050 with DRI. It rocka, I love it but it took some fiddling to get going. No matter what I do however, everytime I power up, I must either run amdccc or randr to get bigdesktop back. It never boots up like that, it ALWAYS comes up in clone mode.
> 
> Good luck.
> 
> Cheers,
> ...

 

All you do with xrandr or amdccc is change the mode from clone to bigdesktop.

That's it. I do it once I'm already in KDE,

Cheers,

John

----------

## Phlogiston

 *jserink wrote:*   

>  *Phlogiston wrote:*    *jserink wrote:*    My xorg.conf file is shown above and it works perfectly, its quite simple as both my monitors are in 1680x1050 resolution so my total resolution is 3360x1050 with DRI. It rocka, I love it but it took some fiddling to get going. No matter what I do however, everytime I power up, I must either run amdccc or randr to get bigdesktop back. It never boots up like that, it ALWAYS comes up in clone mode.
> 
> Good luck.
> 
> Cheers,
> ...

 

I now tried it. This is my current xorg.conf:http://rafb.net/p/hG4svp70.html

It does boot up not in clone mode, but in two independent displays somehow, no idea what to call that (its 2 desktops, so no dragging, only mouse cursor is movable).

In amdccle its grayed out to select anything else than "Single Independent Display".

So how do I use xrandr now exactly to fix that?

----------

## Phlogiston

Ok, after 2 freezes and reboots I think I finally get there  :Smile:  The only remaining problem is that the external monitor does complaing about an input signal out of range. So maybe I could add the sync rates manually? But how? Thanks for any hint!

----------

## jserink

 *Phlogiston wrote:*   

> Ok, after 2 freezes and reboots I think I finally get there :) The only remaining problem is that the external monitor does complaing about an input signal out of range. So maybe I could add the sync rates manually? But how? Thanks for any hint!

 

use aticonfig when it X with some of the query options, the card will tell you.

What kind of monitor is it?

it it needs special sync rates, those need to be in your xorg.conf file, but ATI cards can usually get this sorted on the fly...unless the monitor is really old.

Cheers,

john

----------

## Phlogiston

 *jserink wrote:*   

>  *Phlogiston wrote:*   Ok, after 2 freezes and reboots I think I finally get there  The only remaining problem is that the external monitor does complaing about an input signal out of range. So maybe I could add the sync rates manually? But how? Thanks for any hint! 
> 
> use aticonfig when it X with some of the query options, the card will tell you.
> 
> What kind of monitor is it?
> ...

 

I found the information on the internet, its a hp vs19b, best at 1280x1024@60. And how do I add it to xorg.conf? I don't know why the driver is unable to set it correctly. It totally sucks!

----------

## jserink

 *Phlogiston wrote:*   

>  *jserink wrote:*    *Phlogiston wrote:*   Ok, after 2 freezes and reboots I think I finally get there :) The only remaining problem is that the external monitor does complaing about an input signal out of range. So maybe I could add the sync rates manually? But how? Thanks for any hint! 
> 
> use aticonfig when it X with some of the query options, the card will tell you.
> 
> What kind of monitor is it?
> ...

 

3. Setting up modes for primary display.

                        aticonfig --resolution=0,1280x1024,1024x768

----------

## Phlogiston

 *jserink wrote:*   

> 
> 
> 3. Setting up modes for primary display.
> 
>                         aticonfig --resolution=0,1280x1024,1024x768

 

Hmm and how should this affect the refresh rate?

----------

## Phlogiston

I cleaned out my xorg.conf a bit: http://rafb.net/p/NfpMcZ12.html .

Now its almost working, but the external monitor still says that the input signal is out of range. And I don't think its the resolution, but the refresh rate that is wrong.

When I go to amdccle, I can select other resolutions: with 2560x1024 it does not work, but when I choose: 2048x1024 or 1824x768 it works like it should. It even starts up with this configuration I want.

So this is only one small thing I think. But I have no clue how to set the refresh rate on the external monitor, or is the resultion just wrong? If so why and how could I change that?

----------

## Phlogiston

yehaaa! Finally got it working: http://rafb.net/p/IlapzH16.html

Not sure what option it was in the end, but now it even is set correctly after starting X.

One weird thing remains though:

When I have no monitor connected, it starts in single mode of course, but as soon as I log into kde4 I can move my mouse pointer out of the screen to the right side...

----------

## jserink

 *Phlogiston wrote:*   

> yehaaa! Finally got it working: http://rafb.net/p/IlapzH16.html
> 
> Not sure what option it was in the end, but now it even is set correctly after starting X.
> 
> One weird thing remains though:
> ...

 

That is strange. Mine starts up with the mouse cursor on the far right of my laptop display, when no external monitor is connected, my display is normal however. I'm using kde3.59. Do you have Xrandr installed?

Also, have you set you monitor types correctly? Aticonfig can do this for you when you are in x, you can query the monitors and the ati driver will tell you what it thinks is connected. See the aticonfig help for more details.

Glad its mostly working for you!

Have you been able to figure out how to get your hdmi port to work?

Cheers,

John

----------

## Phlogiston

I think its correct with the monitor types. Furthermore I don't have a hdmi port here....

Thanks again for your help.

PS: I'm running kde 4.1

----------

## jserink

I have my video in bios set to auto, selection options are internal, external, both, auto...I leave it in auto.

Maybe that's what the issue is on your setup?

----------

## Phlogiston

 *jserink wrote:*   

> I have my video in bios set to auto, selection options are internal, external, both, auto...I leave it in auto.
> 
> Maybe that's what the issue is on your setup?

 

Hmm no I don't think so... but I have another issue: For normal usage I need DisplaySize set, however with an external monitor the size of the fonts on the laptop get wrong then. I have no idea how to set that on the fly. xrandr does not work.

----------

## jserink

Oh dear, that sounds messy.

I'm lucky as my external monitor is exactly the same resolution as my laptop monitor, 1680 x 1050...plus, I'm getting old so I set my fonts rather big.

Can you describe a bit more about what the font problem is?

Cheers,

john

----------

