LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-31-2013, 08:41 AM   #1
CuriousLittlePenguin
LQ Newbie
 
Registered: Nov 2012
Distribution: Ubuntu
Posts: 9

Rep: Reputation: Disabled
Unable to set a primary monitor in a dual display setup


Dear Members,

For the past two days I have been struggling with setting my laptop's monitor as the primary in a dual monitor setup on my Lenovo T61 running Ubuntu 12.04 LTS.

So what happens is this. I have some screenlets on my desktop and when only using my laptop all is well. But when I connect an external display my screenlets jump to that display if it is set as being left of my laptop. If setting it to the right the screenlets are again on my laptop. Opening a new terminal with the Ctrl+Alt+T for example shows the same behaviour as the screenlets. If external monitor is on the left side terminal opens on that monitor. If it is to the right it opens on my laptop. On the other hand the panel and launcher icons are present on both monitors and the program always openes on the monitor from which it was launched.

What I want is to keep this last feature (starting an application from the launcher should place it on the monitor from which it was launched). But I want my screenlets to always stay on my laptop. Ctrl+Alt+T should always open a terminal on my laptop as well.

I tried in System Settings -> Displays. No success. I then tried with xrandr. Also to no avail. What is happening to me is something many have noticed but after reading through dozens of posts I could not get around it. The problem is, that my primary monitor always seems to be the one on the far left (the one with coordinates 0,0). My last attempt at this is to try and add an xorg configuration file but am not really sure how to do that.

I created a file named 10-monitor.conf in /usr/share/X11/xorg.conf.d but am not quite sure what to put in it. So far I have this, but it isn't working (seems to make no difference when booting with it):

Code:
##################
#MONITORS SECTION#
##################

Section "Monitor"
  Identifier "LVDS1"
  VendorName "LEN"
  Modeline "1280x800_60.00"  83.46  1280 1344 1480 1680  800 801 804 828  -HSync +Vsync
  Option "Primary" "true"
EndSection

Section "Monitor"
  Identifier "VGA1"
  VendorName "NEC"
  Modeline "1280x1024_60.00"  108.88  1280 1360 1496 1712  1024 1025 1028 1060  -HSync +Vsync
  Option "Primary" "false"
  Option "LeftOf" "LVDS1"
EndSection

################
#DEVICE SECTION#
################

Section "Device"
  Identifier      "Device0"
  Driver          "intel"
  BusID		  "PCI:0:2:0"
  VendorName      "Intel"
  BoardName       "7661W4H"
EndSection

Section "Device"
  Identifier      "Device1"
  Driver          "vesa"
  BusID		  "PCI:0:2:1"
  VendorName      "Intel"
  BoardName       "7661W4H"
EndSection

################
#SCREEN SECTION#
################

Section "Screen"
  Identifier "Screen0"
  Device "Device0"
  Monitor "LVDS1"
  Monitor "VGA1"
  DefaultDepth 24
  SubSection "Display"
    Virtual	2560 1200
  EndSubSection
EndSection
Any idea what is wrong? I imagine a lot, this being my first xorg config file. I have no xorg.conf as I read somewhere that it has been deprecated in favour of seperate configuration files inside /usr/share/X11/xorg.conf.d directory.

lspci gives me this:
Code:
00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (secondary) (rev 0c)
00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network Connection (rev 03)
00:1a.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M-E) LPC Interface Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [IDE mode] (rev 03)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
03:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)
15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)
15:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 04)
And xrandr outputs the following:
Code:
Screen 0: minimum 320 x 200, current 2560 x 1212, maximum 8192 x 8192
LVDS1 connected 1280x800+1280+412 (normal left inverted right x axis y axis) 304mm x 190mm
   1280x800       60.0*+   50.0  
   1280x800_60.00   60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
   1280x1024      60.0*+   75.0  
   1280x1024_60.00   60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
DVI1 disconnected (normal left inverted right x axis y axis)
I am also attaching two X0rg.0.log files. Xorg_0_log-old.txt was produced before I created the 10-monitor.conf and Xorg_0_log.txt is the one created after booting with 10-monitor.comf.

While on the subject ... I noticed a difference between a screen, display and monitor. A screen is usually the size of two monitors if using a two-monitor setup. I was wondering, can one make two independent screens, one for each monitor? And if so, what is the benefit? Does my hardware even support this? If I am interpreting lspci's output correctly it should, correct?

Thank you all for all your help.

Cheers!
Attached Files
File Type: txt Xorg_0_log.txt (36.3 KB, 13 views)
File Type: txt Xorg_0_log-old.txt (37.5 KB, 15 views)
 
Old 08-31-2013, 12:43 PM   #2
PECONET009
Member
 
Registered: Sep 2006
Posts: 101

Rep: Reputation: 11
Lightbulb This might help you with your issue...

Quote:
Originally Posted by CuriousLittlePenguin View Post
Dear Members,

For the past two days I have been struggling with setting my laptop's monitor as the primary in a dual monitor setup on my Lenovo T61 running Ubuntu 12.04 LTS.

So what happens is this. I have some screenlets on my desktop and when only using my laptop all is well. But when I connect an external display my screenlets jump to that display if it is set as being left of my laptop. If setting it to the right the screenlets are again on my laptop. Opening a new terminal with the Ctrl+Alt+T for example shows the same behaviour as the screenlets. If external monitor is on the left side terminal opens on that monitor. If it is to the right it opens on my laptop. On the other hand the panel and launcher icons are present on both monitors and the program always openes on the monitor from which it was launched.

What I want is to keep this last feature (starting an application from the launcher should place it on the monitor from which it was launched). But I want my screenlets to always stay on my laptop. Ctrl+Alt+T should always open a terminal on my laptop as well.

I tried in System Settings -> Displays. No success. I then tried with xrandr. Also to no avail. What is happening to me is something many have noticed but after reading through dozens of posts I could not get around it. The problem is, that my primary monitor always seems to be the one on the far left (the one with coordinates 0,0). My last attempt at this is to try and add an xorg configuration file but am not really sure how to do that.

I created a file named 10-monitor.conf in /usr/share/X11/xorg.conf.d but am not quite sure what to put in it. So far I have this, but it isn't working (seems to make no difference when booting with it):

Code:
##################
#MONITORS SECTION#
##################

Section "Monitor"
  Identifier "LVDS1"
  VendorName "LEN"
  Modeline "1280x800_60.00"  83.46  1280 1344 1480 1680  800 801 804 828  -HSync +Vsync
  Option "Primary" "true"
EndSection

Section "Monitor"
  Identifier "VGA1"
  VendorName "NEC"
  Modeline "1280x1024_60.00"  108.88  1280 1360 1496 1712  1024 1025 1028 1060  -HSync +Vsync
  Option "Primary" "false"
  Option "LeftOf" "LVDS1"
EndSection

################
#DEVICE SECTION#
################

Section "Device"
  Identifier      "Device0"
  Driver          "intel"
  BusID		  "PCI:0:2:0"
  VendorName      "Intel"
  BoardName       "7661W4H"
EndSection

Section "Device"
  Identifier      "Device1"
  Driver          "vesa"
  BusID		  "PCI:0:2:1"
  VendorName      "Intel"
  BoardName       "7661W4H"
EndSection

################
#SCREEN SECTION#
################

Section "Screen"
  Identifier "Screen0"
  Device "Device0"
  Monitor "LVDS1"
  Monitor "VGA1"
  DefaultDepth 24
  SubSection "Display"
    Virtual	2560 1200
  EndSubSection
EndSection
Any idea what is wrong? I imagine a lot, this being my first xorg config file. I have no xorg.conf as I read somewhere that it has been deprecated in favour of seperate configuration files inside /usr/share/X11/xorg.conf.d directory.

lspci gives me this:
Code:
00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (secondary) (rev 0c)
00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network Connection (rev 03)
00:1a.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M-E) LPC Interface Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [IDE mode] (rev 03)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
03:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)
15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)
15:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 04)
And xrandr outputs the following:
Code:
Screen 0: minimum 320 x 200, current 2560 x 1212, maximum 8192 x 8192
LVDS1 connected 1280x800+1280+412 (normal left inverted right x axis y axis) 304mm x 190mm
   1280x800       60.0*+   50.0  
   1280x800_60.00   60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
   1280x1024      60.0*+   75.0  
   1280x1024_60.00   60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
DVI1 disconnected (normal left inverted right x axis y axis)
I am also attaching two X0rg.0.log files. Xorg_0_log-old.txt was produced before I created the 10-monitor.conf and Xorg_0_log.txt is the one created after booting with 10-monitor.comf.

While on the subject ... I noticed a difference between a screen, display and monitor. A screen is usually the size of two monitors if using a two-monitor setup. I was wondering, can one make two independent screens, one for each monitor? And if so, what is the benefit? Does my hardware even support this? If I am interpreting lspci's output correctly it should, correct?

Thank you all for all your help.

Cheers!
http://manual.openlp.org/dualmonitors.html

You might need to scroll down to the Linux section in this link.
Or just click on the left of the page in the Linux section.

Last edited by PECONET009; 08-31-2013 at 12:44 PM. Reason: Added more info.
 
Old 08-31-2013, 01:24 PM   #3
CuriousLittlePenguin
LQ Newbie
 
Registered: Nov 2012
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: Disabled
Hi PECONET009,

Thank you for that link. However it does not solve my problem. I already tried solutions mentioned on that page, including xrandr --option LVDS1 --primary but it only works if it is positioned left of the other monitor.

I have in the meantime modified my configuration file (I renamed it from 10-monitor.conf to 90-monitor.conf) to this:
Code:
################
#DEVICE SECTION#
################

Section "Device"
  Identifier	"Display controller: Intel Corporation Mobile GM965/GL960"
  Driver	"intel"
  BusID		"0:2:1"
  VendorName	"Intel"
  BoardName	"7661W4H"
EndSection

Section "Device"
  Identifier	"VGA compatible controller: Intel Corporation Mobile GM965/GL960"
  Driver	"intel"
  BusID		"0:2:0"
  VendorName	"Intel"
  BoardName	"7661W4H"
EndSection

##################
#MONITORS SECTION#
##################

Section "Monitor"
  Identifier "LVDS1"
  VendorName "LEN"
  Option "Primary" "true"
EndSection

Section "Monitor"
  Identifier "VGA1"
  VendorName "NEC"
  Option "Primary" "false"
  Option "LeftOf" "LVDS1"
EndSection

################
#SCREEN SECTION#
################

Section "Screen"
  Identifier "Screen0"
  Device "Display controller: Intel Corporation Mobile GM965/GL960"
  Monitor "LVDS1"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "1280x800" "1024x768" "800x600" "640x480"
  EndSubSection
EndSection

Section "Screen"
  Identifier "Screen1"
  Device "VGA compatible controller: Intel Corporation Mobile GM965/GL960"
  Monitor "VGA1"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Mode "1280x1024" "1152x864" "1024x768" "832x624" "800x600" "640x480" "720x400"
  EndSubSection
EndSection

######################
#SERVERLAYOUT SECTION#
######################

Section "ServerLayout"
       Identifier      "Layout0"
       Screen          "Screen0"
       Screen          "Screen1" leftof "Screen0"
EndSection
Now I am at least sure that the file is not being ignored because with above configurations I only get a blank screen after booting. Xorg's log is attached.

I believe the reason for behaviour I am noticing is, that I only have one screen made up of two monitors. I would probably be able to achieve what I want with two "screens" (with screens I am referring to X screen sessions and not a monitor/display), one for each monitor. But I don't know how to get that to work. Can I have two X screen sessions on one graphic card? An further, can I have two X screen sessions with my hardware (see lspci output in my original post)?

Anyone has any ideas?

Thank you all very much.

Cheers!
Attached Files
File Type: txt Xorg_0_log_v02.txt (38.3 KB, 13 views)
 
Old 09-01-2013, 12:01 PM   #4
CuriousLittlePenguin
LQ Newbie
 
Registered: Nov 2012
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: Disabled
I couldn't find a solution to this so as a workaround I wrote myself a script which detects my laptop display's position on the screen (made up of two monitors in my case) and repositions my desktop items so that they are shown on my laptop's display.

However I would still be interested in a more elegant solution so all ideas are still welcome.

Since my script needs to be called every time a change in monitor set-up is made I would also like to ask if there is a way to automate this? Now I just made a keyboard shortcut with which I launch my script. Is there a way for me to make the OS call this script every time I change any display settings?

Thank you.

Cheers!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How would I set up a dual monitor setup in Xubuntu 11.10? ThatPerson Linux - Hardware 11 12-11-2011 04:39 AM
Ubuntu/GNOME dual monitor setup: Preferring the primary monitor Doc CPU Linux - Desktop 2 09-05-2011 05:58 AM
Dual-monitor set-up -- How can I rotate one monitor's view to portrait? qajaq Fedora 10 07-28-2009 12:15 AM
Dual head has mind of it's own; how to tell it which is primary monitor? RileyTheWiley Linux - Hardware 2 01-30-2008 01:58 PM
Set DVI as Primary Monitor (beginner) ryanccardinale Mandriva 4 04-26-2007 12:27 PM


All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration