Ubuntu guru on power management hacks

It was while watching fellow Linux users having to shutdown their laptops in between talks at open source conferences some years ago that Matthew Garrett, now head of the Ubuntu laptop team, was initially alerted to power management issues in Linux systems.

After almost 15 years of hacking, Garrett will attend next week's linux.conf.au, to give a presentation on power management in an effort to fix suspend "for fun and profit".

Aside from working on improving hardware driver issues, Cambridge, U.K.-based Garrett has also worked extensively in Linux development, and was, until his resignation last August, one of the Debian project's most active developers.

Garrett speaks with Liz Tay about working in the open source community, Debian, Ubuntu, and linux.conf.au.

What interests you most about power management? For how long have you been working on power management and what are some experiences you've had?

I started looking at power management in 2002, after discovering that my laptop didn't work too well with the traditional APM support in Linux. At the time, Linux's ACPI support was pretty minimal. By 2004, things were starting to work better. I'd upgraded my laptop, and then spent a couple of weeks working on the kernel. By that summer, I'd worked out most of the kinks and suspend and resume worked reliably for me.

Later on that year, I got invited to the first Ubuntu development meeting. It gave me an opportunity to test how well this worked on other people's laptops. Sadly, it turned out that I was pretty much alone; almost everyone else there who had working power management had the same laptop as me! It was an opportunity though, and by the end of the week we had several more machines working.

Visiting conferences made me realise just how important power management was. Linux users all seemed to assume that they were doomed to spend the rest of their lives turning their laptops off between talks, and, to be honest, it was kind of embarrassing. I was in a position to help do something about it, and so since then I've spent time doing so.

What's the problem with suspend on current Linux systems? How can this be fixed?

Sadly, there's more than one problem. In many cases, the issue is with hardware drivers. Many Linux drivers were written without worrying about power management support, and so machines using these drivers are likely to have problems. In other cases, it's because hardware has only been tested against Windows. Windows and Linux have entirely separate implementations of the ACPI specification, and unsurprisingly the interpretations of the specification vary to some extent.

Finally, the ACPI spec doesn't cover video hardware - it's up to the operating system to reprogram the video card, and Linux often doesn't know how to.

The driver problem is likely to solve itself as more people start expecting power management to work. As bugs get filed, they'll get fixed. In terms of compatibility with Windows, two approaches have been taken.

Firstly, the Linux code has been altered to be more compatible with the Windows implementation - there's no point in being correct if nothing works. Secondly, Intel have released a toolkit that allows vendors to test whether their hardware conforms to the specification or not. With luck, this will become widely used.

The video problem is probably the hardest. There are various workarounds using the video BIOS, but they're not guaranteed to work. The only long-term solution is for X to gain support for reprogramming video cards from scratch, and sadly that's something that may require support from the video hardware manufacturers.

Page Break

Why did you resign from Debian in August 2006?

The short answer is simply that I wasn't enjoying it any more. The longer answer is that I found that too much of my time in Debian was spent in petty inter-personal conflicts. I could have ignored those and just carried on working on my own, but being an active member of a community is part of what makes open source development so interesting.

In the end, I decided that my time could be better spent elsewhere. I'm generally more relaxed and happy now, so I've no doubts about whether or not it was the right decision.

What is your take on Dunc-Tank? Many Debian users were quite vocal about it. Were their criticisms founded?

I think Dunc-Tank was a worthwhile experiment. Based on the degree of disruption it's caused, I've no idea whether it'll be considered a success. I think many of the people who objected about it had an idealistic interpretation of what Debian was, and felt that the introduction of money would spoil things. In reality, people have been paid to work on Debian almost since the project began - Ian Murdock spent time being paid by the FSF.

I think some of the criticisms were somewhat more reasonable. People were concerned about the project leadership choosing who to spend money on, and I can understand how people might feel slighted about not receiving money when they've put in a comparable amount of effort to those who do.

Page Break

You're now head of the Ubuntu laptop team - can you tell us a bit more about where you're working, and what you're currently working on?

My Ubuntu involvement is still a spare-time thing. During the day, I'm working on trying to finish off my PhD in genetics. As a result, most of my laptop work gets done at my home in Cambridge. Most of what I work on is trying to get things to "just work" - that is, allowing people to install Ubuntu on their laptops and have everything work properly without any extra configuration or editing arcane files or anything like that.

It's a surprisingly complicated thing to do. In order to get hardware to work, you need to make sure that the kernel supports it. Then you need to make sure that the user applications can access that hardware correctly, and finally they need to present it to the user in a useful way. Having a working card slot is no use unless an icon pops up when you put a card in. I work on all these levels, which means that whatever goes wrong, it's probably my fault!

What is your opinion on Ubuntu's reliance on Debian?

It's pretty clear that Ubuntu couldn't survive without Debian and the huge amount of effort that Debian's developers put in. Whatever I might think about Debian's social dynamics, I have no criticism at all of Debian's level of technical excellence. I can't think of another distribution that matches that.

What has working in the open source community been like for you?

It's given me the opportunity to meet a variety of fascinating and fun people, visit places I'd never otherwise have been to, and learn huge amounts of technical detail despite not having any formal computer training. Even when I did work on open source full time, it's never been anything other than fun.

It continues to amaze me that so many people around the world with so little in common can still somehow manage to work together to produce excellent software. Plus, they generally seem to know how to throw good parties.

What first sparked your interest in open source? Do you still believe in any open source ideals?

I first installed NetBSD in 1995 or so, but only really started using open source properly when I moved to Debian in 1998. The idea that I could see how stuff worked was fascinating - the idea that I could fix bugs I found rather than having to wait for someone else to was a revelation. The fact that people would thank me for doing so is a continuing source of vague bemusement, since to a large extent I do this because it's fun rather than to make other people happy.

I absolutely still believe in the open source (or free software) ideals, but to a large extent out of pragmatism rather than on any philosophical basis. A large number of the bugs I get are due to non-free code, and the fact that I can't do anything about them is intensely frustrating. If the author of some free software doesn't want me to do something I want to do, I can do it anyway. Non-free software can make it almost impossible to do things that users want to do, and nobody can do anything about it.

I think Vista's DRM is going to result in more people asking questions, and I think they're going to be receptive to the answers that open source can provide.

Page Break

What is your opinion on the Novel-Microsoft deal?

I'm in two minds about it. I'm not convinced that it's in the best interests of the Linux community, but then I think pretty much every commercial Linux distribution has made decisions that are in their interests rather than the community's. I don't see it causing significant long-term harm to Linux, and I'm certainly unhappy with the way that some people have tried to use it to further their own political goals.

Have you any professional role models in the IT industry?

Professional role models? Not really. I've got huge amounts of respect for everyone who's contributed to an open source project in any way, and I think I'm immensely lucky to have met so many of them. But I can't say that I was really aware of any IT figures while I was growing up, and I've ended up doing what I do because I find it fun rather than because someone else inspired me to. But I wouldn't be here without the hundreds (if not thousands) of people who have offered me advice and help over the years, whether they're professionals or not.

How many linux.conf.au's have you attended, and how many have you presented at? How do you feel about presenting again this year?

I've been to the previous two LCAs (2005 and 2006), presenting at 2006. LCA is an absolutely wonderful conference to visit, but the reception to my presentation amazed me - the audience is wonderful, with an excellent mixture of experience levels, and everyone made me feel very welcome. As a result, I'm hugely looking forward to being there again this year.

For more information on LCA 2007, go to http://lca2007.linux.org.au/

Copyright © 2007 IDG Communications, Inc.

How to supercharge Slack with ‘action’ apps
  
Shop Tech Products at Amazon