LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-13-2009, 12:47 AM   #1
mkoco
Member
 
Registered: Feb 2008
Location: US, New Jersey
Distribution: Slackware
Posts: 88

Rep: Reputation: 17
dual screen with radeon


Dual monitor support on the open-source radeon drivers works perfectly. Xrandr and xorg.conf make the process pretty intuitive and relatively painless.

For anyone interested:

xorg.conf
Code:
# One BIG screen to RULE them all

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

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

Section "Monitor"
	Identifier "Integrated LCD"
EndSection

Section "Monitor"
	#DisplaySize	  370   230	# mm
	Identifier   "External LCD"
	VendorName   "Dell"
	Option       "RightOf" "Integrated LCD"
EndSection


Section "Device"
	Identifier "card0"
	Driver	   "radeon"
	BusID	   "PCI:1:0:0"
	Option     "Monitor-VGA-0" "External LCD"
	Option	   "Monitor-LVDS"  "Integrated LCD"
	Option 	   "HWcursor"	   "False"
EndSection

Section "Screen"
	Identifier "Wide Screen"
	Device     "card0"
	DefaultDepth 24
	SubSection "Display"
		Viewport   0 0
		Depth     16
		Modes	  "1440x900"
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Virtual   2720 1024 
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier "Simple Layout"
	Screen 	"Wide Screen"
	InputDevice "Mouse0" "CoreMouse"
	InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "DRI"
	Mode 0666
EndSection
And a little script to detect whether the laptop has the external VGA monitor plugged in, and, if so, set screen positions and fluxbox settings properly.
setscreen.sh:
Code:
#!/bin/sh

EXTERNAL_OUTPUT="VGA-0"
INTERNAL_OUTPUT="LVDS"

xrandr | grep $EXTERNAL_OUTPUT | grep " connected "
if [ $? -eq 0 ]; then
	xrandr --output $INTERNAL_OUTPUT --auto --mode 1440x900 --pos 0x124 \
    --output $EXTERNAL_OUTPUT --auto --pos 1440x0
    
    grep "toolbar.widthPercent:   90" /home/mtkoan/.fluxbox/init
    if [ $? -eq 0 ]; then
    	sed 's/toolbar.widthPercent:   90/toolbar.widthPercent:   50' /home/mtkoan/.fluxbox/init \
    	> /home/mtkoan/.fluxbox/init.new
    	rm /home/mtkoan/.fluxbox/init
    	mv /home/mtkoan/.fluxbox/init.new /home/mtkoan/.fluxbox/init
    fi
else
    xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --off
    
    grep "toolbar.widthPercent:   50" /home/mtkoan/.fluxbox/init
    if [ $? -eq 0 ]; then
    	sed 's/toolbar.widthPercent:   50/toolbar.widthPercent:   90' /home/mtkoan/.fluxbox/init \
    	> /home/mtkoan/.fluxbox/init.new
    	rm /home/mtkoan/.fluxbox/init
    	mv /home/mtkoan/.fluxbox/init.new /home/mtkoan/.fluxbox/init
    fi
fi
Only thing that's cropped up is under dual screen, my mouse cursor will shimmer and start to distort every now and again. If I move it, it goes away. Was playing with enable/disable HWcursor option in "Device" section of xorgconf, but no luck.
 
Old 12-14-2009, 12:50 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Thannk's for the xorg.conf setting and script, I'll will reuse part of it for my laptop / VGA output settings.

As a side note, I don't know what is you graphic card's chipset, but if it's r600/r700 you can get 3D + Kernel Mode Setting with it using a 2.6.32 kernel according to this Changelog
 
Old 12-15-2009, 10:01 AM   #3
mkoco
Member
 
Registered: Feb 2008
Location: US, New Jersey
Distribution: Slackware
Posts: 88

Original Poster
Rep: Reputation: 17
Its an ATI Radeon Mobility x1400 in a Dell Laptop. I think its chipset is r520. But I'm going to give 2.6.32 a shot anyway-- support is probably better nonetheless.
 
Old 12-15-2009, 07:39 PM   #4
mkoco
Member
 
Registered: Feb 2008
Location: US, New Jersey
Distribution: Slackware
Posts: 88

Original Poster
Rep: Reputation: 17
Running the 2.6.32 kernel now. 2D support feels faster. Also compiled with 'uvesafb' so I have a 1400x900 console, which is nice. Also setup KMS for radeon, and it didn't crash, but how do I tell if its working?

As far as 3D, here is glxinfo:
Code:
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
....
OpenGL vendor string: Mesa Project
OpenGL renderer string: Software Rasterizer
OpenGL version string: 2.1 Mesa 7.5
OpenGL shading language version string: 1.20
Says direct rendering, but showing Mesa and "Software Rasterizer"?
glxgears running at about ~250 fps, which is quite slow.

Cursor still sometimes gets distorted when running X in dual screen. Argh.

But yea, new kernel is nice
 
Old 12-15-2009, 10:17 PM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by mkoco View Post
Also setup KMS for radeon, and it didn't crash, but how do I tell if its working?
I boot at runlevel 3 then use "startx" to start X (did I write something funny?). With KMS enabled Fluxbox is ready in ~ 1 second, else it takes a lot more time. Same going back to console mode. I didn't try suspend to RAM or disk and resume from one of these states (IOW, sleep or hibernate and awake) but this should be safer. FYI I use the "nouveau" driver as I have a Nvidia GPU but as far as KMS is in concern that shouldn't make much difference

Last edited by Didier Spaier; 12-15-2009 at 10:57 PM.
 
Old 12-16-2009, 03:57 AM   #6
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Quote:
Originally Posted by mkoco View Post
Running the 2.6.32 kernel now. 2D support feels faster. Also compiled with 'uvesafb' so I have a 1400x900 console, which is nice. Also setup KMS for radeon, and it didn't crash, but how do I tell if its working?
What is the output of 'cat /proc/fb' ?

Quote:
As far as 3D, here is glxinfo:
Code:
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
....
OpenGL vendor string: Mesa Project
OpenGL renderer string: Software Rasterizer
OpenGL version string: 2.1 Mesa 7.5
OpenGL shading language version string: 1.20
Says direct rendering, but showing Mesa and "Software Rasterizer"?
glxgears running at about ~250 fps, which is quite slow.
Yeah, you aren't using 3D acceleration. Please show us your /var/log/Xorg.0.log file.

Adam
 
Old 12-16-2009, 06:09 PM   #7
mkoco
Member
 
Registered: Feb 2008
Location: US, New Jersey
Distribution: Slackware
Posts: 88

Original Poster
Rep: Reputation: 17
cat /prob/fb:
Code:
0 radeondrmfb
Xorg.0.log is attached -- was too long to post.

Hm, here:
Code:
(EE) RADEON(0): [dri] RADEONDRIGetVersion failed because of a version mismatch.
[dri] radeon.o kernel module version is 2.0.0 but version 1.17.0 or newer is needed.
[dri] Disabling DRI.
That doesn't sound quite right, does it? Not sure what to do about it though.
Attached Files
File Type: txt Xorg.0.log_12-16-09.txt (49.5 KB, 11 views)

Last edited by mkoco; 12-16-2009 at 06:22 PM. Reason: added content
 
Old 12-16-2009, 06:46 PM   #8
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Alright, well you are definitely using KMS. The version mismatch error is misleading. 99.9% of the time, it's because your xf86-video-ati driver wasn't built with support for KMS. You need to compile libdrm (possibly from git, if you are using 2.6.32, but libdrm 2.5.16 might be recent enough) and you need to configure it with the --enable-radeon-experimental-api option. Then you need to build xf86-video-ati. After running configure (or autogen.sh) for xf86-video-ati, it should show: "Kernel modesetting: yes". If not, then it didn't pick up the newer libdrm.

Adam
 
Old 12-17-2009, 10:51 AM   #9
octoberblu3
Member
 
Registered: Oct 2005
Distribution: Slackware64-current
Posts: 67

Rep: Reputation: 22
Quote:
Originally Posted by adamk75 View Post
You need to compile libdrm (possibly from git, if you are using 2.6.32, but libdrm 2.5.16 might be recent enough) and you need to configure it with the --enable-radeon-experimental-api option.
libdrm 2.4.16 should be good as I am currently using it with kernel 2.6.32.1, mesa 7.7-rc2, and xf86-video-ati from git.

The libdrm needs the option specified above with configure, and the rest should find the libdrm_radeon.so automatically. Watch the configure scripts for mesa and xf86-video-ati to pick up the option properly.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Radeon 9200 Dual Screen on Slackware 12 aghufran Linux - Hardware 1 12-17-2007 09:00 AM
Radeon 9200 Dual Screen on Slackware 12 aghufran Linux - Newbie 1 12-13-2007 07:11 AM
Radeon 9200 Dual Screen on Slackware 12 aghufran Linux - General 1 12-13-2007 07:10 AM
Radeon 9200 Dual Screen on Slackware 12 aghufran Linux - Software 1 12-13-2007 07:10 AM
Radeon 9200 Dual Screen on Slackware 12 aghufran Slackware 1 12-13-2007 07:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration