[SOLVED] Primary monitor settings are being ignored

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
armadillo64

[SOLVED] Primary monitor settings are being ignored

Post by armadillo64 »

I've recently installed Mint 14 MATE on a new build PC. All was going well until I started to make use of my NVIDIA graphics card.

I have two monitors - the second monitor is a TV at the other side of the room connected by HDMI. Because of the layout of the room it makes sense to have my TV set as the left-hand monitor. I installed nvidia-settings and moved the second monitor to the left, and made sure the other (right-hand) monitor was set as the primary.

Unfortunately the primary monitor setting does not seem to be fully respected. Whilst my panels now appear on the right-hand monitor as expected, new windows are opened by default on the left-hand monitor. Even more annoying, the login screen always appears on my secondary (left-hand) monitor.

I've used xrandr to change the default monitor (both as myself and as root):

Code: Select all

xrandr -q
xrandr --output DVI-D-0 --primary
sudo xrandr --output DVI-D-0 --primary
and I've also changed the monitor preferences with mate-display-properties as well as nvidia-settings to make sure the DVI monitor is the primary, and I've done this as both as myself and root.

Does anyone have any ideas how this can be changed? I also can't get compiz effects working yet, I don't know if that's related.

Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
n1tr0g3n

Re: Primary monitor settings are being ignored

Post by n1tr0g3n »

You can try Arandr I like it better than messing with Nvidia settings and it's really simple to use.


You can install it by running

apt-get install arandr

or get it from the software center.
armadillo64

Re: Primary monitor settings are being ignored

Post by armadillo64 »

n1tr0g3n wrote:You can try Arandr I like it better than messing with Nvidia settings and it's really simple to use.


You can install it by running

apt-get install arandr

or get it from the software center.
Thanks, unfortunately that doesn't give me access to any settings that fix this issue.
armadillo64

Re: [SOLVED] Primary monitor settings are being ignored

Post by armadillo64 »

I managed to fix this by getting compiz working and then using the Place Windows plugin. Setting Multi-output mode to 'Use output device with pointer' gives the desired effect. The instructions in http://community.linuxmint.com/tutorial/view/919 and http://community.linuxmint.com/tutorial/view/1148 can be used to get compiz working. Make sure the Window decoration and Move Windows plugins are turned on in ccsm before you turn compiz on though!

I had to take an extra few steps to get the login screen to appear in the correct window. To do this I had to edit the script that gets run by the MDM user when the login screen is started. Instructions on how to do this can be found at http://www.gregfreeman.org/2012/fix-wro ... nt-ubuntu/.
lightweight

Re: [SOLVED] Primary monitor settings are being ignored

Post by lightweight »

If it helps someone, I've just implemented the following script for the MDM (Mint Display Manager) which runs on a laptop which is connected to a second, larger display either via VGA or HDMI... I put this in a file, e.g. /usr/local/bin/logindisplay.sh, and call it from /etc/mdm/Init/Default, e.g. by putting the following lines just before the final "exit(0)"

Code: Select all

##
# call this when starting the display manager if an externa screen is plugged in via VGA or HDMI:
LOGINDISP="/usr/local/bin/logindisplay.sh"
# if the file exists and is executable
if [ -x  ]; then
  $LOGINDISP
fi
and then in LOGINDISP (whatever filename you decide to use):

Code: Select all

#!/bin/bash
# the default primary display                                                                                                               
D1="LVDS1"

# lists the second display label, ignoring the default display
D2=`xrandr | grep -v $D1 | egrep "\sconnected" | cut -d ' ' -f 1`

# if there's a second display, enable it and set it to primary and to the right of the default                                              
if [ -n "$D2" ] ; then
  xrandr --output $D2 --primary --auto  --output $D1 --auto --left-of $D2
fi
Locked

Return to “MATE”