{"id":81,"date":"2013-09-24T15:23:10","date_gmt":"2013-09-24T15:23:10","guid":{"rendered":"http:\/\/drsfenner.org\/blog\/?p=81"},"modified":"2013-09-30T13:27:14","modified_gmt":"2013-09-30T13:27:14","slug":"gentoo-continued","status":"publish","type":"post","link":"https:\/\/drsfenner.org\/blog\/2013\/09\/gentoo-continued\/","title":{"rendered":"Gentoo (continued &#8230;)"},"content":{"rendered":"<p>So, I absolutely love Gentoo. \u00a0I really do. \u00a0It solves a large number of problems and headaches that I&#8217;ve had over the years. \u00a0Basically, the most important problem it solves for me is the good ole&#8217; <em>Red Hat dependency hell (RHEL)<\/em>. \u00a0The 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. \u00a0Anyway, 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 &#8212; unless you have before and after performance numbers\u00a0<em>and multiply that by<\/em> the amount of time you spend on those computations\u00a0<em>and see a win<\/em>).<\/p>\n<p>For all that win, I do pay a price. \u00a0I&#8217;m beyond the phase of <i>emerge -uDavNq world<\/i> weekly (or daily). \u00a0I typically only do a kernel once a year. \u00a0But,\u00a0<em>emerge world<\/em> once a month and that kernel build do end up taking a bit of time. \u00a0When I don&#8217;t do it often enough, I forget the &#8220;right&#8221; procedure to use as I go through it (I could write it down, but if it&#8217;s been that long, the procedure will be different anyway. \u00a0The difference is between small incremental modifications and large batch change.) \u00a0And, when I build a new system, I usually have to use\u00a0<em>genkernel<\/em> to start out with. \u00a0When I find time, I do a hand kernel\u00a0<em>.config. \u00a0<\/em>The other large price to be paid when moving to a new system is dealing with (the evil)\u00a0<em>xorg.conf.<\/em> \u00a0Now, I&#8217;ve generally had nVidia graphics cards in my desktops for the past decade (and intel chipsets in my laptops). \u00a0However, my new rig has built-in intel and an add-on PCI-e nVidia card. \u00a0I plan on mainly using the nVidia card for scientific GPU use. \u00a0So, I&#8217;m running my (dual) monitors through the intel on-board.<\/p>\n<p>Well, I had a few issue from (1) lazy configuration and (2) lazy configuration. \u00a0Really, two issues. \u00a0(1) I used genkernel which didn&#8217;t enable Device Drivers -&gt; Graphics Support -&gt; Direct Rendering Manager -&gt; &#8220;Enable modesetting on intel by default&#8221; [in the .config it is\u00a0CONFIG_DRM_I915_KMS=y]. \u00a0See: \u00a0<a href=\"wiki.gentoo.org\/wiki\/Intel\">wiki.gentoo.org\/wiki\/Intel<\/a><\/p>\n<p>Incidentally, the lack of easy mapping between menuconfig options, .config entries, and kernel module names has always really annoyed me. \u00a0Maybe there&#8217;s a good solution out there I don&#8217;t know about. \u00a0Issue (2): \u00a0I had accidentally emerged xorg-x11 (which pulls in xorg-drivers) without setting VIDEO_CARDS in \/etc\/portage\/make.conf. That&#8217;s a new location for me. Since I started with Gentoo in about 2002, make.conf has lived in \/etc. \u00a0I did see warnings about this on my older system. \u00a0The config snafu meant I had a ton of x11-drivers\/xf86-video-* junk everywhere. \u00a0Which made diagnosing the problem a bit more difficult &#8212; there were plenty of xorg drivers ready to jump in when the xorg intel driver failed.<\/p>\n<p>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. \u00a0The 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 &#8211; duplicated &#8211; even with VESA. \u00a0I&#8217;m all like: \u00a0look dude, there are two monitors in use. \u00a0Tell me their names!). \u00a0After sorting out the kernel:<\/p>\n<pre>genkernel --no-clean --menuconfig all<\/pre>\n<p>and a reboot, the intel driver was operational &#8211; I even got FB and dual mirroring support for my console. \u00a0(Yes, theoretical risk in not running a clean &#8211; or mrproper for that matter. \u00a0But, over at least 5 years or so, I&#8217;ve been able to do &#8220;quick&#8221; recompiles and not get hosed by it.)<\/p>\n<p>The last issue was a good bit of confusion as to the proper xorg.conf\/xorg.conf.d contents for setting &#8220;just&#8221; the monitors to be side-by-side. \u00a0Turns out, you don&#8217;t need a whole heck of a lot. \u00a0You don&#8217;t need a Device, a Screen, or any such. \u00a0Just do this:<\/p>\n<pre># cat \/etc\/X11\/xorg.conf.d\/40-monitor.conf\r\nSection \"Monitor\"\r\n Identifier \"HDMI1\"\r\n Option \"Primary\" \"true\"\r\nEndSection\r\nSection \"Monitor\"\r\n Identifier \"VGA1\"\r\n Option \"LeftOf\" \"HDMI1\"\r\nEndSection<\/pre>\n<p>Nice. \u00a0Compared 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. \u00a0After you get it right. \u00a0I had a few tries with a Device entry that wasn&#8217;t needed. \u00a0This ultra-clean configuration came from: <a href=\" https:\/\/wiki.archlinux.org\/index.php\/Multihead \">\u00a0https:\/\/wiki.archlinux.org\/index.php\/Multihead\u00a0<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, I absolutely love Gentoo. \u00a0I really do. \u00a0It solves a large number of problems and headaches that I&#8217;ve had over the years. \u00a0Basically, the most important problem it solves for me is the good ole&#8217; Red Hat dependency hell (RHEL). \u00a0The dependency issue is magnified (greatly!) when you are working with lots of scientific [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,6],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-gentoo","category-mrdr"],"_links":{"self":[{"href":"https:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":3,"href":"https:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":91,"href":"https:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions\/91"}],"wp:attachment":[{"href":"https:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/drsfenner.org\/blog\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}