<?xml version='1.0' encoding='utf-8' ?>
<!--  If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/  -->
<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
<channel>
  <title>Matthew Garrett</title>
  <link>http://mjg59.livejournal.com/</link>
  <description>Matthew Garrett - LiveJournal.com</description>
  <lastBuildDate>Fri, 09 May 2008 15:25:11 GMT</lastBuildDate>
  <generator>LiveJournal / LiveJournal.com</generator>
  <lj:journal>mjg59</lj:journal>
  <lj:journaltype>personal</lj:journaltype>
  <image>
    <url>http://p-userpic.livejournal.com/4975639/1051328</url>
    <title>Matthew Garrett</title>
    <link>http://mjg59.livejournal.com/</link>
    <width>64</width>
    <height>66</height>
  </image>

<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/88951.html</guid>
  <pubDate>Fri, 09 May 2008 15:25:11 GMT</pubDate>
  <link>http://mjg59.livejournal.com/88951.html</link>
  <description>My &lt;a href=&quot;http://mjg59.livejournal.com/88608.html&quot;&gt;previous entry&lt;/a&gt; was somewhat misleading in one respect - the discussion of the power consumption of a downclocked processor. The problem is that nowadays, halving your CPU frequency &lt;em&gt;doesn&apos;t&lt;/em&gt; halve the power consumption (see the figures in &lt;a href=&quot;http://www.slideshare.net/oscon2007/os-vandeven&quot;&gt;Arjan&apos;s&lt;/a&gt; slides from OSCON last year, for instance). I&apos;m assuming that this is due to the cache size on modern hardware being sufficiently large that it dominates the power consumption of the processor. Dropping the frequency doesn&apos;t reduce the amount of power required to keep the contents of the cache alive, so the saving is less than you&apos;d expect. Deeper C states disable the cache and save much more power.&lt;br /&gt;&lt;br /&gt;So, if halving your speed means everything takes twice as long but doesn&apos;t even  halve your power consumption, what&apos;s the point in having P states at all? There&apos;s a certain amount of latency and power involved in moving between C states, and if the choice is between rapidly cycling between full speed and C4 or just sticking at low speed and maybe dropping into C1 or C2, then executing code at the lower performance state may be beneficial. The ondemand governor takes this into account by looking at the amount of load on the processor over time, so if this doesn&apos;t hit a threshold value it&apos;ll assume that you&apos;re better off staying at the lower performance level.</description>
  <comments>http://mjg59.livejournal.com/88951.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/88608.html</guid>
  <pubDate>Thu, 08 May 2008 23:19:14 GMT</pubDate>
  <link>http://mjg59.livejournal.com/88608.html</link>
  <description>Modern CPUs are great. They have all sorts of advanced power saving features, which is one of those nice cases where everyone can save money, gain performance and claim environmental credentials at the same time. Everyone&apos;s a winner.&lt;br /&gt;&lt;br /&gt;Well. Everyone&apos;s a winner as long as your software doesn&apos;t suck.&lt;br /&gt;&lt;br /&gt;I&apos;ve talked about the benefits of the tickless kernels and reducing wakeups and spending longer in deep C states &lt;a href=&quot;http://mjg59.livejournal.com/74651.html&quot;&gt;before&lt;/a&gt;, so if you don&apos;t know about them then go and read that first. This time I&apos;m going to focus on a different level of hardware, and a different level of suck.&lt;br /&gt;&lt;br /&gt;For a long time, laptops supported changing the speed of processors when switching between AC and battery. CPU power consumption is proportional to frequency, so dropping the frequency meant a longer battery life. Of course, it also meant that it took longer to get anything done - the reason this was still a win was because CPUs in those days consumed just as much power when idle as when running. Transmeta introduced a technology called Longrun with their Crusoe processors, bringing the ability to drop both the frequency and the voltage of the CPU simultaneously. With power consumption being proportional to the square of the voltage, even a small drop resulted in worthwhile power savings. As the only really worthwhile thing Transmeta brought to the x86 world[1], this was unsurprisingly ripped off by everyone else. Intel introduced their Enhanced Speedstep, AMD gave people PowerNow and VIA have Longhaul.&lt;br /&gt;&lt;br /&gt;Obviously, reducing the frequency of the CPU increased battery life. Everyone&apos;s happy?&lt;br /&gt;&lt;br /&gt;No[2].&lt;br /&gt;&lt;br /&gt;The problem is that nowadays, processors don&apos;t consume as much energy when they&apos;re idle as when they&apos;re running. The aforementioned C states mean that an idle processor consumes a tiny percentage of a loaded one - an ultra-low voltage Intel part will draw on the order of a watt. Executing code, even at the lowest voltage and frequency, will draw far more power. Obviously, we want to keep the processor idle for as long as possible. The easiest way to do this would be to never run anything, but that&apos;s not a real option. The alternative is to run when we have to, but make sure that we get it over with as quickly as possible so we can return to the idle state. Counterintuitively, that means switching to the highest voltage and frequency, executing the code and then dropping back into the idle state. By going faster, we save power[3].&lt;br /&gt;&lt;br /&gt;In summary, the only sensible way to use a CPU is to run it as fast as possible in order to let it idle as much as possible, and drop the frequency and voltage when it&apos;s not doing anything. The. Only. Sensible. Way.&lt;br /&gt;&lt;br /&gt;Some people write software that lets you choose different power profiles depending on whether you&apos;re on AC or battery. Typically, one of the choices lets you reduce the speed of your processor when you&apos;re on battery. This is bad. It is wrong. The people who implement these programs are dangerous. Do not listen to them. Do not endorse their product and/or newsletter. Do not allow your eldest child to engage in conjugal acts with them. Doing this will reduce your battery life. It will heat up your home. It will kill baby seals. The sea will rise and your car will float away. If you are already running it, make sure that it always sets your cpufreq governor to ondemand and does not limit the frequencies in use. Failure to do so will result in me setting you on fire[4].&lt;br /&gt;&lt;br /&gt;The only legitimate reasons for limiting the speed of your CPU are to avoid overheating (which should be fixed in the kernel, really - having userspace in charge of ensuring the continued functioning of the machine is madness) or to make the machine quieter. And if you want your machine to be quieter, there should be a tickbox marked &quot;Reduce performance in order to reduce noise&quot; or something, which would take into account all the sources of heat in your machine rather than just your CPU. Encouraging the managing of acoustic levels by asking users to restrict the functionality of their CPU is just another way of saying &quot;Look! We suck!&quot;. Letting the user choose a specific CPU governor or a specific frequency is not a useful thing to do. Don&apos;t do it unless you want to see dead kittens. Delivered by UPS.&lt;br /&gt;&lt;br /&gt;[1] And, presumably, whatever else Intel and everyone else ended up licensing off them which resulted in their reinvention as an IP company rather than a CPU one, but that&apos;s just not interesting to me.&lt;br /&gt;&lt;br /&gt;[2] Even ignoring the people that are unhappy for entirely unrelated reasons, such as injured toenails or the brutal murder of their family&lt;br /&gt;&lt;br /&gt;[3] There&apos;s a corner case here, which is a system that is always entirely CPU bound. Say we halve the CPU&apos;s speed. Along with the voltage drop, that gets us down to about 20% of the original power consumption. Of course, it now takes twice as long to do anything and your screen, RAM, hard drive, chipset and so on are still drawing power, so will end up costing you twice as much power as they would have done if you&apos;d run at full speed. If you do the maths, it works out that you save power if your processor&apos;s full-speed power consumption is more than 1.7 times that of the rest of the platform. In the real world, things are made more complicated by the rest of your platform consuming more power if you&apos;re working over a longer period of time - your hard drive is going to end up spending more time spun up, your memory bus is going to be active for longer and so on. You&apos;re basically not going to hit this case.&lt;br /&gt;&lt;br /&gt;[4] While the burning of your body will result in carbon emissions, the reduction in power usage should offset this in the long run</description>
  <comments>http://mjg59.livejournal.com/88608.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/88514.html</guid>
  <pubDate>Tue, 06 May 2008 22:48:06 GMT</pubDate>
  <link>http://mjg59.livejournal.com/88514.html</link>
  <description>&lt;img src=&quot;http://www.codon.org.uk/~mjg59/pics/SCIENCE.jpg&quot; align=&quot;right&quot;&gt;One of the advantages of working in a biology lab is getting deliveries of stuff in dry ice and getting to play with the dry ice afterwards. Sadly, while dry ice is clearly very cool (a-ha ha ha ha ha (dies)) it makes a lousy way of cooling down your drinks[1]. With a latent heat of sublimation of merely 199kJ/kg, CO&lt;sub&gt;2&lt;/sub&gt; draws less energy out of the liquid than ice&apos;s latent head of melting of 334kJ/kg. That&apos;s easily dealt with by using larger blocks of dry ice, but the fundamental problem seems to be that most of the sublimed CO&lt;sub&gt;2&lt;/sub&gt; boils straight out of the glass and just gently cools the atmosphere instead. Maybe ethanol cubes are the way forward.&lt;br /&gt;&lt;br /&gt;[1] Much like Red Stripe, it is also a lousy fabric softner.</description>
  <comments>http://mjg59.livejournal.com/88514.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/88191.html</guid>
  <pubDate>Sat, 03 May 2008 23:50:50 GMT</pubDate>
  <link>http://mjg59.livejournal.com/88191.html</link>
  <description>It turns out that I was insightful &lt;a href=&quot;http://mjg59.livejournal.com/24643.html&quot;&gt;four and a half years ago&lt;/a&gt;, and I should damn well listen to my own opinions.</description>
  <comments>http://mjg59.livejournal.com/88191.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/87884.html</guid>
  <pubDate>Sat, 03 May 2008 14:41:56 GMT</pubDate>
  <link>http://mjg59.livejournal.com/87884.html</link>
  <description>People rarely ask me about my amazing &lt;a href=&quot;http://mjg59.livejournal.com/70286.html&quot;&gt;ability to remove fruitfly ovaries in under 10 seconds&lt;/a&gt;. &quot;This skill makes me strangely attracted to you&quot; they then inevitably fail to add, thus giving the lie to claims that a PhD in biology is a great way to impress women. In order to avoid future social embarrassment I have therefore decided to provide a step-by-step guide to removing ovaries from any fruitflies you may have to hand.&lt;ul&gt;&lt;li&gt;Feed your fruitflies. Fruitflies like yeast, so give them a pile to munch on. A well-fed fruitfly is a happy fruitfly.&lt;li&gt;A happy fruitfly is a fertile fruitfly, and has bigger ovaries. Since fruitflies are small, this makes your job easier.&lt;li&gt;Knock your fruitflies out with carbon dioxide. When doing this, ensure that you don&apos;t knock yourself out with carbon dioxide.&lt;li&gt;Separate your fruitflies into male and female flies. Female flies have larger abdomens and striped posteriors - male ones are thinner and have solid black markings.&lt;li&gt;Dispose of the males. They don&apos;t have ovaries. Local laws may make it awkward for you to release animals from laboratory environments, so dump them into a bottle of ethanol. They&apos;ll probably die happy, to the extent that fruitflies can really be happy.&lt;li&gt;Etherise the female flies. When identifying ether, try not to do so by smelling it.&lt;li&gt;Once the female flies are thoroughly dead, transfer one to a small watchglass containing a quantity of phosphate buffered saline with a small quantity of detergent in it. Place this under a low magnification microscope.&lt;li&gt;Grip the neck of the fly with a set of needle-nosed tweezers. Grip the very rear of the fly with another set of needle-nosed tweezers.&lt;li&gt;Slowly move the tweezers apart. If you are lucky, the abdomen will split and you&apos;ll start pulling out internal organs. If you&apos;re unlucky, the head will come off. In this case you should move the first set of tweezers further down the body and try again.&lt;li&gt;Continue pulling out internal organs until you find two objects that look like bunches of bananas. These are the ovaries, with each &quot;banana&quot; being an egg chamber containing an egg and associated support cells.&lt;li&gt;(If your fruitfly contains no ovaries, it&apos;s not a female. Try again)&lt;li&gt;Carefully separate the ovaries from the other chunks of tissue that are stuck to them, and transfer the ovaries to a tube containing phosphate buffered saline.&lt;li&gt;Repeat until you run out of flies. Note that towards the end, it will become tempting to just tear the flies into small pieces rather than removing their ovaries. Bear in mind that the aim is to obtain fruitfly ovaries, not to kill flies. There are much easier ways of doing the latter.&lt;li&gt;Dispose of the remaining bits of flies in accordance with any relevant legislation. Do not throw remaining bits of flies at coworkers.&lt;li&gt;Fix the ovaries in formaldehyde and suspend in methanol. Freeze at -20°C.&lt;/ul&gt;See? It&apos;s all very easy.&lt;br /&gt;&lt;br /&gt;(Note: This protocol involves chemicals known by the state of California to cause cancer, birth defects and general fucked-upness. Do not ingest methanol unless you want to demonstrate competitive inhibition in the form of a bottle of vodka. Value of fruitfly ovaries may go up as well as down. Do not taunt fruitfly ovaries)</description>
  <comments>http://mjg59.livejournal.com/87884.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/87717.html</guid>
  <pubDate>Tue, 29 Apr 2008 00:36:39 GMT</pubDate>
  <link>http://mjg59.livejournal.com/87717.html</link>
  <description>Why has the phrase &quot;&lt;a href=&quot;http://en.wikipedia.org/wiki/Mark_Zuckerberg&quot;&gt;Zuckerberg&lt;/a&gt;&apos;s &lt;a href=&quot;http://en.wikipedia.org/wiki/Zuckerman%27s_Famous_Pig&quot;&gt;famous pig&lt;/a&gt;&quot; not appeared on the internet up until this point?</description>
  <comments>http://mjg59.livejournal.com/87717.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/87357.html</guid>
  <pubDate>Mon, 28 Apr 2008 21:59:19 GMT</pubDate>
  <link>http://mjg59.livejournal.com/87357.html</link>
  <description>As &lt;a href=&quot;http://www.livejournal.com/users/amgb2/&quot;&gt;Adam&lt;/a&gt; mentioned, Facebook has a new feature to let you search for the frequency of various words used in communication over time. You probably need to be a Facebook user to see any of these, but interesting ones include &lt;a href=&quot;http://www.facebook.com/lexicon/index.php?q=never+drinking&quot;&gt;never drinking&lt;/a&gt;, &lt;a href=&quot;http://www.facebook.com/lexicon/index.php?q=rape&quot;&gt;rape&lt;/a&gt; (tends to peak on Sundays) and &lt;a href=&quot;http://www.facebook.com/lexicon/index.php?q=dead&quot;&gt;dead&lt;/a&gt;, which demonstrates the somewhat bizarre effect of Heath Ledger on the internet.</description>
  <comments>http://mjg59.livejournal.com/87357.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/87201.html</guid>
  <pubDate>Thu, 24 Apr 2008 11:08:21 GMT</pubDate>
  <link>http://mjg59.livejournal.com/87201.html</link>
  <description>&lt;a href=&quot;http://www.aigarius.com/blog/2008/04/24/baby-jesus-violation-meme/&quot;&gt;Yes, because getting offended when people voice their opinion that women belong chained to the sink or that (insert race here) are genetically inferior or (insert sexual practice here) indicates dangerous deviancy is a clear sign of lack of personal integrity and self-awareness&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I give up. Life is significantly better at parody than I am.</description>
  <comments>http://mjg59.livejournal.com/87201.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/86963.html</guid>
  <pubDate>Thu, 24 Apr 2008 02:25:37 GMT</pubDate>
  <link>http://mjg59.livejournal.com/86963.html</link>
  <description>Dear &lt;a href=&quot;http://etbe.coker.com.au/2008/04/24/offensive-blog-posts/&quot;&gt;Russell&lt;/a&gt;,&lt;br /&gt;&lt;br /&gt;You &amp;lt;------------------------------------------&amp;gt;Perth&amp;lt;----------------------------------&amp;gt;The point&lt;br /&gt;&lt;br /&gt;Kthxbi,&lt;br /&gt;&lt;br /&gt;Matthew&lt;br /&gt;&lt;br /&gt;Updated: &lt;a href=&quot;http://etbe.coker.com.au/2008/04/24/offensive-blog-posts/#comment-13171&quot;&gt;This&lt;/a&gt; makes me think that there ought to be a &lt;a href=&quot;http://moon.debian.net&quot;&gt;moon&lt;/a&gt; somewhere in the above diagram.</description>
  <comments>http://mjg59.livejournal.com/86963.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/86662.html</guid>
  <pubDate>Wed, 23 Apr 2008 16:31:46 GMT</pubDate>
  <link>http://mjg59.livejournal.com/86662.html</link>
  <description>&lt;img src=&quot;http://www.codon.org.uk/~mjg59/pics/touchpad_fail.png&quot;&gt;&lt;br /&gt;&lt;br /&gt;Note that by &quot;Enable Touchpad&quot; it also means &quot;Make my touchpad mouse buttons work&quot;. For machines that are only equipped with a touchpad (and, indeed, some that are equipped with a trackpoint as well - it depends on how it&apos;s wired up), the only option is to figure out that the space bar or enter will save you.&lt;br /&gt;&lt;br /&gt;(Ubuntu-specific change, introduced in 8.04)</description>
  <comments>http://mjg59.livejournal.com/86662.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/86288.html</guid>
  <pubDate>Wed, 23 Apr 2008 00:39:49 GMT</pubDate>
  <link>http://mjg59.livejournal.com/86288.html</link>
  <description>&lt;a href=&quot;http://etbe.coker.com.au/2008/04/21/purpose-of-planet-debian/#comment-13152&quot;&gt;Oh, and for the love of christ&lt;/a&gt;. Australian cultural norms are the correct standard for determining what&apos;s acceptable for posting on a site that has clear guidelines against offensive content? Baby Jesus cries with as much pain as if he&apos;d been suddenly violated in an utterly inappropriate way.</description>
  <comments>http://mjg59.livejournal.com/86288.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/86148.html</guid>
  <pubDate>Wed, 23 Apr 2008 00:12:02 GMT</pubDate>
  <link>http://mjg59.livejournal.com/86148.html</link>
  <description>&lt;a href=&quot;http://theferrett.livejournal.com/1087686.html&quot;&gt;...&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Leaving aside the obvious failure (asking women to classify themselves into those who are happy to have their breasts groped and those who aren&apos;t - and yes, that &lt;i&gt;is&lt;/i&gt; the effective choice, since refusing to participate will result in people making conclusions about which of those categories you fit into), there&apos;s the whole &quot;open-source breast&quot; thing.&lt;br /&gt;&lt;br /&gt;Creating copyrightable works is a choice. Having breasts is not[1]. Attempting to equate the two is not reasonable. Applying &quot;open-source&quot; to things that are not directly comparable to copyrightable works is like applying &quot;Darwinism&quot; to things that are not directly comparable to natural selection operating upon living things. Discussing Darwinistic politics is likely to result in people concluding that you&apos;re either a libertarian fuckloon or blame atheists for the death of your cat. Discussing open-source breasts is likely to result in me &lt;a href=&quot;http://www.warrenellis.com/?p=739&quot;&gt;stabbing you in the fucking eye&lt;/a&gt;. Don&apos;t make the baby Jesus cry when he sees your horribly mutilated face. Just accept that open source is a useful licensing model, not an entire way of life.&lt;br /&gt;&lt;br /&gt;Or: get your hands off my adjective or you&apos;ll find my hands on things you &lt;em&gt;really&lt;/em&gt; don&apos;t want groping, whether you&apos;re wearing a badge or not.&lt;br /&gt;&lt;br /&gt;(And yes, I realise that this is not the offensive aspect of things. &lt;a href=&quot;http://springheel-jack.livejournal.com/2504302.html&quot;&gt;This says it better than I could&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://etbe.coker.com.au/2008/02/09/an-obstacle-for-women-in-the-it-industry/&quot;&gt;(Previously)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://schwuk.com/articles/2007/3/29/anonymous-cowards&quot;&gt;(Previously previously)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;[1] There&apos;s a set of basically uninteresting exceptions. And by &quot;uninteresting&quot; I mean &quot;If you are trying to argue over this, then you are missing the fucking point&quot;</description>
  <comments>http://mjg59.livejournal.com/86148.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/85923.html</guid>
  <pubDate>Sat, 19 Apr 2008 19:57:53 GMT</pubDate>
  <title>Why Linux claims to be Windows</title>
  <link>http://mjg59.livejournal.com/85923.html</link>
  <description>Section 5.7.2 of the ACPI specification provides for a method called _OSI. Platform firmware can query for various interfaces, which allow it to tweak its behaviour depending on the interfaces that the OS supports. Linux claims to support the following interfaces:&lt;ul&gt;&lt;li&gt;Windows 2000&lt;br /&gt;&lt;li&gt;Windows 2001&lt;br /&gt;&lt;li&gt;Windows 2001 SP1&lt;br /&gt;&lt;li&gt;Windows 2001 SP2&lt;br /&gt;&lt;li&gt;Windows 2001.1&lt;br /&gt;&lt;li&gt;Windows 2001.1 SP1&lt;br /&gt;&lt;li&gt;Windows 2006&lt;/ul&gt;which all correspond (unsurprisingly) to different versions of Windows. Linux used to be in there, but was removed for reasons I&apos;ll get into later.&lt;br /&gt;&lt;br /&gt;The typical way in which this feature is used by a platform is by querying each of the interfaces in turn, starting with the most recent a firmware is aware of. After the first match, a value will be stashed somewhere and used elsewhere in the firmware when making certain decisions. An example of this may be only enabling certain devices (such as the HPET) if the OS claims to support Windows Vista.&lt;br /&gt;&lt;br /&gt;As I mentioned, recent versions of Linux no longer claim to support the Linux interface. There&apos;s a couple of reasons for this. Firstly, some platforms &lt;a href=&quot;http://bugzilla.kernel.org/show_bug.cgi?id=7787&quot;&gt;break&lt;/a&gt; if they&apos;re told that they&apos;re running on Linux. It&apos;s usually an entirely untested codepath. Secondly, the whole point of the _OSI method is to provide the platform with information about the interface supported by an OS. &quot;Linux&quot; is too coarse grained - we make no guarantees that the interface between the OS and the platform will remain constant. &quot;Linux 2.6.25&quot; isn&apos;t all that much better, since distribution patches may alter the behaviour and BIOSes would become specific to a given kernel version. We could have something like &quot;Linux ABI 1&quot; and then bump that every time we altered the behaviour of the kernel in this respect, but this would become unwieldy fairly quickly (what would count as an ABI breaking change?)&lt;br /&gt;&lt;br /&gt;So what kind of interface can we claim to provide? The sad truth of the matter is that most vendors will only test their code against Windows, and that as a result Windows provides the de-facto specification for OS/platform interaction. We could skip claiming to be Windows, but (in the best case) that means that the system will assume it&apos;s working with an OS that supports no advanced features. Rather than getting support for brightness changes being handled by the OS, we get stuck with SMM traps and unexpectedly missing time. If we want hardware to work to its full potential, we need to claim to be a recent version of Windows.&lt;br /&gt;&lt;br /&gt;Does this mean the entire _OSI mechanism is useless? Not really. It&apos;s still useful for providing information about supported functionality. One example used in the spec is whether or not the OS implements the ACPI 3.0 thermal model. Another obvious (but unspecced) example might be whether or not the video opregion spec is implemented in the OS. _OSI strings which explicitly advertise the existence of advanced functionality are something that should be specified and encouraged. What they shouldn&apos;t be used for is as a way of advertising &lt;i&gt;lacking&lt;/i&gt; functionality, which is effectively the only way that Linux can be usefully interpreted today. We don&apos;t want machines to automatically repost their video if they detect they&apos;re running Linux. It makes it harder to implement proper kernel-level graphics resume code. We don&apos;t want them to suddenly alter their keyboard behaviour, because that probably makes it harder to support older machines that don&apos;t have these workarounds.&lt;br /&gt;&lt;br /&gt;Message to vendors: If we&apos;re not behaving in the same way as Windows does, let us know. We&apos;ll fix it. This has the benefit of fixing not only your latest and greatest platform, but also all the older ones that expected the same behaviour. Please don&apos;t try to work around our bugs in your BIOS - it just means that we need to special case you forever, and in the long run your hardware won&apos;t work as well as it would if we just fixed things properly.</description>
  <comments>http://mjg59.livejournal.com/85923.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/85504.html</guid>
  <pubDate>Thu, 17 Apr 2008 23:01:33 GMT</pubDate>
  <link>http://mjg59.livejournal.com/85504.html</link>
  <description>Another update of my AHCI force quirking patch, somewhat cleaned up to let the existing kernel code do more of the work. The only functional change in this version is that some of the chipset IDs are disabled. The Intel specs state that plain (non-RAID supporting) desktop chipsets don&apos;t support AHCI. If you find that enabling one of the disabled IDs works for you, let me know along with the output of lspci -vxn -s 1f.2 . Patch is &lt;a href=&quot;http://www.codon.org.uk/~mjg59/tmp/ahci_quirk_cleanup.diff&quot;&gt;here&lt;/a&gt;. Success and failure reports welcome.&lt;br /&gt;&lt;br /&gt;Note: I&apos;ve had one report of SCSI errors associated with a previous version of the patch. I&apos;m not quite sure what&apos;s going on there, but if you&apos;re paranoid about data corruption then you probably shouldn&apos;t play with this right now.</description>
  <comments>http://mjg59.livejournal.com/85504.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/85311.html</guid>
  <pubDate>Thu, 17 Apr 2008 20:06:04 GMT</pubDate>
  <link>http://mjg59.livejournal.com/85311.html</link>
  <description>This week I&apos;m in Mountain View for the &lt;a href=&quot;http://wiki.x.org/wiki/Events/XDC2008&quot;&gt;X Developers&apos; Conference&lt;/a&gt;, where I gave a presentation on things graphics drivers have to care about in order to make suspend/resume work reliably. Various people suggested that I write up an explanation of the current situation, along with some best practices for manufacturers.&lt;br /&gt;&lt;br /&gt;One of the major differences between the ACPI specification and the older APM specification is that saving and restoring hardware state is generally left up to the operating system, with the firmware playing a much more passive role. Linux is now able to handle this state restoration for the majority of hardware, but we still have issues with graphics. Modern graphics hardware can be hugely complicated, which to a large extent we&apos;ve been able to ignore because the platform will initialise it on boot. Many X drivers know how to switch a card from text mode to graphics mode (and vice-versa), but that&apos;s not adequate.&lt;br /&gt;&lt;br /&gt;What can make this situation even more awkward is that the ACPI specification makes no guarantees about what state the hardware comes up in. It may still be in PCI D3. It may be powered up, but the registers may all be zeroed. It&apos;s even valid for the hardware to come up in text mode. A driver has to be able to deal with all of these situations.&lt;br /&gt;&lt;br /&gt;So far, we&apos;ve mostly tried to deal with this situation by running chunks of the video BIOS with applications like vbetool. This is hacky and often works badly - in some cases, it won&apos;t work at all (nvidia rewrite the entry point to their video BIOS after boot, in order to prevent situations where someone attempts to POST the card and it tries to jump to bits of the system BIOS that no longer exist). The only long-term option is for the kernel to handle the graphics suspend/resume. There&apos;s several levels at which this can be supported:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Able to restore text mode. This is basically adequate right now, since the kernel enforces a virtual terminal switch around suspend/resume.&lt;br /&gt;&lt;li&gt;Able to restore arbitrary video mode. In the kernel modesetting world, we want to be able to go straight into the mode that we&apos;re running X in, in order to reduce screen flicker. This would probably still be surrounded with a VT switch out of and into X.&lt;br /&gt;&lt;li&gt;Able to jump straight into X. Right now, on x86 the process freezer will prevent X from running until after all of the devices have been resumed. As we move to a model where we remove the freezer and expect drivers to be able to block userspace tasks, we hit a pretty obvious problem with X - right now it hits the graphics hardware directly, rather than going via the kernel. With nothing to block it, it&apos;ll hit the hardware while it&apos;s still in an undefined state and then become very unhappy. This can&apos;t really be fixed until X does all its hardware access through the kernel. For now, we can inhibit X by leaving the VT switching in place.&lt;/ul&gt;Since 2.6.25, i915 and later Intel hardware can manage basic mode reprogramming without requiring any external assistance. The radeon kernel modesetting code is also heading in this direction, and we ought to be able to manage something there before too long. The nouveau developers are heading towards the stage of being able to do native mode programming, so there&apos;s some hope of progress there as well.&lt;br /&gt;&lt;br /&gt;It&apos;s not all plain sailing, though. Vendors can wire up hardware in different ways. AMD and Nvidia hardware provides scripts in the ROM that, in theory, abstract this away. The downside to this is that we&apos;ll have to put the interpreters for these scripts in kernel space, though this is probably needed for kernel modesetting work anyway. Even then, it&apos;s possible that we&apos;ll need workarounds for specific pieces of hardware that don&apos;t quite behave as we expect them to.&lt;br /&gt;&lt;br /&gt;As far as making graphics work over suspend/resume, we have a pretty good idea where we are now (failing on anything other than modern Intel hardware), where we need to be in the future (triumph, huge success, cake) and how to get there (?). However, hardware manufacturers can still help.&lt;br /&gt;&lt;h2&gt;Chipset vendors:&lt;/h2&gt;Tell us how to reinitialise your hardware. If that involves parsing BIOS tables, then please let us know how to do that. Expecting us to jump into your ROM and execute x86 code is ok if that&apos;s genuinely the only way to do it, but for any modern hardware that&apos;s clearly not the case.&lt;br /&gt;&lt;h2&gt;System vendors:&lt;/h2&gt;Try not to alter your system behaviour too wildly. Requiring magic register writes in order to light up the VGA output does not classify as value add. Please don&apos;t have your firmware program text mode directly - we&apos;re trying to get away from that. And do not attempt to detect that you&apos;re running on Linux and alter your system behaviour. If it&apos;s possible for you to tell that you&apos;re not running on Windows, that&apos;s a bug in Linux. If you rely on that bug, you will break. I&apos;m not joking here in the slightest. The closest thing to a &quot;standard&quot; interface between an OS and the hardware is whatever Windows does, and we&apos;re basically aiming for bug-for-bug compatibility there.</description>
  <comments>http://mjg59.livejournal.com/85311.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/85083.html</guid>
  <pubDate>Sun, 13 Apr 2008 22:24:35 GMT</pubDate>
  <link>http://mjg59.livejournal.com/85083.html</link>
  <description>Dear RSA,&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.rsaconference.com/2008/US/home.aspx&quot;&gt;Turing Lives&lt;/a&gt;? Leaving aside the fact that your &lt;a href=&quot;http://www.rsaconference.com/2008/US/About_the_Conference/Conference_Theme.aspx&quot;&gt;biography&lt;/a&gt; entirely fails to mention the manner of his &lt;a href=&quot;http://en.wikipedia.org/wiki/Alan_Turing#Prosecution_for_homosexual_acts_and_Turing.27s_death&quot;&gt;death&lt;/a&gt; (security through prejudice? Wait, hang on...), this bit really seems excessive:&lt;br /&gt;&lt;cite&gt;&lt;br /&gt;There’s no telling what Turing would do if he were around today, but one thing is certain, he would attend RSA Conference to gather and share new ideas and inspiration&lt;/cite&gt;&lt;br /&gt;&lt;br /&gt;Speaking for the dead in order to further commercial concerns? The dead baby Jesus weeps bitter tears, so &lt;a href=&quot;http://www.zazzle.com/mjgarrett&quot;&gt;buy my t-shirts&lt;/a&gt;.</description>
  <comments>http://mjg59.livejournal.com/85083.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/84786.html</guid>
  <pubDate>Sun, 06 Apr 2008 15:15:34 GMT</pubDate>
  <link>http://mjg59.livejournal.com/84786.html</link>
  <description>Now that I&apos;ve got a little more time on my hands, I&apos;ve updated and done some bugfixing on my patch to quirk ICH devices over from PIIX-compatibility mode to AHCI mode. It turns out that ICH8 is a little different to ICH7, and needs an extra bit to be set. Without that being done, the AHCI BAR would still be programmed as i/o ports. Interpreting this as mmio space let to unsurprising crashes. With a bit of luck, this should also fix the &quot;My CD drive is no longer there&quot; issue - you&apos;ll still need to load ata_piix in order to access it, but make sure you do it after ahci has bound to the sata controller.&lt;br /&gt;&lt;br /&gt;Patch against 2.6.24 is &lt;a href=&quot;http://www.codon.org.uk/~mjg59/tmp/ahci_quirk_2.6.24.diff&quot;&gt;here&lt;/a&gt; - let me know if it works for you.&lt;br /&gt;&lt;br /&gt;(Context: AHCI provides support for various features that the PIIX compatible mode doesn&apos;t, including link-level power saving. This is potentially beneficial for mobile users)</description>
  <comments>http://mjg59.livejournal.com/84786.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/84586.html</guid>
  <pubDate>Fri, 28 Mar 2008 15:39:17 GMT</pubDate>
  <link>http://mjg59.livejournal.com/84586.html</link>
  <description>&lt;a href=&quot;http://www.extjs.com&quot;&gt;Ext JS&lt;/a&gt; is some sort of Javascript framework stuff. I know nothing whatsoever about Javascript, but what interested me was the slightly odd &lt;a href=&quot;http://www.extjs.com/license&quot;&gt;license&lt;/a&gt;. If you&apos;re a non-profit you can have it under the LGPL 3.0, but if you want to use it in a library then you have to buy a commercial license for them. This seems at odds with my understanding of the LGPL, but anyway. I&apos;m a non-profit, so I&apos;ve downloaded it under the LGPL. Under my LGPL rights, I&apos;ve put it up for download &lt;a href=&quot;http://www.srcf.ucam.org/~mjg59/extjs/ext-2.0.2.zip&quot;&gt;here&lt;/a&gt;. If you want to use it in a library, feel free to do so as long as you abide by version 3.0 of the LGPL.&lt;br /&gt;&lt;br /&gt;Thanks to &lt;a href=&quot;http://blog.rupamsunyata.org/2008/03/28/section-twelve.xhtml&quot;&gt;Decklin for pointing this out&lt;/a&gt;.</description>
  <comments>http://mjg59.livejournal.com/84586.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/84464.html</guid>
  <pubDate>Sun, 23 Mar 2008 03:07:34 GMT</pubDate>
  <link>http://mjg59.livejournal.com/84464.html</link>
  <description>Because you all love me and deeply want to know what on Earth I&apos;m doing with my life/want to hire me, I&apos;ll put you out of your misery and let you know that I&apos;ve just accepted an offer from &lt;a href=&quot;http://www.redhat.com&quot;&gt;Red Hat&lt;/a&gt; to &lt;s&gt;save the universe&lt;/s&gt; work on kernel and userspace power management. With luck, it&apos;ll go some way to making up for the ridiculous amount of flying I&apos;m still due to do this year.</description>
  <comments>http://mjg59.livejournal.com/84464.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/84127.html</guid>
  <pubDate>Fri, 21 Mar 2008 16:01:50 GMT</pubDate>
  <link>http://mjg59.livejournal.com/84127.html</link>
  <description>I&apos;m moving to London in a bit over a week, which means disposing of some quantity of junk, moving some more to London and hiding the rest (anyone got any recommendations for storage? I don&apos;t need regular access, but life would be immeasurably easier if they can pick stuff up and take it away). It also means the end of almost 10 years of living in Cambridge, and as a consequence there will be a party in the usual location on Friday the 28th. And possibly also on Saturday the 29th, depending on how much alcohol there still is lying around.&lt;br /&gt;&lt;br /&gt;Also, if anyone in the Cambridge area wants some junk, the current list is &lt;a href=&quot;http://www.cam.ac.uk/cgi-bin/wwwnews?grp=ucam.adverts.giveaway&amp;amp;art=19678&quot;&gt;here&lt;/a&gt;. I&apos;ll update stuff &lt;a href=&quot;http://www.codon.org.uk/~mjg59/tmp/hardware.txt&quot;&gt;here&lt;/a&gt; as necessary.</description>
  <comments>http://mjg59.livejournal.com/84127.html</comments>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/83942.html</guid>
  <pubDate>Fri, 14 Mar 2008 21:17:48 GMT</pubDate>
  <link>http://mjg59.livejournal.com/83942.html</link>
  <description>Wednesday: &lt;br /&gt;&lt;img src=&quot;http://www.codon.org.uk/~mjg59/pics/snow.jpg&quot;&gt;&lt;br /&gt;&lt;br /&gt;Today: &lt;br /&gt;&lt;img src=&quot;http://www.codon.org.uk/~mjg59/pics/sea.jpg&quot;&gt;&lt;br /&gt;&lt;br /&gt;Hurrah for the open source development model!&lt;br /&gt;&lt;br /&gt;(One of these taken by someone who &lt;a href=&quot;http://neurosophy.livejournal.com&quot;&gt;can take pictures&lt;/a&gt;, and one taken by me)</description>
  <comments>http://mjg59.livejournal.com/83942.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/83504.html</guid>
  <pubDate>Fri, 14 Mar 2008 01:32:54 GMT</pubDate>
  <link>http://mjg59.livejournal.com/83504.html</link>
  <description>Airports visited in the past week: 4 (rising to 6 in 12 hours or so)&lt;br /&gt;Terminals visited in Heathrow: 2&lt;br /&gt;Terminals enjoyed in Heathrow: 0&lt;br /&gt;Vending machines in groundside of Heathrow terminal 2: 2, hidden near the men&apos;s toilets&lt;br /&gt;Temperature of &quot;ice cold&quot; Coca Cola from vending machine: 5°C&lt;br /&gt;Currencies currently carried: 4&lt;br /&gt;Passports currently carried: 2&lt;br /&gt;Fuses blown in airports: 1&lt;br /&gt;Belonging to me: 0&lt;br /&gt;Gross vm86-related hacks perpetrated: 1&lt;br /&gt;Number of x86 instructions to emulate in order to achieve the above: 21&lt;br /&gt;Number actually emulated as yet: 0&lt;br /&gt;&lt;br /&gt;Those of you who haven&apos;t &lt;a href=&quot;http://achewood.com/index.php?date=12112007&quot;&gt;been too busy not paying attention&lt;/a&gt; will already know my whereabouts on the 13th of October and why my alibi is weak but that&apos;s another story for another time, but also that I&apos;m in Recife from tomorrow afternoon until some time on Sunday and Porto de Galinhas from then until Wednesday in order to present at &lt;a href=&quot;http://www.bossaconference.indt.org/&quot;&gt;Bossa&lt;/a&gt; to talk about Ubuntu Mobile and the challenges involved in turning a Linux desktop distribution into something suitable for devices that are less large than your face. Sadly, logistical errors on my part mean I won&apos;t have any demo hardware with me, but there&apos;s always some potential for other synergy. Please don&apos;t beat me to death. Ow. Not the face. Please, not the face.</description>
  <comments>http://mjg59.livejournal.com/83504.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/83443.html</guid>
  <pubDate>Sat, 08 Mar 2008 02:16:50 GMT</pubDate>
  <link>http://mjg59.livejournal.com/83443.html</link>
  <description>Dear Mountain View,&lt;br /&gt;&lt;br /&gt;Why is it so indescribably awkward to get from north of 101 to downtown on foot?&lt;br /&gt;&lt;br /&gt;Fucking sort it out,&lt;br /&gt;&lt;br /&gt;Matthew</description>
  <comments>http://mjg59.livejournal.com/83443.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/82998.html</guid>
  <pubDate>Wed, 05 Mar 2008 11:53:57 GMT</pubDate>
  <link>http://mjg59.livejournal.com/82998.html</link>
  <description>It seems fashionable for people to finish their doctorates at their moment, and on Monday I (almost) joined the herd. The outcome of my defence was that they&apos;d like a couple of extra experiments done, so it&apos;s back to the lab for a fortnight, new credit cards for everyone[1] and cab it to the Gold Club[2].&lt;br /&gt;&lt;br /&gt;Tomorrow sees me continuing my one man campaign to destroy the planet&apos;s ecosystem by heading to the bay area[3] for a total of just under 48 hours. I then continue to France for a few days of holiday, before reversing and hitting up Recife for &lt;a href=&quot;http://www.bossaconference.indt.org/&quot;&gt;Bossa 08&lt;/a&gt;. Alarmingly this still all involves less time on planes than LCA did, which makes me conclude that Australia is in a silly location and we should ship it somewhere more convenient, like just off the west coast of Ireland.&lt;br /&gt;&lt;br /&gt;[1] Possibly lie&lt;br /&gt;[2] Definite lie&lt;br /&gt;[3] Mostly the south bay. Because I hate life.</description>
  <comments>http://mjg59.livejournal.com/82998.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
<item>
  <guid isPermaLink='true'>http://mjg59.livejournal.com/82698.html</guid>
  <pubDate>Mon, 18 Feb 2008 04:41:25 GMT</pubDate>
  <title>Boston</title>
  <link>http://mjg59.livejournal.com/82698.html</link>
  <description>Back in the US, crashing with &lt;span class=&apos;ljuser&apos; lj:user=&apos;kernelslacker&apos; style=&apos;white-space: nowrap;&apos;&gt;&lt;a href=&apos;http://kernelslacker.livejournal.com/profile&apos;&gt;&lt;img src=&apos;http://p-stat.livejournal.com/img/userinfo.gif&apos; alt=&apos;[info]&apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;http://kernelslacker.livejournal.com/&apos;&gt;&lt;b&gt;kernelslacker&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; and marvelling at the fact that &lt;a href=&quot;http://en.wikipedia.org/wiki/Snoop_Dogg&quot;&gt;Snoop Dogg&lt;/a&gt; has a &lt;a href=&quot;http://en.wikipedia.org/wiki/Snoop_Dogg%27s_Father_Hood&quot;&gt;reality TV show on bringing up kids&lt;/a&gt;. It also seems that the cosmetics industry has solved the cancer problem, based on the number of adverts that show magic moisturiser molecules appearing to repair DNA.&lt;br /&gt;&lt;br /&gt;Leaving on Tuesday, some potential for booze on Monday. I&apos;ll be at &lt;a href=&quot;http://www.fosdem.org&quot;&gt;FOSDEM&lt;/a&gt; from Friday, and ought to be at &lt;a href=&quot;http://www.bossaconference.indt.org/&quot;&gt;Bossa&lt;/a&gt; next month. April sees &lt;a href=&quot;http://www.lugradio.org/live/USA2008/speakers&quot;&gt;LRL US&lt;/a&gt; and power management or laptops or some sort of hangover-inspired song and dance interpretation of the driver model.&lt;br /&gt;&lt;br /&gt;(Edited: cancer &lt;em&gt;problem&lt;/em&gt;, not cancer &lt;em&gt;industry&lt;/em&gt;. Sometimes I wonder about myself)</description>
  <comments>http://mjg59.livejournal.com/82698.html</comments>
  <category>advogato</category>
  <lj:security>public</lj:security>
</item>
</channel>
</rss>
