Memory usage of gnome-power-manager 2.16.x : 2.7MiB
Memory usage of gnome-power-manager 2.17.x : 1.7MiB

On a side note, gnome-power-manager 2.16.x was pretty much synchronous with hard-coded sequences of operations and functions depending on events. 2.17.x is much better code IMO, with most of the events happening asynchronously and with separate state machines. This makes the code much easier to understand and modify, and should squash some weird timing bugs. It also makes adding new functionality as easy to add as dropping in a couple of gobjects and hooking up some signals.

CVS versions of hal, hal-info, pm-utils, PolicyKit, libnotify, GtkUnique and of course gnome-power-manager are in the utopia FC6 repo. Caveat emptor.

Moving back to Fedora

Okay, for the first time in my life I'm a distro whore. I'm now running Fedora again on my development laptop (replacing Edgy). Why the switch so soon?:

  • RPMs from CVS are easier to make than DEBs in my opinion.
  • I've found out you can run synaptic (and apt-get) on Fedora.
  • I found myself looking on google to do things with Ubuntu that I know by heart for Fedora.
  • A clean init system that I can understand and tweak.
  • Signal to noise ratio. The Redhat guys are easy to talk to and there is a minimal amount of noise on the mailing lists and IRC.
  • I can use custom DKMS ipw3945 and nvidia packages so my custom kernels can work automatically with binary-shitty drivers.
  • Black magic. I'm doing lots of work with development versions of the kernel, PolicyKit, HAL and X and I need a clean environment. Ubuntu has lots of black magic, which is great from a “just works” perspective but bad when you are trying to hack on core bits of the stack.

Don't get me wrong, I still think Edgy is great, and would wholeheartedly recommend it for someone new to Linux. For me, Fedora is just right.

hal and hal-info

A few minutes ago I committed a change to hal to move all the information FDI scripts to hal-info.

hal-info is just a small hal package that provides the hardware data and quirks. These quirks are currently things like what mice support reporting battery status, what music players are supported and what cameras are detected. This could also include a list of display adaptors that need resuming or a list of broken batteries that might explode.

Why split the data from the daemon tarball? Well, policy and probing information is still in the daemon package where it belongs. Hal is released every few months with updated dependencies and lots of snazzy new features. Users love this, stable distributions hate it, and don't update HAL, missing the newest hardware quirk updates. This means that new hardware often won't work out of the box until the next version of the distro is released.

So, for example, stable distro 'x' ships HAL 0.5.9 with no intention of updating it other than for security fixes. Stable distro 'x' does however update from hal-info-20061107 to hal-info-{date} as there are no new features, minimal risk of breaking, and lots of chance that more stuff that didn't work now will.
Note: the hal-info version does not match the hal version – by design. Expect more frequent releases of hal-info than hal.

What does this mean:

  • for an end user: Not much – all the fdi files are installed in the same places as they used to be. hal-info updates might be a little more frequent, and more new hardware might just work.
  • for a distro packager: hal should depend on hal-info, of any version. Existing patches to the fdi files in fdi/information should be moved to the hal-info product.
  • for the release architect: updating hal-info shouldn't break anything that already works or add new dependencies.
  • for the developer: hal-info should be checked out in the same level directory as hal if you intend to use ./run-hald.sh

Comments welcome.

re: Why is Microsoft partnering with Novell

I've just read Bruce Perens blog about the Novell and Microsoft agreement.

One sentence that made me think is “…Novell will help Microsoft turn back the Open Document Format and substitute something Microsoft controls…” – now this is Bruce's not-so-neutral opinion, but I personally read this as “Novell might be persuaded to stop actively pushing ODF”. Maybe I misunderstand the agreement.

Basically my concern is simply thus: Why is Microsoft partnering with Novell? I'm sure they're not doing it for the fuzzy pink feeling, but rather long term commercial gain.

X.org General Musings

A few weeks ago I blogged about moving my development machine to Ubuntu. So far so good, but here is what I've noticed so far as a developer:

  • apt-get source foo is the best command in the world when playing with packages
  • Fedora configured my X with a very small xorg.conf. Ubuntu's default xorg.conf is HUUUGE and bloated on this new install. Congrats to the Redhat guys that made this possible. Ubuntu guys, please start doing the same.

Also on related X news, I'm very suprised at the lack of noise about open source NVidia driver effort. It seems to me that 5 talented X hackers using renouveau could probably do a half decent OpenGL driver in a couple of weeks. Even if the driver wasn't complete, a driver that would work for 90% of typical use scenarios would be great. Or even better, if renouveau could be made point and click so that 500 semi-talented hackers could do it in a few months.

After looking at the TODO page I've decided my code-karma is probably lacking for X and DRI work, although I'm doing lots of background reading to try and do something useful in a few months, and if nothing else, I can help improve the documentation.

Moving from Fedora to Ubuntu

With a little regret, I'm writing this blog entry. These are my opinions only.

Ever since I've been a Linux user (and now developer) I've stuck with Redhat and Fedora.
Back in 2002 I was happily using Redhat 8.0, then 9, then FC1, FC2, FC3, FC4, FC5 as each were released.

I don't tend to install “distro-of-the-month” as Fedora always did what I needed.
Recently, Fedora has been annoying me (yes, I know some have solutions).

  • YUM, pirut and yum-updatesd seem to want to fight with each other all the time. This stuff should just work but the interaction seems very immature.
  • It's a pain in the arse to use proprietary drivers (some hardware you don't get to choose).
  • Sometimes I need to access NTFS stuff on my windows partition.
  • Fedora Extras is growing all the time, but it is still no match to the packagers of debian.
  • A single broken rpm/yum transaction hoses my entire system.
  • Mirror balancing never worked, and often the yum update would just fail or worse, hang.
  • I was compiling kernel.org kernels by hand to get all my hardware working.
  • Upgrading from stable version to stable version / rawhide using yum sometimes breaks horribly.

So I gave Ubuntu Edgy 2 weeks on my new laptop, vowing to return to Fedora if I found I couldn't do certain things.

Things that have been great:

  • Hardware that just works, or that works correctly after installing firmware.
  • apt-get, it's faster that yum and seems to just work, Plus no meta-data downloading just to install one quick package.
  • NTFS volumes that work out of the box.
  • No arguing over what belongs in extras and core.
  • One CD installer, that doubles as a live CD. This is amazing.
  • The concept of soft-deps, i.e. where a package can “suggest” another but not depend on it. Very sane IMO.
  • Ability to install modified DSDT easily without hacking the kernel.
  • More random oddball packages (that I need for Uni) than in extras.
  • Less licence hassle. Yup, enable the multiverse and restricted repo, and done.
  • Synaptic. It's so much more mature than pirut. And it's easy and quick to use.
  • Community response. I've got better response from Ubuntu dev's in launchpad than I did in Redhat bugzilla.
  • Sane menus. I want to see Firefox and Evolution in my menus rather than “Web browser” and “Email”
  • Boot speed. Not sure what the Ubuntu guys have done, but it's 4 seconds quicker to get me to the login window.

Things that have been less great:

  • Less patches tend to go upstream from Ubuntu than Fedora in my opinion.
  • Compiling a .deb seems very complicated to me compared to a .rpm.
  • No compiz support out of the box.
  • The horror of xorg.conf is back. Fedora seemed to detect stuff automatically which is more sane.
  • No root user. Not sure this is a good thing or a bad thing. sudo seems to do what I want.
  • The grub screen is hideous compared to the Fedora boot artwork. (bug filed)
  • The Ubuntu shutdown is slower by one second.

So, after a couple of weeks, I can't imagine going back to Fedora, which is a little bit worrying.
Don't get this wrong, I love Fedora and think Redhat as a company are great, but I think Ubuntu is more the distro for me at the moment.

Re-writing the _BIF and _BST ACPI methods…

A couple of days ago my new laptop arrived. A nice shiny new Lenovo 3000 N100. Most stuff worked out of the box (well done kernel guys), but most important to me: the battery ACPI code was really bad. So I got no rate information and a really bad approximation of the charge level. For a bloke working on gnome-power-manager, this was really bad news. Windows XP just gave me the percentage charge also, so this wasn't a Linux bug.

Last night I decompiled the DSDT and was surprised to find no errors or warnings. Hmm. So I looked closely at the source. LENOVO were just hardcoding values rather than querying the smart battery which is what they are meant to do. And when they were querying the battery, the return value was being processed incorrectly.

So I re-wrote the _BIF and _BST ACPI methods to actually interface with the hardware in a sane way. Bear in mind I only had a copy of the generic ACPI spec, but managed to figure out most of the undocumented embedded controller interface (EC0). I'll formally write up what I found when I get a chance.

So now, I have a really custom DSDT that provides me with accurate voltage, charge and rate information that works really well. If anyone from LENOVO is reading this, then please get one of your BIOS engineers to call me on my mobile or email me. I would love for this to be included in a BIOS update to fix all the other Windows XP and Linux laptops out there. I've also got a fully commented (well the battery bits anyway) DSDT for any LENOVO owners wanting to hack even more than I've done.

Also, I had to recompile a custom kernel with this patch just to enable dsdt loading into the kernel using an initrd. Ubuntu make this super-duper easy I'm told, but working with Fedora makes this a pain in the backside. Anyone with contacts to IBM/Lenovo then please send them a link to this post or get them to email me. In the words of Mattew Garrett: “0 out of 10 – See Me”

ACPI: Embedded Controller [EC0]

I spent a couple of hours last night trying to fix a broken BIOS.
It's a long shot, but do any of you have the specification for ACPI: Embedded Controller [EC0] (gpe 25)?
So far, I think I'm managed to work out (from the ACPI spec and lots of googling):

  • EC0.BMF0, 3 // always == 2
  • EC0.BTY0, 1 // always == 1
  • EC0.BST0, 8 // Battery State Bitfield
  • EC0.BRC0, 16 // Remaining Current (mAh)
  • EC0.BSN0, 16 // Serial Number ???
  • EC0.BPV0, 16 // Present Voltage
  • EC0.BDV0, 16 // Design Voltage ???
  • EC0.BDC0, 16 // Design Capacity ???
  • EC0.BFC0, 16 // Last Full Capacity
  • EC0.GAU0, 8 // Battery Gauge = WTF?

But these may be wrong, and I don't know what Battery Gauge is.
Any helpful links, pointers or other help will be rewarded with a beer at GUADEC2007. :-)

Thanks.

More broken batteries

Okay, information requested. Can anybody with a Toshiba:

  • Satellite A100
  • Satellite A110
  • Tecra A7
  • Satellite Pro A100
  • Satellite Pro A110
  • Equium A100
  • Satellite M70
  • Satellite Pro M70
  • Equium M70
  • Satellite M50
  • Satellite Pro M50
  • Equium M50
  • Satellite M100
  • Equium 110
  • Tecra A6

Please send me a lshal please (richard_at_hughsie_dot_com) – with [fire] in the subject. There's another recall I'm trying to add to the bad-battery-database, but I need to know the battery vendor. NOTE: Your battery won't explode in this case, but it might stop working after a little while. Thanks.

My laptop is nearly dead…

My faithful development machine, a Toshiba A10 2.2GHz Celeron is nearly dead. The screen backlight keeps cutting out when you move the lid, the hinges are floppy, the maximum brightness is half what it used to be and the fan makes noises that it really shouldn't. Ohh, and the AC adapter plug is really broken too. Now, I've got to decide if I want to repair everything (probably about £200), or just buy a new laptop.
As I'm now back being a poor student, money is fairly tight. I've been looking at the Toshiba Satellite Pro A120 – which seems very similar to what I have already, but I've also been looking around: I've compiled a list of needs / would likes / don't wants:
Needs:

  • Less than 700 GBP (student)
  • WXGA screen
  • Open graphics chip (Intel?)
  • 15 inch screen
  • Wireless G networking
  • DVD reader
  • 40Gb hard drive
  • 512Mb RAM (I have existing SODIMMS)
  • Intel Pentium M or Duo.
  • 2 hours battery life

Would like:

  • WXGA+ Screen
  • SPDIF out
  • Brightness sensor
  • DVD-Writer
  • >3 hours battery life

Don't want:

  • DELL or Sony (nothing personal, just ACPI issues)
  • 64 bit anything
  • Gigabit ethernet
  • Lots of 3D performance (I don't do games)
  • Bluetooth
  • Biometric fingerprint security
  • Lots of special buttons that do clever things
  • Firewire
  • Modem
  • Software
  • Windows XP (although I'm probably going to get it “free”)

So anybody got any good ideas for a budget laptop that will have good Linux support for less than 700GBP? Also, if you are running Linux on a Toshiba Duo, please let me know. Thanks.