So, I absolutely love Gentoo. I really do. It solves a large number of problems and headaches that I’ve had over the years. Basically, the most important problem it solves for me is the good ole’ Red Hat dependency hell (RHEL). The dependency issue is magnified (greatly!) when you are working with lots of scientific packages (R, numpy, octave, maxima, etc.) because they, in turn, rely on things like BLAS/ATLAS and other building block libraries. Anyway, between managing these dependencies in a reasonable way (compilation remove some the problem of specific versions; the package management system take care of most of the other problems) and the added performance benefit of compiling for my architecture with latest compilers (yes, I know, most of the time this benefit is overstated — unless you have before and after performance numbers and multiply that by the amount of time you spend on those computations and see a win).
For all that win, I do pay a price. I’m beyond the phase of emerge -uDavNq world weekly (or daily). I typically only do a kernel once a year. But, emerge world once a month and that kernel build do end up taking a bit of time. When I don’t do it often enough, I forget the “right” procedure to use as I go through it (I could write it down, but if it’s been that long, the procedure will be different anyway. The difference is between small incremental modifications and large batch change.) And, when I build a new system, I usually have to use genkernel to start out with. When I find time, I do a hand kernel .config. The other large price to be paid when moving to a new system is dealing with (the evil) xorg.conf. Now, I’ve generally had nVidia graphics cards in my desktops for the past decade (and intel chipsets in my laptops). However, my new rig has built-in intel and an add-on PCI-e nVidia card. I plan on mainly using the nVidia card for scientific GPU use. So, I’m running my (dual) monitors through the intel on-board.
Well, I had a few issue from (1) lazy configuration and (2) lazy configuration. Really, two issues. (1) I used genkernel which didn’t enable Device Drivers -> Graphics Support -> Direct Rendering Manager -> “Enable modesetting on intel by default” [in the .config it is CONFIG_DRM_I915_KMS=y]. See: wiki.gentoo.org/wiki/Intel
Incidentally, the lack of easy mapping between menuconfig options, .config entries, and kernel module names has always really annoyed me. Maybe there’s a good solution out there I don’t know about. Issue (2): I had accidentally emerged xorg-x11 (which pulls in xorg-drivers) without setting VIDEO_CARDS in /etc/portage/make.conf. That’s a new location for me. Since I started with Gentoo in about 2002, make.conf has lived in /etc. I did see warnings about this on my older system. The config snafu meant I had a ton of x11-drivers/xf86-video-* junk everywhere. Which made diagnosing the problem a bit more difficult — there were plenty of xorg drivers ready to jump in when the xorg intel driver failed.
Turns out, with the intel drive configured improperly (no kernel modesetting), the intel kernel driver and/or the Xorg intel driver were not loading and it was falling back to VESA. The net result was that when I tried to use xrandr to detect the multiple monitors (and get their names to use in xorg.conf, err, xorg.conf.d), there was only one monitor showing (which was odd, b/c the monitor was being mirrored – duplicated – even with VESA. I’m all like: look dude, there are two monitors in use. Tell me their names!). After sorting out the kernel:
genkernel --no-clean --menuconfig all
and a reboot, the intel driver was operational – I even got FB and dual mirroring support for my console. (Yes, theoretical risk in not running a clean – or mrproper for that matter. But, over at least 5 years or so, I’ve been able to do “quick” recompiles and not get hosed by it.)
The last issue was a good bit of confusion as to the proper xorg.conf/xorg.conf.d contents for setting “just” the monitors to be side-by-side. Turns out, you don’t need a whole heck of a lot. You don’t need a Device, a Screen, or any such. Just do this:
# cat /etc/X11/xorg.conf.d/40-monitor.conf
Section "Monitor"
Identifier "HDMI1"
Option "Primary" "true"
EndSection
Section "Monitor"
Identifier "VGA1"
Option "LeftOf" "HDMI1"
EndSection
Nice. Compared to the old necessity of hacking together *everything* under the sun into an xorg.conf, I like the new directory structure (compartmentalizing the config) and the usable defaults (removing boilerplate) makes life easy. After you get it right. I had a few tries with a Device entry that wasn’t needed. This ultra-clean configuration came from: https://wiki.archlinux.org/index.php/Multihead .