tirdc (tirdc) wrote,

gdm multihead xrandr workaround

This is totally unrelated to Radeon development, but I couldn't find a good guide for that.

I'm using a Laptop with an external TFT attached to it for my work. It works great using gnome-display-properties to setup the displays when I'm logged in. But it really lacks a "Apply for all users" setting. So it always bothered me that gdm was using mirror mode (or clone mode) for the login. That looks really awful. And since I'm not a big fan of hard coding display settings in my xorg.conf(.d) (and the external display is not connected all the time as this is a laptop) I came up with the following solution:

1.) Open /etc/gdm/Init/Default in your favorite editor

2.) Put the following code right before "/sbin/initctl -q emit login-session-start DISPLAY_MANAGER=gdm"


VGA1_PRESENT=`xrandr | grep "VGA1 connected"`
if [ "x${VGA1_PRESENT}x" != "xx" ]; then
xrandr --output LVDS1 --auto --pos 0x0 --primary
xrandr --output VGA1 --auto --right-of LVDS1
fi


3.) Restart X.org

There might be better solutions to this but I could not find any. I hope it helps other that face the same issue.
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded  

  • 2 comments