Rants on software, computing, and any other topic I feel like.

Tuesday, October 11, 2011

Console Resolutions in Ubuntu

I recently (well, like a year ago) switched my personal server from Gentoo to Ubuntu server and have been generally pleased. However, when I tried putting the server in a closet and hooking up an old cheap LCD monitor to it, the text mode wouldn't come up right. It was all white and hard to read. I could figure out what was on the screen, but it was annoying every time I had to use the console for some reason or another. The problem was clearly that the wrong resolution or refresh rate or some other monitor setting was not being set correctly.

So I go online to find out how to switch the console resolution. Everything I can find talks about doing this by changing the kernel options. Great, I've done this before. I spent far too much time fiddling with vga=0xF00 on my old Matrox G400 trying to TV-Out to work. Just gotta figure out how to do it again.

No big deal right? Well, now Grub has exploded from a couple config files in /boot to several sets of config files in /etc and /boot. There's even a grub.d directory. I can see the Emacs syndrome coming on. It's just a bootloader folks. It doesn't need to be this complicated.

Anyway, I get this all figured out. Turns out that we don't use vga=791 or whatever anymore. That's deprecated. We now use set gfxpayload=640x480, but not on the kernel line. It goes somewhere in grub.conf. But we can't set it there because that gets overwritten by update-grub. Argh.

Oh! There's this file over here called /etc/default/grub that I change. But set gfxpayload isn't supported in that. /etc/default/grub looks like a bunch of environment variable definitions. Actually gfxpayload is supported, but it's not documented anywhere except in the bug report that added the feature. This is becoming not simple. It's called GRUB_GFXPAYLOAD_LINUX=640x480, by the way.

Ok, we're good now. Changed /etc/default/grub, ran update-grub. Reboot. Watching BIOS stuff, graphics card, IRQ list and Grub comes up. Yay! It's working. Alright, select the kernel and hit enter. We're booting. Uh oh, why is the mode changing again? Argh, it's still wrong. Apparently the mode change only works in Grub, then the kernel switches it to something else. Something defined in some config file I'm never going to find. Why are there so many posts about this if it only works in Grub? I don't really spend a lot of time in Grub. I'd think most folks would be ok if the display was a little glitchy in Grub. I'm missing something.

Should I post to a forum? No, I want to fix this now. If I don't fix it now, it'll just keep annoying me just enough to spend half an hour of my time trying to fix it every time I need to use the console, but then I'll give up and forget what I was trying to do in the first place. Then my wife will ask why it's taking me so long to fix that thing that I said would take five minutes. Uh, cause I'm not actually fixing that. I just say, "What was that? I couldn't hear you. Almost done dear!" I think she's on to me. She knows what this really means. I get on IRC.

Nice folks on #ubuntu, but not generally that helpful in certain situations. Nicer than the folks on #gentoo. I ask my question. Someone asks if I've done the obvious things. Yes, I've already done that. I almost decide to try to help some poor newbie with his problem. Nope, that will only delay things further. Tonight, guilt about being a better citizen doesn't make me do the right thing. Focus.

While in #ubuntu, someone posts something about completely unrelated, but pastes some part of their dmesg. Of course! Why do I always forget to check the logs? Checking dmesg. Uh, why is this "nouveau" thing changing my resolution to 640 by 350? 350? I don't think that's too standard. No wonder my cheap LCD is having issues. I'm surprised it's working at all. Now I'm on the right track.

Google "nouveau". Ok, this is better. Ahah! I just need to add some video=640x480 line to the kernel line. Good thing I now know about /etc/default/grub. Edit. update-grub. Reboot. Yay! It works.

Why are there fourteen different ways to deal with the console resolution settings? This is far more complicated than it should be. Now I remember why I could never get things working on my Matrox G400 just right. It's one of those terrible places where it's just too complicated, but no one is really using it. There are about two people in the world who know the answer to your question, and they don't get on IRC.

Why am I the one why gets the issues that no one else in web land ever gets?

Labels: , ,

What is GRUB?
What is GRUB?
What is GRUB?
I'm sure this this must have posted 4 times. Now my iPad hates me too.
Grand Unified Boot Loader. On a Linux system, it's the first thing that runs after the BIOS. Windows has one too, but their's is called NTLDR.
very nice and informative post

Web based time and attendance

Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?