{"id":262,"date":"2012-01-15T13:04:16","date_gmt":"2012-01-15T17:04:16","guid":{"rendered":"http:\/\/www.eugenecormier.com\/?p=262"},"modified":"2014-02-04T22:26:23","modified_gmt":"2014-02-05T02:26:23","slug":"gentoo-on-the-macbook-air","status":"publish","type":"post","link":"https:\/\/eugenecormier.com\/?p=262","title":{"rendered":"Gentoo on the MacBook Air"},"content":{"rendered":"<p>It&#8217;s\u00a0been a very long time since I posted anything, so it&#8217;s my new year&#8217;s resolution to do more this year. This first post of the year will be a computer post. Over the holidays I picked up a MacBook Air, and I have to say I love the design. Some of the highlights include:\u00a0back-lit\u00a0keyboard, multi-touch trackpad, fans &amp; speakers hidden in the joint between the display and the keyboard &amp; aluminium case. Apple really does a great job with design. But of course, I hate the simplicity of MacOSX. Yes I know it&#8217;s built on top of Darwin, but I like to be able to tinker with &#8220;everything&#8221; and run all my favorite programs. So the first thing to do when I got it was to delete everything and put on Linux. I won&#8217;t go through every detail, but I will mention the things that did not work out of the box. Hope this helps someone else!<\/p>\n<blockquote><p>##################################<br \/>\n# MacOSX fixes &#8211; Do this before<br \/>\n# removing MacOSX<br \/>\n##################################<\/p>\n<p>If you use only Linux, boot hangs for 30 seconds waiting for the Mac partition. To override this issue the following command (from MacOSX):<br \/>\nbless \u2013device \/dev\/disk0s1 \u2013setBoot \u2013legacy \u2013verbose<\/p>\n<p>To stop the boot mac sound, issue the following command:<br \/>\n\/usr\/sbin\/nvram SystemAudioVolume=%01<\/p>\n<p>##################################<br \/>\n# Wireless Card<br \/>\n# note the two &lt;M&gt;, these MUST be<br \/>\n# built as modules for the wifi<br \/>\n# card to work<br \/>\n##################################<\/p>\n<p>edit: in kernel 3.2+ you must turn off BCMA to get BRCM softmac enabled, which is now under drivers\/network (not staging)<\/p>\n<p>&nbsp;<\/p>\n<p>Install: sys-kernel\/linux-firmware<\/p>\n<p>[*] Networking support &#8212;&gt;<br \/>\n-*- Wireless &#8212;&gt;<br \/>\n&lt;*&gt; cfg80211 &#8211; wireless configuration API<br \/>\n[*] Wireless extensions sysfs files<br \/>\n&lt;*&gt; Common routines for IEEE802.11 drivers<br \/>\n&lt;*&gt; Generic IEEE 802.11 Networking Stack (mac80211)<\/p>\n<p>Device Drivers &#8212;&gt;<br \/>\nBroadcom specific AMBA &#8212;&gt;<br \/>\n&lt;M&gt; BCMA support<br \/>\n[*] Support for BCMA on PCI-host bus<br \/>\n[*] Staging drivers &#8212;&gt;<br \/>\n&lt;M&gt; Broadcom IEEE802.11n PCIe SoftMAC WLAN driver<\/p>\n<p>##################################<br \/>\n# Intel Video Card<br \/>\n##################################<\/p>\n<p>edit: the hack below is not needed in kernels newer than 3.2<\/p>\n<p>I found this solution here: https:\/\/bugs.freedesktop.org\/show_bug.cgi?id=39533#c25<\/p>\n<p>first edit \/usr\/src\/linux\/drivers\/gpu\/drm\/i915\/intel_bios.c<br \/>\nand after the:<br \/>\nDRM_DEBUG_KMS(&#8220;Found panel mode in BIOS VBT tables:\\n&#8221;);<br \/>\ndrm_mode_debug_printmodeline(panel_fixed_mode);<br \/>\nlines add the following:<br \/>\npanel_fixed_mode-&gt;hdisplay = 1366;<br \/>\npanel_fixed_mode-&gt;hsync_start = 1398;<br \/>\npanel_fixed_mode-&gt;hsync_end = 1566;<br \/>\npanel_fixed_mode-&gt;htotal = 1734;<br \/>\npanel_fixed_mode-&gt;vdisplay = 768;<br \/>\npanel_fixed_mode-&gt;vsync_start = 772;<br \/>\npanel_fixed_mode-&gt;vsync_end = 776;<br \/>\npanel_fixed_mode-&gt;vtotal = 792;<br \/>\npanel_fixed_mode-&gt;clock = 72500;<br \/>\npanel_fixed_mode-&gt;type = 0x48;<br \/>\npanel_fixed_mode-&gt;flags = 0xa;<br \/>\ndrm_mode_set_name(panel_fixed_mode);<\/p>\n<p>Graphics support &#8212;&gt;<br \/>\n&lt;*&gt; Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) &#8212;&gt;<br \/>\n&lt;*&gt; Intel 8xx\/9xx\/G3x\/G4x\/HD Graphics<br \/>\n[*] Enable modesetting on intel by default<\/p>\n<p>##################################<br \/>\n# Intel Audio Card<br \/>\n##################################<\/p>\n<p>This worked automatically with pulseaudio, BUT I had to install gnome-alsamixer and turn up the &#8220;Surround&#8221; volume to get the speakers working<\/p>\n<p>##################################<br \/>\n# Webcam<br \/>\n##################################<\/p>\n<p>install the media-video\/isight-firmware-tools<br \/>\ndownload: http:\/\/www.mediafire.com\/?81xtkqyttjt<\/p>\n<p>then ift-extract &#8211;apple-driver AppleUSBVideoSupport<\/p>\n<p>##################################<br \/>\n# SSD enhancements<br \/>\n##################################<\/p>\n<p>fstab should include (in this case sda1 is the ssd, the tmpfs is for gentoo to not compile on the ssd):<br \/>\n\/dev\/sda1 \/ ext4 discard,noatime,data=ordered 0 1<br \/>\ntmpfs \/var\/tmp\/portage tmpfs nodev,nosuid,mode=1777 0 0<\/p>\n<p>add the following to the \/boot\/grub\/grub.conf kernel line:<br \/>\nelevator=noop<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s\u00a0been a very long time since I posted anything, so it&#8217;s my new year&#8217;s resolution to do more this year. This first post of the year will be a computer post. Over the holidays I picked up a MacBook Air, and I have to say I love the design. Some of the highlights include:\u00a0back-lit\u00a0keyboard, multi-touch [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":505,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,7],"tags":[],"class_list":["post-262","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-news"],"_links":{"self":[{"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=262"}],"version-history":[{"count":1,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":448,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions\/448"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/media\/505"}],"wp:attachment":[{"href":"https:\/\/eugenecormier.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}