LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   External monitor displaying in non-native resolution [Ubuntu 12.04] (http://www.linuxquestions.org/questions/linux-hardware-18/external-monitor-displaying-in-non-native-resolution-%5Bubuntu-12-04%5D-944633/)

ohnolawl 05-12-2012 03:22 PM

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


RockDoctor 05-13-2012 07:46 AM

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.

business_kid 05-13-2012 10:27 AM

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.

ohnolawl 05-14-2012 12:57 AM

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


business_kid 05-14-2012 02:14 AM

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.

RockDoctor 05-14-2012 06:47 AM

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/

ohnolawl 05-14-2012 12:11 PM

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


business_kid 05-15-2012 03:27 AM

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"

RockDoctor 05-15-2012 06:28 AM

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

ohnolawl 05-15-2012 12:47 PM

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


business_kid 05-16-2012 02:38 AM

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.

ohnolawl 05-16-2012 09:20 AM

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.

business_kid 05-17-2012 05:18 AM

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

RockDoctor 05-17-2012 07:49 AM

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


ohnolawl 05-17-2012 02:54 PM

Sod's law sounds about right. Added the modelines to one, and then both monitor sections with no changes.


All times are GMT -5. The time now is 01:48 AM.