Matthew Garrett: Linux backlight control
Backlight control is one of those things that you'd think would be simple, but ha ha this is computing so of course it's an utter disaster and everything is a huge mess. There's three main classes of backlight control in the x86 world, all of which have drawbacks:- ACPI specifies a mechanism for backlight control, and the majority of modern machines implement it. It has the advantage that the brightness query interface is generally aware of anything else in the system which may have changed the brightness, so it's unlikely to get out of sync with reality if the platform tries to do something odd like change the backlight itself in response to an ambient light sensor or some other event. The main drawback is that there's typically a fairly small number of available backlight values, usually somewhere between 8 and 20.
- A platform-specific mechanism. This used to be more popular before the ACPI backlight interface took off, but some machines still require it. The idea here is that there's some sort of platform-specific way of requesting a backlight change, ranging from a vendor-specific ACPI method through to triggering system management calls by magic register writes. These methods usually (but not always) keep in sync with other firmware changes, but rarely provide any more brightness steps than the standard ACPI interface.
- Many mobile GPUs have backlight control registers built in. These usually give you a range of several thousand possible values, but using them will almost certainly leave you out of sync with reality if the firmware touches them at all. To make things worse, the firmware control of the backlight may occur after the gpu - so you could end up with two different controls that both need to be full in order to get maximum brightness. The worst case scenario is that the firmware gets confused by the values not being what it programmed and you end up with a hung machine.
Right now, if there's an ACPI backlight interface then that's usually the only thing we'll show you. We can do that because we can identify if there's an ACPI backlight interface when we parse the ACPI tables at the start of booting, and that information can be registered before we start setting up any other backlights. The problem comes when we have no ACPI backlight interface. We don't have any idea whether there's a platform mechanism until a platform driver loads, which could be at any time. As a result, we've been reluctant to expose GPU-level backlight control because doing so would often give you two separate backlight controls and no indication as to which should be used. Userspace doesn't really have a way to make that decision either, so everyone ends up unhappy.
This is especially problematic with some machines which provide no ACPI or known platform control (or, in the case of some Samsungs, only provide platform control if you have a special Linux BIOS that Samsung won't give you) but can control the backlight via the gpu. Right now you get nothing, because giving you something would potentially break other systems and the needs of the many etc. Sorry! But this is obviously problematic in the long term, especially because multi-GPU machines tend to have multiple ACPI backlight interfaces, so I've been working on a better approach.
When a backlight device is registered, it appears under /sys/class/backlight. If it's an ACPI device it has a symlink pointing to some random ACPI device. If it's a platform device it's pointing at something like "dell-laptop" which is approximately unhelpful when it comes to figuring out what it controls. If it's a GPU-level device then it probably points at the PCI device, which is helpful except in the case where you have multiple backlight controls on a single GPU. So, by and large, you have no good way to identify which backlight control is preferable unless you keep a huge list of all possible backlights along with some scoring.
The first thing I've added to improve this is a "type" attribute. This tells you whether a given backlight is firmware-level (like ACPI), platform-level (like the various laptop drivers) or performs raw register writes (like a GPU driver). That lets userspace decide which interface is preferable. It'll typically be the ACPI interface, because that's the most likely to keep synchronisation and so avoid bizarre brightness bugs. The next thing has been to start fixing up the parent links. There's nothing we can do for the platform level devices, but the ACPI drivers could at least point at PCI devices rather than into ACPI space. That means that multi-GPU systems can now identify which interface to use based on the currently active GPU. Finally, I've started pointing the GPU-level backlight controls at the specific output rather than merely at the PCI device. This probably makes little difference for laptops as such, but once we start exposing backlight control for monitors that support ddcci it'll make things much easier as we'll know which backlight control corresponds to which monitor.
I've then written a small library that accepts information about the output and picks the "best" backlight for the device. It's obviously based on a pile of heuristics and there's a couple of bits of API that I suspect need to be nailed down yet, but it means that this code only needs to be written once. It's then simple to glue this into X drivers, which means that they can expose a "Backlight" xrandr property on each relevant display. That means that backlight control is then handled at the session level with the X server acting as the privileged agent, which simplifies a bunch of things and means we can finally let hal die entirely. Long-term this means we'll have unified backlight control for all of your displays, which is a wonderful thing.
Summary: We kind of suck right now, but there's a reasonably clear path to getting better.
This took a bit of searching, so it's here for reference. I'm sure it'll catch out people who upgrade from Lenny to Squeeze as the initial presentation can be deeply mysterious and frustrating.
If you do care about having good samba packages in squeeze, you can
help.
If you're in a hurry and don't want to read the blah-blah, just skip
to the end of this story and read the last paragraph.
Thanks to the confidence of the release team, we (samba packagers)
have been "authorized" to upload samba 3.5.4 in unstable, thus
targeting having that version in squeeze.
Up to July, we were indeed targeting 3.4.8 for squeeze, on the
assumption that, as usual, samba upstream releases need some
maturation before being strong guarantee that no regression happens.
In July we were ready to move and finally upload in unstable the 3.5 packages we
kept in experimental until then. The final decision was to be taken
during DebConf10. It was roughly taken with Steve Langasek, but....I
couldn't upload immediately (most people know that working on major
packages during DebConf is a dream)...and had holidays afteer.
In the meantime, the freeze happened so we got theoretically
screwed...
Still, I could manage to convince the release team that long term
support for samba 3.5 will certainly be better than 3.4...and that
functionality in that version (particularly several Win7-related fixes
and a much improved code for printing support) and we got a notice
"please upload to unstable and come back to us in a few weeks".
That happened, finally.
So, now, we need YOU, samba users and admins, to test these
packages. Merging our packaging branches was hard (thanks, Steve
Langasek, for your help) and glitches are always possible. So, please
TEST these packages by installing samba, winbind, libsmbclient and
friends from unstable....and report bugs, preferrably the release
critical ones....
PS This post also gives me a chance to comment
on a so called
Sometimes remote accounts are only reachable with a series of ssh/su/sudo
commands. Using ProxyCommands in .ssh/config works for simple cases, but not
with several hops, or if passwords have to be entered.
The
Facebook is not very popular among free software hackers. When I announced my Facebook page on identi.ca (see 
Members of
My only regret is that the icons provided by Google are ugly squares, so I
did not want to use them. On the other hand, I did not found any icon set
that would have all the icons Google provides (around 20). So I felt back on
the
There was a feature missing in
A long time ago, when I was first introduced to email, I was using the
Mail program from Unix. I quickly converted to Elm, then Mutt, which
were both better in terms of interface. Then I found out about Gnus,
and I wouldn't dream of letting it go now. However, Gnus has started
showing its age several times, and several times have I needed to
upgrade the way I was using it: first because I needed to sort and
split email, then because I took the sorting out of Gnus and into
Procmail for more advanced filtering (including spam filtering), then
because I switched to storing the emails on an IMAP server so I could
read them remotely from several computers. My setup as of a few days
ago was functional, but since I have grown over time to splitting
emails into several hundred folders, checking for new messages was
becoming more and more boring.
So it's time to jump in with all the cool kids and switch to a modern
solution: still Gnus of course, but with Dovecot, OfflineIMAP for
synchronisation, and let's add email searches into the mix while we're
at it. My web searches didn't turn up a simple step-by-step HOWTO,
but I assembled bits from different places, and here's my attempt at
documenting my new setup.
Goals
5 weeks after the 0.7.2.2 "Lovegood" release, I am very happy to announce the major feature release, 0.8 codenamed "Godsend". Major feature highlights of this release are desktop notifications (with full support of actions, icons, updates, append and sound), messaging menu / indicators (as provided by Ubuntu's
Messaging Menu
Further on, Smuxi comes with the following improvements in its user interface:
It looks like quite popular thing on
... or, 'yellow pages.be'. Or something.
I like it that there is an on-line version of the Belgian yellow
pages. Who wants to look up a phone number in a huge book, anyway? And
that's ignoring the fact that it isn't any good for the environment.
I also like it that the yellow pages are now no longer distributed by
default on paper. You can still get them, if you so wish, but you have
to explicitly request them.
Of course, searching an on-line database is also faster than flipping
through pages until you find what you're looking for. What's more, you
can limit your search to your location rather than whatever
shops just happen to be in the version of the book that is distributed
to your house. That makes it much more efficient, since rather than all
thousands of computer shops in the whole province, you'll find the
computer shops in your municipality. Or the ones that are in a radius
around your address, if you choose that option.
Rather, that would be the case. But for some
unfathomable
Italian