Older blog entries for mjg59 (starting at number 243)

Looks like I picked the wrong week to give up crystal meth

One of the features of Windows 7 is that hitting windows+p will pop up a little dialog that allows you to configure your active display outputs. This is an improvement over previous versions of Windows, which would generally instead have a variety of random vendor-specific tools that would function differently, look ugly and make you cry. So, hurrah to Windows for moving into the 21st century.

Most laptops have a display switch key. This is sent in a variety of ways, generally either via the keyboard controller, via WMI or via ACPI. In Linux we take all of these events and turn them into KEY_SWITCHVIDEOMODE, making it easy to implement standardised behaviour.

This is, obviously, far too straight forward.

Microsoft, rather than introducing an input mechanism that allows all of these events to hook into the windows+p infrastructure, provide the following recommendation:

As documented in this Launchpad bug, vendors are starting to do this. It's been seen in HP and Dell machines, at least, and it's presumably going to become more widespread.

So, if your display switch button now just makes the letter "P" appear, say thanks to Microsoft. There's a range of ways we can fix this, although none of them are straightforward and those of you who currently use left-Windows-p as a keyboard shortcut are going to be sad. I would say that I feel your pain, but my current plan is to spend the immediate future getting drunk enough that I stop caring.

(The good news is that the same set of recommendations says that you can no longer put a Windows sticker on a monitor unless it has a valid and accurate EDID. The bad news is that that implies that you've previously been able to put a Windows sticker on a monitor without it having a valid and accurate EDID)

Syndicated 2010-04-22 22:33:51 from Matthew Garrett

Nook update (again)

Barnes and Noble released the nook source code last week. This includes the code to busybox, uboot and their kernel. Unfortunately, the uboot and kernel code both appear to be missing swathes of code found statically linked in the binaries that they're distributing. License compliance is hard, let's flail wildly.

Syndicated 2010-02-26 18:31:26 from Matthew Garrett

You know it's a bad day when:

ld gives you "Can not allocate memory".

(turned out to be a corrupt object file)

Syndicated 2010-02-24 19:21:58 from Matthew Garrett


As I mentioned, I headed to Pittsburgh last week to give some talks at CMU and find out something about what they're doing there. Despite the dire weather that had closed the airport the day before, I had no trouble getting into town and was soon safely in a hotel room with a heater that seemed oddly enthusiastic about blasting cold air at me for ten seconds every fifteen minutes. Unfortunately, it seems that life wasn't as easy for everyone - ten minutes after I arrived, I got a phone call telling me that the city had asked CMU to cancel classes the next day.

This turned out to be much less of a problem than I'd expected - whether because of their enthusiasm to learn about ACPI or because they simply hadn't noticed the alert telling them about the cancellation, a decent body of students turned up the next morning. After a brief chat with Mark Stehlik, the assistant dean for undergraduate education, I headed off to the lecture hall. The fact that I can now just plug my laptop into a VGA cable and have my desktop automatically extend itself continues to amaze me, as does OpenOffice's seemingly unerring ability to get confused about which screen should have my content and which should be showing me the next slide. Nevertheless, facts were imparted and knowledge dropped on those assembled. I'm even reasonably sure that the contents were factually accurate, which is a shame because the most attractive part of teaching always struck me as being able to lie to students who will then happily regurgitate whatever you tell them because in case it turns up on the exam. Perhaps this is why I'm safer out of academia.

Lunch offered an opportunity to visit the Red Hat sponsored lab, which was pleasingly located somewhere other than a basement. The guy on the right of the picture is Greg Kesden, the director of undergraduate laboratories in CS there - it was wonderful to get an opportunity to see the machines getting used, and students seemed genuinely appreciative of the facility.

After lunch I spent a while talking to Satya about the Internet Suspend and Resume project. This is an impressive combination of virtualisation and migration, using a Fedora-based live image to bring up an OS on arbitrary hardware before downloading a machine image and launching it. The majority of the data is pulled in on demand, meaning that initial performance can be slow but ensuring that data is only downloaded if it's needed. When the user is finished, the delta between the original image and the new one can be pushed back to the server while remaining cached on the local machine in case the image is used again.

It's an interesting approach, combining the flexibility of thin clients with the advantages of having actually useful computing power at the local end. There's a few functional awkwardnesses, such as some VMs being unhappy if images are migrated between machines with different CPU features, and it obviously benefits from having significant bandwidth. But the idea of being able to combine the convenience of a floating session with the knowledge that you can still keep copies of your data on you is an attractive one, and I'd love a future where I can move my session between my laptop and a desktop.

After that there was some time to talk to Bill Scherlis and Philip Lehman about the software engineering courses that CMU run. Part of the minor in software engineering includes a course requirement to make a meaningful contribution to an existing software project, from design through to submission and upstream acceptance. I had the opportunity to talk to a couple of the students about this and the differences they found between working with the Mozilla and Chrome communities, which I'll try to write up at some point.

Finally I gave a presentation on Fedora and some of the issues that we face in providing a useful OS when patents and recalcitrant hardware vendors do their best to thwart us. Despite the ice outside and the significantly-below-freezing temperatures, enough people turned up that sorties had to be sent out to find extra chairs. It was great to see how interested people were in learning about what we do, although it's probably the case that the free pizza did help encourage people.

After that it was an early trip back to the airport, where I found that my plane was delayed and the only "restaurant" still open was McDonalds. Even so, I left with the feeling that it had been an interesting and educational visit. Many thanks to David Eckhardt, who runs the OS course I presented to and who looked after me all day - thanks too to Joshua Wise who picked me up when David was running late due to the ground being covered with blocks of ice.

Syndicated 2010-02-19 21:35:36 from Matthew Garrett

Gobi 2000

Anssi Hannula posted a patch to add Gobi 2000 support to qcserial and provided me with support for gobi_loader. I've added the gobi_loader code here. You'll need Anssi's kernel patch from here, and probably also my followup patch with extra IDs from here. Note that the 2000 devices need an extra firmware file (UQCN.mbn) as well as the apps.mbn and amss.mbn files.

The qcserial driver is currently broken in 2.6.32 and later. It's due to the switch to using kfifo for usb serial, but we haven't been able to work out the actual cause. I'm looking at alternative approaches.

Syndicated 2010-02-17 21:56:54 from Matthew Garrett

Shaping young minds

I'm off to CMU at the weekend, in order to do a couple of talks on Monday (the 8th). I'll be giving an introduction to ACPI to the operating systems class in the morning, and an open presentation on Fedora, some of the challenges we face and how to get involved in Linux in the afternoon. This is as a result of our cooperation with CMU, which has led to things like the request on the right. How could we refuse?

Syndicated 2010-02-05 18:54:34 from Matthew Garrett

Nook GPL update

"We are currently working on getting the code shipped out, we have your shipping address on file and will ship the code out as soon as it is ready, this will be by the end of this month."

2/10, must try harder. Even ignoring the fact that it's taking the best part of two months to get from shipping binaries to shipping source, it'll be interesting to see which version of the firmware the source release corresponds to given that the 1.1.0 update included a new kernel.

Speaking fo firmware updates - as shipped, the nook was a disaster. The firmware update improved things greatly, but I'm still stuck with cases where books render with the last couple of words in a page left out, and the order of books in the local content library is now based on last modification time rather than, say, author name. The continuing lack of any way to implement catagorisation or provide worthwhile metadata means that it's frustrating having to remember which order the books in a series go in. The fact that there's even a distinction between content you've obtained from B&N and content you've obtained from elsewhere is mindboggling. You need to explicitly switch between the two, which means that collections are broken up if you've had the audacity to buy some books from B&N and some books from elsewhere.

Having now spent a while travelling with the nook, it's clear that it's still not an especially effective example of its type. If my Sony hadn't suffered an unfortunate accident, I'd be using it instead. The nook's hardware is significantly better and as a platform it's got much more potential, but it just doesn't do a terribly good job at its core role - reading books. It'll get better with time, but if you're in the market for something that actually works today then go elsewhere.

There's other little things that are upsetting at a conceptual level. The 1.0.0 firmware will flash unsigned firmware, which is useful[1] but also an obvious wtf. The filesystem is full of scripts that are world writable and executed as root. There's a libGLES, but the coverflow implementation appears to be handled entirely in software. There's a general feeling that the platform's been put together by people who either don't know what they're doing, don't care about doing it properly or were working under sufficient time constraints that getting it right wasn't an option. I'm really not impressed.

[1] Especially given that the 1.1.0 firmware will happily flash the 1.0.0 firmware...

Syndicated 2010-01-18 23:00:00 from Matthew Garrett

ACPI drivers

The article I wrote for lwn on writing ACPI drivers is now available for free.

Syndicated 2010-01-07 15:53:36 from Matthew Garrett

Nook update

My nook arrived today, along with an email asking for my shipping address in order to be sent a CD with the source on. So that's progress. The nook itself is an interesting device - it comes in impressively well produced packaging, which looks easily as attractive as any Apple product I've laid hands on lately. Except that it then includes a double-sided sheet of instructions in the outer packaging to tell you how to get the damn thing out.

And so far, that seems like a pretty good summary of the device. There's a huge quantity of form here, but the function is lacking. The initial registration was made infuriating by the lag between hitting a key on the keyboard[1] and anything happening. I'm not talking about the understandable lag due to the latency of updates on e-ink screens - I'm talking about the seemingly non-deterministic time between tapping the screen and it indicating that I've pressed a key. The coverflow feature for books is better than selecting from a menu of items (e-ink lends itself badly to interactive displays), but slow and jerky. Worse, it's limited to B&N content. Anything you obtain elsewhere and then copy onto the device (which presents as USB mass storage) ends up in a separate menu without any coverflow. And, even more infuriatingly, you can't catagorise the files you copy on there. It's just one big list, sorted alphabetically by author (surname) and then title.

Once you're in a book, things aren't bad. It reformats the text every time you enter a book (no caching), but that takes much less time than my Sony did. The default font is very readable, even at small sizes. But there's clearly something horribly wrong - various epub files I have take up to 4 seconds to perform a page turn, which is way longer than the second or so my Sony took. There's no way to skip to a given page number, which seems like an insane oversight. And, though it's a minor point, the next/previous page buttons are the opposite way around to the Kindle or Sonys, and it's taking a while to get used to that.

It's a promising device. The hardware's clearly capable and the software is mostly there, with the features I'm really missing being ones that shouldn't be hard to implement[2]. But those features are pretty glaring, and right now they make this less functional than the Sony, let alone the Kindle. I'm also kind of surprised that it doesn't ship with any kind of cover at all. There's ample opportunity for physical trauma to turn one of these into a paperweight.

Side note: My nook managed to include the QA checklist slip, presumably by accident. The nook's internal manufacturing designation appears to be "X2", and mine was built on 2009/11/25. Which would seem optimistic for an intended shipping date in the US of 2009/11/30, which does support the idea that the shipping delay was due to some kind of delay in the hardware production.

[1] Presented on the LCD panel
[2] Of course, this being closed-source, I can't do so myself. Sigh.

Syndicated 2009-12-10 23:33:38 from Matthew Garrett

234 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!