LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-12-2012, 03:22 PM   #1
ohnolawl
LQ Newbie
 
Registered: May 2012
Posts: 10

Rep: Reputation: Disabled
External monitor displaying in non-native resolution [Ubuntu 12.04]


In attempting to hook up an external monitor to my netbook Ubuntu doesn't detect the monitor is plugged in (read: not showing up in Displays, not even as "unknown"), although on restart with it still connected (through VGA) display is cloned to the external monitor, albeit poorly.
The netbook's native resolution is 1024x600, but changes to 1024x768 when booted while connected to the external monitor (I assume that the external monitor is displaying in the 1024x768 also). The external monitor's native resolution is 1600x900, and displays with odd brown undertones, similar to that when F.lux or redshift are activated, although I have neither installed.

lspci|grep VGA
Code:
00:02.0 VGA compatible controller: Intel Corporation Atom Processor D2xxx/N2xxx Integrated Graphics Controller (rev 09)
Additionally, I tried using XrandR to fiddle with the issues, but it always outputs
Code:
xrandr: Failed to get size of gamma for output default
Any ideas?

EDIT: After messing around with XrandR some more I've slightly progressed to
Code:
user:~$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1024 x 768, maximum 1600 x 900
default connected 1024x768+0+0 0mm x 0mm
   1024x768        0.0* 
   800x600         0.0  
   640x480         0.0  
   1600x900       59.9  
user:~$ xrandr --output default --mode 1600x900
xrandr: Failed to get size of gamma for output default
xrandr: Configure crtc 0 failed

Last edited by ohnolawl; 05-12-2012 at 04:13 PM.
 
Old 05-13-2012, 07:46 AM   #2
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
I haven't tried hooking my netbook up to a larger monitor, but it might work better if you created an xorg.conf file with two different "Monitor" sections; one forthe netbook display and one for the external monitor. The advantage is that you could specify the resolution of each display. If it doesn't work, you're only out a few minutes of your time.
 
Old 05-13-2012, 10:27 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,489

Rep: Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361
In /etc/xorg.conf.d put a video.conf file.man xorg.conf for details.

Gather your video card, Monitor1 and Monitor2. Use the settings HorizSync, VertRefresh, & PreferredMode for each monitor. One will have to be the primary monitor.

Stick something together and see how it goes.
 
Old 05-14-2012, 12:57 AM   #4
ohnolawl
LQ Newbie
 
Registered: May 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Sorry for being a bit clueless, but do I have to write the xorg.conf from scratch? I tried using
Code:
Xorg -configure
but it spit out
Code:
Fatal server error:
Server is already active for display 0
     If this server is no longer running, remove /tmp/.X0-lock
     and start again.


Please consult the The X.Org Foundation support
     at http://wiki.x.org
 for help.

 ddxSigGiveUp: Closing log
 
Old 05-14-2012, 02:14 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,489

Rep: Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361
Don't write an xorg.conf. Put a video.conf in the directory /etc/X11/xorg.conf.d/

There's usually an example xorg.conf in /etc/X11. Copy 'n' paste, ut in the video card Sections, and the Display section(s) and modify for your box.
 
Old 05-14-2012, 06:47 AM   #6
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
If you don't have a sample xorg.conf file,
Code:
X :1 -configure
as root will generate one for you when running X on display :0 (the default for most distros). As business kid points out, you don't need a complete xorg.conf file, just the appropriate sections in a configuration file in /etc/X11/xorg.conf.d/
 
Old 05-14-2012, 12:11 PM   #7
ohnolawl
LQ Newbie
 
Registered: May 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Okay, I have the sample it generated and removed all of the unnecessary sections, but I'm not sure what I need to add to make everything work. Additionally I'm not sure which driver my graphics card is using, I just left what generated in the sample.
Code:
Section "Monitor"
	Identifier   "Monitor1"
	Option "Primary" "True"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "vesa"
	BusID       "PCI:00:02:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card0"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Last edited by ohnolawl; 05-14-2012 at 06:40 PM.
 
Old 05-15-2012, 03:27 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,489

Rep: Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361
Quote:
Driver "vesa"
I dunno about that. It may be best, but if you have an oss driver (Usually xf86-video-something package) I'd try that. If there is a binary blob, and you go for it, you'll need that. Pick a driver from the output of

ls /usr/lib64/xorg/modules/dri
Quote:
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
You don't need all that crap - just the colour depth you want to display, usually 24. Put in as your second last line (under depth)

Modes "modename" "modename" etc

for any mode you want to have available - e.g. "1600x900" "1280x800"
 
Old 05-15-2012, 06:28 AM   #9
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
You may need a custom modeline in the monitor section. I do because my monitor does not report its EDID properly; without the modeline in the monitor section and the corresponding mode in the Screen section, I can't get the native 1680x1050 on my monitor. Looks like this:
Code:
Section "Monitor"

	#UseModes     "Modes0" #monitor0usemodes
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
	DisplaySize  432	270
	HorizSync    30.0 - 86.0
	VertRefresh  56.0 - 76.0
	ModeLine     "1680x1050" 147.1 1680 1784 1968 2256 1050 1051 1054 1087 -hsync +vsync
	Option	    "PreferredMode" "1680x1050"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     24
        Option "IgnoreEDID" "TRUE"
		Modes    "1680x1050" "1440x900" "1280x1024"
	EndSubSection
To generate the appropriate modeline for 1680x1050, I used gtf and just copied the result into my xorg config file:
Code:
~$ gtf 1680 1050 60

  # 1680x1050 @ 60.00 Hz (GTF) hsync: 65.22 kHz; pclk: 147.14 MHz
  Modeline "1680x1050_60.00"  147.14  1680 1784 1968 2256  1050 1051 1054 1087  -HSync +Vsync
Using the vesa driver, you can only get standard vesa modes, like 1024x768. To get 1024x600, you will need to specify the appropriate driver (my netbook uses the intel driver). When you run without an xorg.conf file (or the corresponding files in /etc/X11/xorg.conf.d, the netbook will use the default driver for the graphics system (which is very unlikely to be vesa). HTH
 
Old 05-15-2012, 12:47 PM   #10
ohnolawl
LQ Newbie
 
Registered: May 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Alright, I made some revisions and put "video.conf" in /etc/X11/xorg.conf.d/, although I had to make the directory xorg.conf.d. I'm guessing it's still not right though, because my netbook gets stuck booting at the "5 dots screen" now.

EDIT: Managed to boot from usb and move the file out of the directory.
Code:
Section "Monitor"
	UseModes "Modes0"
	Identifier   "Monitor0"
	Option "Primary" "True"
	Option "PreferredMode" "1024x600"
EndSection

Section "Monitor"
	UseModes "Modes1"
	Identifier   "Monitor1"
	Option "PreferredMode" "1600x900"
EndSection

Section Modes
	Identifier "Modes0"
	Mode "1024x600"
EndSection

Section Modes
	Identifier "Modes1"
	Mode "1600x900"
	Mode "1280x720"
	Mode "1024x576"
EndSection
Section "Device"
	Identifier  "Card0"
	Driver      "intel"
	BusID       "PCI:00:02:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card0"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth  24
	EndSubSection
EndSection

Last edited by ohnolawl; 05-15-2012 at 01:01 PM.
 
Old 05-16-2012, 02:38 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,489

Rep: Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361
Nope - My fault, I'm afraid. Try this


Quote:
Section "Screen"
Identifier "Screen1"
Device "Card0"
Monitor "Monitor1"
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1600x900" "1280x800" 1024x768"
EndSection
Careful also with Section/EndSection and SubSection/EndSubSection
as you can trip over your shoelaces with those and make it unreadable.

EDIT: No Modes Section.

Last edited by business_kid; 05-16-2012 at 02:39 AM.
 
Old 05-16-2012, 09:20 AM   #12
ohnolawl
LQ Newbie
 
Registered: May 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Well it didn't prevent me from booting this time, however sadly it hasn't changed anything. When I boot while connected to the external monitor, it gives me the options of 1024x768, 800x600, and 600x480.
Code:
Section "Monitor"
	Identifier   "Monitor0"
	Option "Primary" "True"
	Option "PreferredMode" "1024x600"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
	Option "PreferredMode" "1600x900"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "intel"
	BusID       "PCI:00:02:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes "1024x600"
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card0"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes "1600x900" "1280x800" "1024x768"
	EndSubSection
EndSection
I'm pretty sure everything in this is right, just no idea why it's not doing a thing.
 
Old 05-17-2012, 05:18 AM   #13
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,489

Rep: Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361Reputation: 2361
I've an answer for that.

X uses a 'Virtual' setting. The Virtual screen (one number usually). This laptop right now, according to xrandr, is mapping a 1024x768(virtual) screen to 1280x800, and 1440x900. Yes, 4:3 does not fit neatly on 16:9. No I don't know what it's up to.

The further your screens are apart is resolutions, refresh and screen size the more likely you are to run into trouble. It's Sod's_Law
 
Old 05-17-2012, 07:49 AM   #14
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
Try adding the modeline below to your Monitor section (for Monitor 0, of course)

Code:
# 1024x600 @ 60.00 Hz (GTF) hsync: 37.32 kHz; pclk: 48.96 MHz
  Modeline "1024x600"  48.96  1024 1064 1168 1312  600 601 604 622  -HSync +Vsync

Last edited by RockDoctor; 05-17-2012 at 07:50 AM. Reason: specify which monitor gets the modeline
 
Old 05-17-2012, 02:54 PM   #15
ohnolawl
LQ Newbie
 
Registered: May 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Sod's law sounds about right. Added the modelines to one, and then both monitor sections with no changes.
 
  


Reply

Tags
resolution, ubuntu, vga, xrandr



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
How get monitor to native resolution on Ubuntu 11.04 surfsidebill Linux - Newbie 12 08-18-2011 03:14 PM
Native monitor resolution gone - where is the wrong info stored? harry88 Linux - General 2 03-02-2010 05:20 PM
Displaying the bootup console on an external monitor (HP Pavilion, Nvidia) Vinter Linux - Laptop and Netbook 2 11-09-2009 02:25 AM
monitor native resolution not displayed properly itsme_me Linux - Hardware 4 05-21-2009 04:08 AM
Higher than native monitor resolution? garlick Linux - Software 3 05-25-2004 03:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:04 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
Open Source Consulting | Domain Registration