# Choppy windows



## z662 (Feb 27, 2011)

I am running xorg 7.5 and KDE 4.5.5 on a new laptop I just purchased (Toshiba Satellite L675D).  I am having issues regarding dragging windows around on the desktop.  They are very choppy (slow rendering/updating) and leads me to believe that I am either using the wrong drivers and/or having issues with a lack of hardware acceleration.  My graphics card is an ATI Mobility Radeon HD 4200.  I have posted my xorg.conf file below but on a side note I am concerned that it is not my TRUE configuration.  In other words, when I boot up, my xorg.conf file is used, but in order to enable dual monitors and change my resolution I must go to the KDE system settings/display configuration and use the GUI to select my desired settings.  I do not know how to get KDE to remember these settings and place them into xorg.conf.  In any event, both methods still produce choppy windows.  Any help would be greatly appreciated.  Thanks in advance.


```
Section "ServerLayout"
    Identifier     "XFree86 Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option	   "Clone" "off"
EndSection

Section "ServerFlags"
        Option "AutoAddDevices" "False"
        Option "AllowEmptyInput" "Off"
EndSection

Section "Files"
    ModulePath      "/usr/local/lib/xorg/modules"
    FontPath        "/Programs/fonts/"
    FontPath        "/usr/local/lib/X11/fonts/cyrillic/"
    FontPath        "/usr/local/lib/X11/fonts/TrueType/"
    FontPath        "/usr/local/lib/X11/fonts/webfonts/"
    FontPath        "/usr/local/lib/X11/fonts/misc/"
    FontPath        "/usr/local/lib/X11/fonts/TTF/"
    FontPath        "/usr/local/lib/X11/fonts/Type1/"
    FontPath        "/usr/local/lib/X11/fonts/CID/"
    FontPath        "/usr/local/lib/X11/fonts/75dpi/"
    FontPath        "/usr/local/lib/X11/fonts/100dpi/"
    FontPath        "/usr/local/lib/X11/fonts/dejavu/"
    FontPath        "/usr/local/lib/X11/fonts/local/"
EndSection

Section "Module"
    Load           "ddc"
    Load           "dbe"
    Load           "extmod"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "keyboard"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us"
    Option         "XkbVariant" ""
EndSection

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

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "LGD"
    ModelName      "1ca"
EndSection



Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "LGD"
    ModelName      "1ca"
EndSection


Section "ServerFlags"
    Option         "Xinerama" "1"
    Option "AutoAddDevices" "False"
    Option "AllowEmptyInput" "Off"
EndSection


Section "Device"
    Identifier      "Card0"
    Screen           0
    Driver         "radeonhd"
    VendorName     "Radeon Video Driver"
    Option	   "XAANoOffscreenPixmaps" "true"
    Option	   "AccelMethod" "EXA"
    Option	   "DRI" "true"
    BusID      "PCI:1:5:0"
EndSection

Section "Device"
    Identifier      "Card1"
    Screen           1
    Driver         "radeonhd"
    VendorName     "Radeon Video Driver"
    Option	   "XAANoOffscreenPixmaps" "true"
    Option	   "AccelMethod" "EXA"
    Option	   "DRI" "true"
    BusID      "PCI:1:5:0"
EndSection


Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "Monitor0"
    DefaultDepth   24
    SubSection     "Display"
        Depth      24 
        Modes      "1024x768"
    EndSubSection
EndSection


Section "Screen"
    Identifier     "Screen1"
    Device         "Card1"
    Monitor        "Monitor1"
    DefaultDepth   24
    SubSection     "Display"
        Depth      24 
        Modes      "1024x768"
    EndSubSection
EndSection
```


----------



## adamk (Feb 27, 2011)

First, you should not be using xinerama.  The second you enable that in your xorg.conf file, acceleration gets disabled.  Since you're using only one GPU, you should be using xrandr.

Second, the radeonhd driver is old, undeveloped, and unsupported.  The *only* situation where radeonhd is preferred over radeon on FreeBSD is if you need to use HDMI audio from the video card.

Here's my xorg.conf file for using dualhead on an HD4850 (and HD2600).


```
Section "Monitor"
      Identifier "DVI-1"
      Option "PreferredMode" "1680x1050"
EndSection

Section "Monitor"
      Identifier "DVI-0"
      Option "RightOf" "DVI-1"
EndSection

Section "ServerLayout"
	Identifier     "Default Layout"
	Screen        "Screen0" 0 0
	InputDevice    "Keyboard0" "CoreKeyboard"
	InputDevice    "Mouse0" "CorePointer"
	Option 	"AIGLX" "on"
	Option  "AutoAddDevices" "off"
	Option  "DontZap" "off"
	Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

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

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option	    "XkbModel" "pc105"
	Option	    "XkbLayout" "us"
        Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Section "Device"
	Identifier  "Videocard0"
	Driver      "radeon"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Videocard0"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Virtual	3120 2074
	EndSubSection
EndSection

Section	"DRI"
	Mode 	0666
EndSection
```

Edit:  The Identifiers used for the monitors are the port names given by xrandr.

Adam


----------



## wblock@ (Feb 27, 2011)

z662 said:
			
		

> I am running xorg 7.5 and KDE 4.5.5 on a new laptop I just purchased (Toshiba Satellite L675D).  I am having issues regarding dragging windows around on the desktop.  They are very choppy (slow rendering/updating) and leads me to believe that I am either using the wrong drivers and/or having issues with a lack of hardware acceleration.
> 
> 
> ```
> ...



Please, please remove the AllowEmptyInput Off setting.  It frequently causes draggy mouse input, or keyboard input only appearing when the mouse is moved.  It may be causing the problem you're seeing now: AllowEmptyInput, FreeBSD, and Xorg Input

PS: You have two ServerFlags sections, which are easier handled by removing them and just putting any remaining options in the ServerLayout section.


----------



## z662 (Feb 27, 2011)

Thank you both for the replies.  I have done as Adam said and also used your xorg.conf file with subtle changes (also removing the options that are not needed per wblock's comment)

Now my dual monitors work and there is no chop.  However, I still am faced with the issue that I must go into KDE's display control panel and enable dual monitors and the desired resolution.  I do not understand why my xorg.conf file is not being used properly, or at least in entirety.  Is there anyway to export my configuration that is built after using the GUI tool to a file and then just saving that as my xorg.conf file?  Is this happening because I have not properly set up my xorg.conf file to utilize both monitors properly? VGA-0 and LVDS are mentioned in my Xorg.0.log file.  Would they be my Identifiers??  I have posted a subset of my Xorg.0.log file below since the file is very long and exceeds the character limit for the forums. 


```
(II) RADEON(0): Will try to use DMA for Xv image transfers
(II) RADEON(0): Detected total video RAM=262144K, accessible=262144K (PCI BAR=262144K)
(--) RADEON(0): Mapped VideoRAM: 262144 kByte (128 bit DDR SDRAM)
(II) RADEON(0): Color tiling disabled
(II) Loading sub module "ddc"
(II) LoadModule: "ddc"
(II) Module "ddc" already built-in
(II) Loading sub module "i2c"
(II) LoadModule: "i2c"
(II) Module "i2c" already built-in
(II) RADEON(0): PLL parameters: rf=10000 rd=12 min=90000 max=120000; xclk=40000
(WW) RADEON(0): LVDS Info:
XRes: 1600, YRes: 900, DotClock: 97750
HBlank: 184, HOverPlus: 48, HSyncWidth: 48
VBlank: 12, VOverPlus: 2, VSyncWidth: 3
(II) RADEON(0): Output VGA-0 has no monitor section
(II) RADEON(0): I2C bus "VGA-0" initialized.
(II) RADEON(0): Output LVDS has no monitor section
(II) RADEON(0): I2C bus "LVDS" initialized.
(II) RADEON(0): Output HDMI-0 has no monitor section
(II) RADEON(0): I2C bus "HDMI-0" initialized.
(II) RADEON(0): Port0:
  XRANDR name: VGA-0
  Connector: VGA
  CRT1: INTERNAL_KLDSCP_DAC1
  DDC reg: 0x7e40
(II) RADEON(0): Port1:
  XRANDR name: LVDS
  Connector: LVDS
  LCD1: INTERNAL_KLDSCP_LVTMA
  DDC reg: 0x7e50
(II) RADEON(0): Port2:
  XRANDR name: HDMI-0
  Connector: HDMI-A
  DFP1: INTERNAL_UNIPHY
  DDC reg: 0x7e60
```

My new xorg.conf is below.  Thanks again.


```
Section "Monitor"
      Identifier "DVI-1"
      Option "PreferredMode" "1600x900"
EndSection

Section "Monitor"
      Identifier "DVI-0"
      Option "RightOf" "DVI-1"
EndSection

Section "ServerLayout"
	Identifier     "Default Layout"
	Screen        "Screen0" 0 0
	InputDevice    "Keyboard0" "CoreKeyboard"
	InputDevice    "Mouse0" "CorePointer"
	Option 	"AIGLX" "on"
	Option  "AutoAddDevices" "off"
	Option  "DontZap" "off"
	Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

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

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option	    "XkbModel" "pc105"
	Option	    "XkbLayout" "us"
        Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Section "Device"
	Identifier  "Videocard0"
	Driver      "radeon"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Videocard0"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Virtual	3120 2074
	EndSubSection
EndSection
```


----------



## adamk (Feb 27, 2011)

z662 said:
			
		

> I do not understand why my xorg.conf file is not being used properly, or at least in entirety.



It is being used properly.



> Is there anyway to export my configuration that is built after using the GUI tool to a file and then just saving that as my xorg.conf file?



No.



> Is this happening because I have not properly set up my xorg.conf file to utilize both monitors properly?



Yes.



> VGA-0 and LVDS are mentioned in my Xorg.0.log file.  Would they be my Identifiers??



Probably.  As I said above, the Identifiers are the port names given by xrandr.  LVDS and VGA-0 sound correct, but 'xrandr' will let you know.


----------



## z662 (Feb 27, 2011)

I just ran xrandr and confirmed that my identifiers were wrong in my xorg.conf.  I just swapped them and it works great!  The only thing that I find interesting is that when booting up my secondary monitor has random garbage on the screen until KDE is done booting up.  I am not sure if you know what I am talking about but this also happened on my desktop with an nvidia card. Is that normal?  It is not very important to me, as now everything works, but just thought Id ask anyhow.

Thanks a lot Adam!


----------



## adamk (Feb 27, 2011)

It's probably a scrambled remnant of whatever was in video ram before the reboot.  Out of curiousity, does it happen if you boot the system from a completely off state?

Adam


----------



## z662 (Feb 27, 2011)

No it doesnt.  Im assuming that means you are correct?


----------



## adamk (Feb 28, 2011)

Yeah, that seems to suggest that I'm right.  Not sure there's anything that can be done about that.  I think it doesn't happen with KMS, but you'll have to wait for KMS to get ported to FreeBSD.

Adam


----------

