I am using Ubuntu for almost two years both at home and office. My office setup quit complex in this regard as we have nVidia GeForce cards with dual LCD monitors on our disposal. And at home, I am using my HP system which has Intel 82915G/GV/910GL Integrated Graphics Controller. I had some issues regarding resolutions but I almost totally forgot about them and upgrades after upgrades, all worked fine.
But things changed after the Ubuntu Karmic, I was stuck to only 2 resolutions: 640×480 and 800×600 both at 60Hz while my chipset and my monitor are both far more capable then this. In this post, I would try to list how I solved this problem for myself. I am no Linux geek and have a pure Windows background so you know who to blame if something seems odd.
In order get a working video setup, you need find out:
- What video adaptor do you have?
- Is there a driver for it?
- Is it picking up the modes and resolutions if answer to above two questions is positive?
- What your monitor is capable of?
- Is the monitor’s capabilities are known to the system?
I assume that you have very little knowledge of the Linux stuff just like me. Lets try to get an answer for all these questions one by one.
What video adaptor do you have?
Well, open up command shell by pressing Alt + F2 and typing x-terminal-emulator
Probably you would be aware that there is a command available to get the listings of a directory. That command is called ls
. In the same way, you can also get a list of the devices attached to PCI slots by a command lspci
. If you issue this command, you would get an information about all the components on your system. But probably we are not interested in all the devices right now but only in our VGA. So therefore, issue this command:
lspci | grep VGA
and my output is:
00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Integrated Graphics Controller (rev 04)
Little explanation about the command. lspci
‘s output is given to another program called grep
and we are telling grep
to show only those lines where string VGA
. This mechanism is called piping where output of one program becomes input of the other and thus you can form chain of process to do wonderful stunts. A UNIX philosophy.
At this step, you know what kind of VGA do you have. Next is to determine if you have driver for it or not.
Is there a driver for it?
If you have ATI or nVidia graphic adopters, then your output might be different. However, refer to this page about drivers. For my case, I did following:
aptitude search intel
And my output looked like this:
p intel-gpu-tools - tools for debugging the Intel graphics driver
p intel-microcode - Processor microcode data file for Intel CPUs
v intel-rng-tools -
p intel2gas - A converter from NASM assembly language to GAS
p inteltool - Dump Intel CPU / chipset configuration parameters
i A libdrm-intel1 - Userspace interface to intel-specific kernel DRM services -- runtime
p libdrm-intel1-dbg - Userspace interface to intel-specific kernel DRM services -- debugging symbols
i xserver-xorg-video-intel - X.Org X server -- Intel i8xx, i9xx display driver
p xserver-xorg-video-intel-dbg - X.Org X server -- Intel i8xx, i9xx display driver (debug symbols)
A little explanation of what I did and why. Well I need to know if drivers for my card are installed or not. They would have intel somewhere in there name. aptitude
is a program that controls all the software installations on your system and automatically keeps them up to date. So there is a large repository of software behind it somewhere on internet (well Ubuntu servers). This concept of single source of software is unknown to commercial world because they have “copy rights” not in there hand and that’s why it is an alien concept to the user of windows. Of course you cannot hope to install CorelDraw this way!. Well anyway, what I am doing is that I search for a package that name contains intel
and I get a list of all those packages. Look at this line:
i xserver-xorg-video-intel - X.Org X server -- Intel i8xx, i9xx display driver
The i
in front of that line indicates that this package is already installed. If it were not, instead of i
, I would have a p
there. Suppose if it w to the deviceere not, I would install it like this:
sudo aptitude install xserver-xorg-video-intel
Is it picking up the resolutions?
If you’ve got all well as of now, that’s great. Now we need to determine that if the drivers are really working with the VGA. We do this with two utilities. xrandr
and cvt
Now we need to experiment with the video adapter. How? We need to check if it supports those resolution we expect from it. For example, I expect that my chip should show up to 1024 760 at 85 Hz. How to check this then? Its in three steps:
- Introducing a new mode
- Associating that mode to a device
- Applying that mode on that device
This process is better explained here
<h2>What your monitor is capable of?</h2>
Well this might be most important question. You need to know the maximum resolutions, optimal resolution and horizontal and vertical frequencies if your monitor is not automatically detected as it was with me. I happen to beusing Sony 21″ Multiscan E500 CRT monitor which is capable of displaying upto 2048×1536 at 60 Hz while recommended resolution is 1600×1200 at 85 Hz. The Horizontal frequency range is 30-109kHz and 48-160Hz for vertical. Note that horizontal frequency is in kHz and vertical is in Hz. If you are curious then you can look about CRT workings here. Anyway, Used this information in my xorg.conf
file which is at /etc/X11/xorg.conf
and added following:
Section "Monitor"
Identifier "Sony Multiscan E500 CRT Monitor"
VendorName "Sony"
ModelName "CPD-E500"
HorizSync 30-109
VertRefresh 48-160
Option "DPMS"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Sony Multiscan E500 CRT Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Modes "1600x1200"
Modes "1024x768"
Modes "800x600"
EndSubSection
EndSection
while my complete xorg.conf
looks like this:
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
# commented out by update-manager, HAL is now used
#Section "InputDevice"
# Identifier "Generic Keyboard"
# Driver "kbd"
# Option "XkbRules" "xorg"
# Option "XkbModel" "pc105"
# Option "XkbLayout" "us"
#EndSection
# commented out by update-manager, HAL is now used
#Section "InputDevice"
# Identifier "Configured Mouse"
# Driver "mouse"
# Option "CorePointer"
#EndSection
Section "Device"
Identifier "Configured Video Device"
Option "UseFBDev" "true"
EndSection
Section "Monitor"
Identifier "Sony Multiscan E500 CRT Monitor"
VendorName "Sony"
ModelName "CPD-E500"
HorizSync 30-109
VertRefresh 48-160
Option "DPMS"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Sony Multiscan E500 CRT Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Modes "1600x1200"
Modes "1024x768"
Modes "800x600"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
EndSection
After this, restart your display manager in my case it was gdm so I did:
sudo /etc/init.d/gdm restart
And from that point onwards, I had no issues with video resolution. Next on my target is sound. Thought it is working but I would document some of my discoveries about it.