tirdc (tirdc) wrote,
tirdc
tirdc

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.
Subscribe

  • Update dri-log Android app

    I'd like to announce an update for the dri-log Android app users, the mobile version the DRI IRC log. The app recently gained with a complete…

  • Clover moves to the main mesa repository

    Until now Clover was developed in a separate git repository (and some forks on github as well). But today Francisco Jerez started preparing to add…

  • DRI-log Android App

    Did you ever wonder what is discussed between graphics hardware developers? If so, you might have found the IRC Logs. It is a handy and small web…

  • 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