<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Allan McRae &#187; Linux</title>
	<atom:link href="http://allanmcrae.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://allanmcrae.com</link>
	<description>One day this will feature a witty tagline...</description>
	<lastBuildDate>Mon, 23 Aug 2010 11:15:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simple MacBook Pro Fan Daemon</title>
		<link>http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon/</link>
		<comments>http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon/#comments</comments>
		<pubDate>Sun, 23 May 2010 10:19:37 +0000</pubDate>
		<dc:creator>Allan</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://allanmcrae.com/?p=435</guid>
		<description><![CDATA[The fan control on the MacBook Pro under Linux is not the best&#8230;   I would say it does not work at all but I once saw the fan speed increase slightly on its own so it appears to do something, sometimes, according to some logic I can not figure out.
It turns out that [...]]]></description>
			<content:encoded><![CDATA[<p>The fan control on the MacBook Pro under Linux is not the best&#8230;   I would say it does not work at all but I once saw the fan speed increase slightly on its own so it appears to do something, sometimes, according to some logic I can not figure out.</p>
<p>It turns out that taking &#8220;manual&#8221; control of the fan is quite easy.  A simple</p>
<p><code>echo 1 &gt; /sys/devices/platform/applesmc.768/fan1_manual</code><br />
sets the fan to manual mode.  Then you can adjust <tt>fan1_output</tt> in the same directory to set the current fan speed.  Do not get confused with <tt>fan1_input</tt>, as that is strangely the actual fan speed! The minimum and maximum speeds are given by <tt>fan1_min</tt> and <tt>fan1_max</tt>.  If the minimum speed is reported as 0 or 1, ignore it.  For MacBook Pros with Core 2 Duo processors the minimum fan speed should be 2000.  The maximum fan speed is 6200.</p>
<p>So now that we know how to control the fan, we just need some sort of algorithm to choose what the fan speed should be based on the temperature.  The MacBook Pro has a whole bunch of temperature sensors, but the ones that matter are for the processors as they are always the highest.    These are found in <tt>/sys/devices/platform/coretemp.{0,1}/temp1_input</tt> (you may need to load the <tt>coretemp</tt> module).  Montoring these during basic usage shows the average temperatures of the two processors is around 40-45C during idle, 50-55C with basic web browsing and 60-65C when watching a HD movie (at least in warm Australian ambient temperatures).</p>
<p>To save battery on a laptop, I think that the fan should not come on when the computer is doing anything less intensive than watching a movie, so I set that fan to kick in at 65C.  This coincides with what Mac OSX does.  From OSX, it appears that the fans should hit full speed at 80C and the speed builds up exponentially to that point.  The formula I use for changing the fan speed when the temperature is increasing is:</p>
<p><code>temp &lt;= 65:<br />
&nbsp;&nbsp;&nbsp;speed = max(current_speed, 2000)<br />
65 &lt; temp &lt; 80:<br />
&nbsp;&nbsp;&nbsp;step = (6200 - 2000) / ( (80 - 65) * (80 - 64) / 2 )<br />
&nbsp;&nbsp;&nbsp;speed = max(current_speed, ceil(2000 + (temp - 65) * (temp - 64) / 2 * step))<br />
temp &gt;= 80:<br />
&nbsp;&nbsp;&nbsp;speed = 6200</code></p>
<p>When the temperature is decreasing, I prefer to keep the fan going slightly longer to force the temperature down to low levels as quickly as possible.   I push it back down to 55C using this formula:</p>
<p><code>temp &gt;= 80:<br />
&nbsp;&nbsp;&nbsp;speed = 6200<br />
55 &lt; temp &lt; 80:<br />
&nbsp;&nbsp;&nbsp;step = (6200 - 2000) / ( (80 - 55) * (80 - 54) / 2 )<br />
&nbsp;&nbsp;&nbsp;speed = min(current_speed, floor(6200 - (80 - temp) * (81 - temp) / 2 * step)<br />
temp &lt;= 55:<br />
&nbsp;&nbsp;&nbsp;speed = 2000</code><br />
Here is a graphic of what that looks like (red = increasing, blue = decreasing):</p>
<p><img class="aligncenter" src="http://allanmcrae.com/images/fanspeed.png" alt="fan speed" /></p>
<p>Grap the source code <a href="http://allanmcrae.com/packages/mbpfan-1.0-1.src.tar.gz">here</a>.  It assumes two processors and a single fan (not true for all MacBook Pros&#8230;).  For Arch Linux users, there is also a PKGBUILD and daemon (mbpfan) for ease of use.  I am lazy, so there is very little error checking in the code.  It works for me but use at your own risk&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu is an Evil Dictatorship!</title>
		<link>http://allanmcrae.com/2010/03/ubuntu-is-an-evil-dictatorship/</link>
		<comments>http://allanmcrae.com/2010/03/ubuntu-is-an-evil-dictatorship/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 03:51:58 +0000</pubDate>
		<dc:creator>Allan</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://allanmcrae.com/?p=345</guid>
		<description><![CDATA[It seems that the Ubuntu community has found out that their opinion does not count as much as they thought and that Ubuntu &#8220;is not a democracy&#8220;. So the purple, I mean aubergine, theme is here to stay and the window control button placement will be on the top left (and in the opposite order [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that the Ubuntu community has found out that their opinion does not count as much as they thought and that Ubuntu &#8220;<a href="https://bugs.launchpad.net/ubuntu/+source/light-themes/+bug/532633/comments/167">is not a democracy</a>&#8220;. So the <del>purple</del>, I mean aubergine, theme is here to stay and the window control button placement will be on the top left (and in the opposite order from OSX for the moment).  I guess this is a really big issue because you can not change themes or configuration files in Ubuntu&#8230; wait&#8230;  you can? Oh well then, move along, nothing to see here.  I can almost guarantee that there will be a script released that changes the window control placement to the right side, just as many scripts are available to install all the &#8220;restricted&#8221; multimedia codecs that are not installed by default. </p>
<p>We all have known for a long time that <a href="http://www.archlinux.org/static/magazine/2008/newsletter-2008-Jun-02.html#contributed">Arch is not a democracy</a>.  So Ubuntu users set to move to a new distro where they can contribute nothing but still have their opinion count should not look towards Arch.</p>
]]></content:encoded>
			<wfw:commentRss>http://allanmcrae.com/2010/03/ubuntu-is-an-evil-dictatorship/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Taking Moblin For A Spin</title>
		<link>http://allanmcrae.com/2009/06/taking-moblin-for-a-spin/</link>
		<comments>http://allanmcrae.com/2009/06/taking-moblin-for-a-spin/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 10:38:39 +0000</pubDate>
		<dc:creator>Allan</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://allanmcrae.com/?p=130</guid>
		<description><![CDATA[I thought I should take the Moblin v2 Beta release for a spin to see what all the excitement is about. While most distros would run fine on a netbook with little modification (e.g. The EEE repo for Arch essentially just contains a kernel), Moblin started from scratch and provides an interface specifically designed to [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I should take the <a href="http://moblin.org">Moblin</a> v2 Beta release for a spin to see what all the excitement is about. While most distros would run fine on a netbook with little modification (e.g. The <a href="http://code.toofishes.net/packages/eee/">EEE repo</a> for Arch essentially just contains a kernel), Moblin started from scratch and provides an <a href="http://moblin.org/sites/all/files/u4/myzone.jpg">interface</a> specifically designed to get the most out of netbooks.  Also, it is optimized for Intel&#8217;s Atom processor, so should provide a boost to multimedia applications on those less powerful processors that netbooks contain (in particular optimizations for the <a href="http://en.wikipedia.org/wiki/SSE2">SSE2</a> and <a href="http://en.wikipedia.org/wiki/SSE3">SSE3</a> instruction sets).</p>
<p>I was intending to test the Moblin Beta (20090529) in VirtualBox as I do not actually have a netbook, but that is not supported yet. While the live CD will boot, the screen resolution is too small for the upper menu to fit and the functionality is severely impaired. It did boot and run well on my laptop (any computer with recent Intel parts should be fine), but I was limited to testing from the live CD due to lack of spare partition to install it on.</p>
<p>My initial impressions are all positive.  The interface makes it easy to do what I would want to do on a netbook (browse the internet and watch videos).  Connecting to wireless internet was simple and sound worked out of the box.  The web browser and media players did their job. The concept of &#8220;zones&#8221;, rather than multiple desktops, also works well.  I would not be expecting to run too many applications at the same time on a reasonably underpowered machine anyway. I would need more time to assess how useful &#8220;the myzone&#8221; actually is, but my initial impress is that it could use improvement.</p>
<p>A couple of things did frustrate me:</p>
<ul>
<li>The inability to configure the top menu.  I do not use Twitter or Last.fm so it would be good to get rid of the &#8220;status panel&#8221;.</li>
<li>The &#8220;myzone&#8221; page can only have its background customized. This seems an area where more configuration options would be useful.</li>
<li>I spent a lot of time looking for a shut-down button. It appears hitting the power button on the laptop does a shutdown (without a confirmation dialog&#8230;).</li>
<li>The lack of a system tray. An instant messager is a bit useless without one.</li>
</ul>
<p>I am sure some/all of these will be addressed as the distro heads towards an actual release.  Only not being able to configure the top menu and the lack of system tray are critical as far as I am concerned.</p>
<p>Overall, I will definitely consider Moblin quite favorably if/when I get a netbook.</p>
]]></content:encoded>
			<wfw:commentRss>http://allanmcrae.com/2009/06/taking-moblin-for-a-spin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
