LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Multi Monitor Setup Under AMD Proprietary Driver (FGLRX) (http://www.linuxquestions.org/questions/slackware-14/multi-monitor-setup-under-amd-proprietary-driver-fglrx-4175493526/)

ack_iix 02-03-2014 04:56 AM

Multi Monitor Setup Under AMD Proprietary Driver (FGLRX)
 
Hello fellow Slackers at LQ,

I just happen to get a new HP notebook with Radeon HD6770M graphic adapter and I use the latest AMD beta driver (version 13.11) which run flawlessly in Slackware64 14.1. 3D acceleration works, KDE desktop effect works fine, movie playback works fine, etc.

But, every time I plugged in a second monitor the display would get screen corruption and the display would get garbled. Can anybody with an AMD GPU suggest what I must do to have a functional dual head setup.

Here's my xorg.conf file as a reference
Code:

Section "ServerLayout"
        Identifier  "Main Layout"
        Screen  0  "Screen-0"  0 0
        Screen      "Screen-1"  LeftOf "Screen-0"
        Option      "Clone"    "off"
        Option      "Xinerama"  "off"
EndSection

Section "Module"
        Load  "freetype"
        Load  "glx"
        Load  "dbe"
        Load  "extmod"
        Load  "dri"
EndSection

Section "Monitor"
        Identifier  "LVDS1"
        Option      "PreferredMode" "1920x1080"
        Option      "DPMS"          "true"
EndSection

Section "Monitor"
        Identifier  "VGA1"
        Option      "PreferredMode" "1366x768"
        Option      "DPMS"          "true"
EndSection

Section "Monitor"
        Identifier  "HDMI1"
        Option      "PreferredMode" "1920x1080"
        Option      "DPMS"          "true"
EndSection

Section "Device"
        Identifier  "Radeon HD 6770M"
        Driver      "fglrx"
        BusID      "PCI:1:0:0"
        Option      "EnableRandR12" "false"
EndSection

Section "Screen"
        Identifier "Screen-0"
        Device    "Radeon HD 6770M"
        Monitor    "LVDS1"
        DefaultDepth  24
        SubSection "Display"
                Viewport 0 0
                Depth  24
        EndSubSection
EndSection

Section "Screen"
    Identifier      "Screen-1"
    Device          "Radeon HD 6770M"
    Monitor        "VGA1"
    DefaultDepth    24
    SubSection "Display"
        Viewport 0  0
        Depth    24
                Modes  "1920x1080" "1366x768"
    EndSubSection
EndSection

Section "Screen"
    Identifier      "Screen-2"
    Device          "Radeon HD 6770M"
    Monitor        "HDMI1"
    DefaultDepth    24
    SubSection "Display"
        Depth    24
        Modes    "1366x768" "1920x1080"
    EndSubSection
EndSection

Section "DRI"
    Mode 0666
EndSection

Thanks for your reply

ReaperX7 02-03-2014 11:19 PM

It looks okay...

BTW ATI driver BETA-14.1-20140201 is now available.

ack_iix 02-04-2014 08:03 PM

Display corruption only occured in KDE / KDM
 
Tried installing the AMD 14.1 beta driver yesterday, still same problem with dual monitor setup.

Out of curiosity I tried to boot to init 3, change the default session to XFCE and run startx - no display corruption, although XFCE dual monitor setup requires additional setup with xrandr.

It seems this problem only happens in KDE or KDM, I've tried to google it to no avail - some people in the internat said that in the Catalyst Control Centre there's an option to setup a dual monitor, but that option is completely absent in my setup.

Kind of confused now, any input from AMD users in LQ?

Thanks

ReaperX7 02-04-2014 08:25 PM

Using a display manager is often hit or miss with some hardware drivers. If runlevel 3 works best for you along with Xfce, you might consider staying with them. KDE and Gnome services can be started by Xfce just as well as they could in their native environments. Plus it also has a lower memory, GPU, and CPU usage rate. Have you also looked into disabling the Compositor on KDE by chance if it's enabled?

ack_iix 02-04-2014 09:24 PM

Need to disable RandR12 extension
 
One final step before I call it quit.

After more goggling, I found in many other Linux forums (Ubuntu, Arch, Gentoo) that to enable dual display from Catalyst Control Center the RandR extension must be disabled. The problem is all of those solution in those forum post came from 2009 / 2010 which apparently does not work anymore with the current X.org server.

I've tried adding these to the xorg.conf.
Code:

Option          "EnableRandR12" "false"
And issuing these command from terminal (without X running / init 3).
Code:

aticonfig --set-pcs-str="DDX,EnableRandR12,FALSE"
The result in /etc/ati/amdspecdb is good.
Code:

[dwi@europa:fglrx]$ cat /etc/ati/amdpcsdb | grep -i randr
EnableRandR12=SFALSE

But after reboot I still got message that RandR12 is still enabled, here the summary from Xorg.0.log.
Code:

[dwi@europa:fglrx]$ cat /var/log/Xorg.0.log | grep -i randr
[    34.379] Initializing built-in extension RANDR
[    36.238] (II) fglrx(0): RandR 1.2 support is enabled!
[    36.238] (II) fglrx(0): RandR 1.2 rotation support is enabled!
[    36.285] (II) fglrx(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[    36.286] (WW) fglrx(0): Option "EnableRandR12" is not used
[    36.318] (--) RandR disabled
[    36.817] (II) fglrx(0): Restoring Recent Mode via PCS is not supported in RANDR 1.2 capable environments

And of course the fglrx driver cannot control dual-display setup when RandR12 is enabled, this may explain why I don't have the display manager option under Catalyst Control Center.
Code:

[dwi@europa:fglrx]$ aticonfig --query-monitor
Error: option --query-monitor is not supported when RandR 1.2 is enabled!

So anybody knows how to disable the RandR extension in the Slackware64 X.org? Maybe it is possible to recompile X.org server without this extension, but I'm afraid that will break many things.

Thanks for your input.

ReaperX7 02-04-2014 10:16 PM

Try running this from runlevel 3:

1. Plug in both monitors and run these command inside an X session.

Code:

rm -rf /etc/ati/amdpcsdb
then run...

Code:

aticonfig --initial
2. Restart X and see if it resets xrandr properly.

This is all I could find. Other than that, I have no idea.

ack_iix 02-06-2014 09:51 AM

Finally some progress!
 
Ok, apparently there's some nasty bug with AMD Catalyst driver especially in my case because I have this switchable GPU setup (Intel + Radeon).

Found a solution in Arch Linux Catalyst wiki in here, explaining that some xrandr hack may be needed and it works wonder in my case.

The command is like:
Code:

xrandr --output LVDS1 --auto --left-of VGA1 --primary --scale 1x1 --output VGA1 --auto --scale 1.0001x1.0001
And more information in these Arch Linux forum about setting up a udev rule to execute the xrandr command above every-time a monitor is plugged in.

Basically I created a simple bash script in /usr/local/bin/monitor-hotplug:
Code:

#!/bin/bash

export DISPLAY=:0
export XAUTHORITY=/home/dwi/.Xauthority

function connect() {
        xrandr --output LVDS1 --auto --left-of VGA1 --primary --scale 1x1 \
                --output VGA1 --auto --scale 1.0001x1.0001
}

function disconnect() {
        xrandr --output VGA1 --off
}

xrandr | grep "VGA1 connected" &> /dev/null && connect || disconnect

And create a custom udev rule for it in /etc/udev/rules.d/95-monitor-hotplug.rules:
Code:

KERNEL=="card0", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/dwi/.Xauthority", RUN+="/usr/local/bin/monitor-hotplug"
And finally when I plug a second monitor no more screen corruption.

Still there's some problem with this setup:
- It will not run if I have my 2nd monitor plugged in before KDE session is started. Even if I plug my 2nd monitor in KDM I still got garbled screen.
- If I log out from KDE while the monitor is still plugged in, X.org server would crash - still investigating this issue.

Just a few more issue left to be ironed out, anybody have more suggestion what to do next? Hope this post also helps some people out there who's frustrated with their fglrx driver.


Thanks for your reply

ReaperX7 02-06-2014 10:16 AM

Does this happen with the xorg driver also?

ack_iix 02-06-2014 09:14 PM

I haven't tried running dual monitor with the FOSS Radeon driver yet, but with the Intel driver (i915) dual monitor works flawlessly without any issue.

ReaperX7 02-06-2014 09:19 PM

Because you have a switchable graphics card you probably should try to manually create an xorg.conf file for each one labeled such as:

xorg-radeon.conf

xorg-intel.conf

and then create a symlink of xorg.conf to which one you choose to use. This way you can easily recreate the symlink back to the other if you need to switch cards.

I used this trick on an old Alienware laptop I used years ago to switch between my GMA900 and GeForce GO 6600 when necessary. Crude, but it worked very well.


All times are GMT -5. The time now is 12:51 PM.