Thursday, November 24, 2011

HP Workstation xw4100 Ubuntu Screen Resolution on Acer V173 Monitor

For the past several months I've been stuck with 1024x768 resolution on my monitor when using linux. To make matters worse, every time I tried to enable the proprietary Nvidia graphics driver, my maximum resolution would go down to 800x600. Talk about useless! At the resolution I literally can't do anything. So as I saw it at the time, the only options I have were to either buy a new computer and hope for the best, or go back to not using the graphics card and get used to the shitty 1024x768 resolution. Well I decided neither of those options work as
1. Buying a new computer would probably be a waste of money if I can figure this out myself
2. I've been stuck with this crappy resolution for too long, and besides I can't even play n64 roms without my graphics card. Now thats just depressing!
So I decided to invest however long it takes to figure out what was happening.

I went to System->administration->proprietary drivers and enabled the nvidia graphics driver. After resetting my computer I was stuck at the 800x600 resolution. When I looked into the resolution options for the driver I had the choice of either 800x600 or 640x480. Well thats just great...

So I went and checked my /etc/x11/xorg.conf file to see how things are configured. Turns out that it was pretty much a skeleton. It had a screen and monitor section as I recall but didn't specify the type of monitor, horizontal sync and vertical refresh rate, modelines, resolutions, etc. When I checked the /var/log/xorg.0.log I saw that the Extended Display Identification Data (EDID) was not found. This makes sense seeing that my xorg.conf file was pretty much empty. So I decided to research into the specs of my monitor to see if I could set these things manually. I found that the maximum resolution for my monitor is 1280x1024. Not bad! Now to see what it takes to get that resolution. I found the maximum horizontal sync and vertical refresh rates from the manual for the monitor.

The next step was to try using xrandr to change the resolution. When I run xrandr I got that the only option is 800x600. I obviously want to create a mode for 1280x1024 so I typed:

cvt 1280 1024

and got the resulting modeline output for my screen. So I then added the new mode using:

xrandr --newmode <pasted output of cvt command here>

When I checked my output of xrandr it told me the output was named "default". So the next step is to add the mode to the "default" output:

xrandr --addmode <name of output> <name of mode>

Now to set the output resolution:

xrandr --output <output name> --mode<mode name>

Unfortunately this wouldn't work because it said my screen resolution was capped to 800x600. Crap!!

So I now tried something insanely basic: run the command to configure nvidia. I typed:

nvidia-xconfig

Lo and behold, this changed my xorg.conf file to have a bunch of useful information. I pasted in the modeline I got earlier and changed the hsync and vertical refresh to the maximum for my monitor. I reset my computer and its in the maximum resolution and looks great! So all in all I found that sometimes the solution to a problem can indeed be much simpler than expected.