Gentoo Day 1: Kernel, framebuffer, Xorg

Lately I’ve felt that I’ve gotten too lazy. Ubuntu requires almost no work to get running and I have little to no idea what all the fancy stuff they’re doing actually means. So I’m ditching Ubuntu (on my personal desktop, anyway) and installing Gentoo. For my own records and to help anybody else who has similar troubles, I’m keeping a journal of everything here.

My computer

I have a Core 2 Duo E7200, ASUS P5QL-EM (Intel G45 IGD, Realtek 8168 Gigabit ethernet, Intel audio), 2 SATA hard drives, 2 LCD monitors (DVI, HDMI).

GRUB

The first problem I had was due to misconfiguring GRUB. I misread the Gentoo Handbook and used the kernel line for the rescue entry in place of the regular entry. If you are getting an error about /bin/bb not being able to access TTY1, this could be your problem. Delete init=/bin/bb from the kernel line and that should fix things.

Kernel Configuration

It has been years since I compiled a kernel myself. It was definitely still 2.4. One thing I have never understood, and still don’t, is the real difference between compiling in vs. compiling as a module. I always thought it was about the size of the kernel image, but I notice it makes a difference in certain situations. For example, Xorg seems to prefer that things be compiled as modules and will crash if they’re compiled in. This is something I need to learn more about.

Specifics

  • Intel G45: i915, module
  • Framebuffer console: module
  • Realtek NIC: Realtek 8169, compiled in
  • Drivers – Hardware Monitoring – ATK0110

Framebuffer configuration

I suspect, based on my original Day Negative 2 install of Gentoo, that all that is necessary to get the framebuffer working is to load the i915 module. However, I also went through all the work needed to get uvesafb working. I set up an initramfs and installed v86d according to the Gentoo framebuffer instructions. I don’t think this is required. You also need to to enable Framebuffer Console (which I missed and spent a long while trying to figure out). It turns out later that this must be compiled as a module.

Quick start

1. Compile i915, fbcon as modules
2. Add i915, fbcon to /etc/modules.autoload.d/kernel-2.6

You don’t need a “video=” parameter for GRUB. The framebuffer won’t start until late in the boot process (just before filesystem checks). It finds the right resolution and refresh rate automatically.

Xorg

This was a huge pain. First, I was getting a blank screen, Ctrl-Alt-Backspace would not work, but Ctrl-Alt-Delete would restart. So I messed around with HAL and xorg.conf to no avail. I decided to try disabling uvesafb by putting video=uvesafb:off into the kernel line in menu.lst. This almost worked (and taught me that I could get a framebuffer console with the i915 module). Now X would crash immediately and give me two errors: “expected keysym, got XF86Kbd something” and a string of programs xinitrc couldn’t launch. Turns out that if you launch X without a window manager, it tries to launch some default programs that aren’t installed if you follow the Handbook. I installed xterm and X was suddenly working.

I was also able to delete xorg.conf. The problem seems to have been uvesafb the entire time.

Day 2 (Update)

There was no day 2. I left Gnome to compile overnight and then needed to use my computer to do work. I didn’t have the time to sit around tweaking things after I got all the major stuff done. On the plus side, I learned a lot about how Linux has changed since I stopped using Slackware. But I’m back in Ubuntu. I may try Gentoo again if I ever have some guaranteed vacation time.

Related Post

Read More
Read More
Read More
Read More