LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Dual monitor problem - setting primary monitor (https://www.linuxquestions.org/questions/linux-hardware-18/dual-monitor-problem-setting-primary-monitor-4175572599/)

trentfox 02-18-2016 10:33 AM

Dual monitor problem - setting primary monitor
 
2 Attachment(s)
I am running Ubuntu 15.10 on a 2012 iMac with an external Dell monitor attached and attempting to control the monitor setup with the Nvidia driver version 352.63 settings. I don't think this is relevant, but just in case, the internal monitor has 1920x1080 resolution; the external has 1680 x 1050 resolution. The X Server Nvidia settings app gives me the opportunity to select which monitor is the primary display for the x-screen, and for this I select the internal monitor. But this doesn't seem to matter; when I start up the computer it always defaults to the external monitor for initial login and the window location for any app I start up (until I move it over to the other monitor). I looked at both the xorg.conf settings and the output of xrandr -q (both attached), and the external monitor is referred to as "DP-1" and the internal as "DP-2". The xrandr output also refers to DP2 as the primary, but it isn't, at least not until I reopen the X Server Nvidia settings app after startup. The xorg.conf file, section Monitor, seems to refer to the internal monitor as "Monitor0" if I am interpreting the output correctly, and "Device0" as the nvidia graphics card in my Mac. I am not an advanced user and I don't know how to manipulate the monitor settings other than through the GUI X Server Nvidia settings, and this doesn't seem to do any good as far as making the internal monitor the primary monitor. I would really appreciate any advice as to how I can reverse this.

Incidentally, if I log out and log back in, both monitors go blank and the only way to recover is to reboot. Reboot always turns on both monitors, but with the wrong one (the external) as the primary.

Emerson 02-19-2016 07:01 PM

Ubuntu I do not know, in Gentoo I simply added
Code:

xrandr --auto --output DVI-I-3 --left-of DVI-I-2
to my ~/.xinitrc.

trentfox 02-20-2016 06:00 AM

Thanks Emerson. I want to make sure I am interpreting your xrandr command so that I can do the equivalent on my system. I think that what it means is to put whatever monitor is identified as DVI-I-3 to the left of DVI-I-2. Does the --auto part specify which monitor is the primary one? Or is it the first one listed in the command?

Emerson 02-20-2016 06:33 AM

From man xrandr, you may not need it:
Code:

      --auto For  connected  but  disabled outputs, this will enable them using their first preferred mode
              (or, something close to 96dpi if they have no preferred mode). For disconnected  but  enabled
              outputs, this will disable them.



All times are GMT -5. The time now is 09:08 AM.