0

I'm running Ubuntu 12.04 on a MacBook 4,1 (Intel GMA X3100 graphics chipset) on an external monitor, but can only get a resolution of 1024 x 768 (I get 1280 x 1024 in OS X).

I'm able to force the resolution to 1280 x 1024 using the xrandr command as per these instructions, but there are two issues now:

  1. The screen is off center, by maybe a couple dozen pixels up and to the left.

  2. The instructions are for 10.04, and the directions for making the change permanent do not work in 12.04.

Any way to fix this?

UPDATE: I believe the driver is the root of the problem. Ubuntu listed the graphics device as "Unknown" until I installed mesa-utils. I also get a message on boot before the desktop loads that says something along the lines of 00:02.0: i915 Invalid ROM contents.

Here is the relevant output of lspci -v:

00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) (rev 03) (prog-if 00 [VGA controller])
    Subsystem: Apple Inc. Device 00a1
    Flags: bus master, fast devsel, latency 0, IRQ 45
    Memory at d0100000 (64-bit, non-prefetchable) [size=1M]
    Memory at c0000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 6110 [size=8]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: <access denied>
    Kernel driver in use: i915
    Kernel modules: intelfb, i915

00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (secondary) (rev 03)
    Subsystem: Apple Inc. Device 00a1
    Flags: fast devsel
    Memory at d0200000 (64-bit, non-prefetchable) [disabled] [size=1M]
    Capabilities: <access denied>

I tried using xrandr --output VGA1 --pos 10x10 to see if it would reposition the screen but nothing happened.

3 Answers 3

1

I fixed (1).

I suspected the modeline numbers I've been entering in xrandr are inaccurate, so I downloaded SwitchResX for OS X, which has an option to export modelines. So I got the modeline for the 1280 x 1024 mode I use in OS X, put it into xrandr in Ubuntu and now the screen isn't offset anymore!

Now I just need to know how to make this change permanent.

0

Have you tried editing the /etc/lightdm/lightdm.conf file?

How to force Multiple Monitors correct resolutions for LightDM?

For instance, adding

display-setup-script=/usr/share/lightdmxrandr.sh

runs the above script at the login screen.

And adding

session-setup-script=/usr/share/lightdmxrandr.sh

runs the above script during the session.

In my case, that script says the following:

#!/bin/bash

# connected external output
XCOM0=`xrandr -q | egrep '(HDMI1|VGA1|DP1) connected' | egrep -o '(HDMI1|VGA1|DP1)'`
# command to set external desktop
XCOM1=`xrandr --output LVDS1 --primary --auto --output $XCOM0 --auto --right-of LVDS1`
# command to set normal desktop
XCOM2=`xrandr --output LVDS1 --primary --auto`
# if the external monitor is connected, then we tell XRANDR to set up an extended desktop
if [ -n "$XCOM0" ] || [ ! "$XCOM0" = "" ]; then echo $XCOM1
# if the external monitor is disconnected, then we tell XRANDR to output only to the laptop screen
else echo $XCOM2
fi

exit 0;


# ERASE THESE COMMENTS:
# Forces multiple monitors correct resolutions for LightDM
# Tested with Ubuntu 12.04 LTS.
# Save this file as lightdmxrand.sh
# Set as an executable file like this: 
#  $ sudo chmod +x lightdmxrand.sh
# Move it to /usr/share/ directory like this:
#  $ sudo mv lightdmxrand.sh /usr/share/lightdmxrandr.sh
# Edit /etc/lightdm/lightdm.conf adding the given line to it: display-setup-script=/usr/share/lightdmxrandr.sh
# If you want this script to also run after the login, add: session-setup-script=/usr/share/lightdmxrandr.sh

Hope it works!

0

I was able to solve your exact problem on a slightly more recent (18.04) Ubuntu but the principles are the same. Your display adapter is recognized correctly with the same output as mine.

-Use the xrandr command as you have to set the resolution correctly.

-Use the orientation command to set the monitor to the left (or right) of the built in display

-(For me this step fixed the pixel overlap issue: NOW go into the settings for your system and move the arrangement.

This destkop settings application is sure to be different for your version of Ubuntu; 18.04 is back to gnome and no longer the unity desktop.

Once you're happy with the set of xrandr commands that work for you, I recommend placing those into "~/.xprofile". These commands will automatically run when you log in at the terminal and get your desktop.

This link is excellent from the ubuntu wiki, and gives you other options for automatically configuring this.

Note: As you know configuring new resolutions can get tricky; if you pick a bad resolution you may get only one screen or NO screens. I get the terminal application in front and have a history of commands ready with resolution settings. Use the arrow keys and to see if you can dial it in. If you get black screens, usually unplugging the second monitor and/or closing the laptop lid for 30 seconds and reopening it will remedy the issue temporarily.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .