misc TODOs for HAL

David Zeuthen david at fubar.dk
Fri Dec 31 06:48:08 PST 2004

On Thu, 2004-12-23 at 23:44 +0000, Bastien Nocera wrote:
> Heya,


sorry for the lag,

> I have a couple of ideas for things to do in hal, and wanted a bit of
> guidance on some items.
> Bluetooth:
> - adding support for bluetooth (bluetooth_class_device a-la
> net_class_device) (that I think I can figure out)

Yeah, this should be straightforward assuming you only care about the
HCI of course?

> - adding a callout to start the "bluetooth" service when a bluetooth
> device is started (at which level should this be added)

OK, makes sense - might require some tweaking of hcid to not require a
configuration file? 

Btw, I'm not really sure how to tackle BT from a end user point of view
- it's my understanding the desktop pieces are still missing a bit? (I
could be wrong, I'm just always experiencing having to use the shell
everytime I want to use my Bluetooth mouse)

> Brightness controls:
> Plenty of different ways to do this depending on the machines/laptops
> (pmu for PowerMacs, sonypi for VAIOs, etc.). As the screen doesn't show
> up in HAL, just where should I add this in the HAL device tree?
> I'd really like to get rid of the special-case code that's in the
> gnome-settings-daemon to do this properly where it belongs (in HAL)

Yep, it makes sense to have a unified interface where it's easy for open
source projects and even ISV's to plug in to; see this mail for details


this is a bit up in the air right now [1] as I'm right now working on
some of the new architecture items mentioned in the mail above. I'll
post about that next week when I return home.

[1] : mostly trying to figure out how to provide method-calls like
SetBrightness() in a secure way, e.g. only allow this or that GNOME or
KDE program to invoke those methods, not necessarily any random program
running in the desktop session of an authorized user at the console. It
looks like this will require SELinux to do in a secure way; I could be
wrong though.

> Disabling/enabling wireless devices:
> Again, this is different depending on the type of wireless card in the
> machine. The ipw2200 driver for example allows this by changing a sysfs
> entry (setting /sys/module/ipw2200/disable to 1).
> How do I make this available via HAL without adding too much special
> casing in the code?

I assume this is either to save battery power or comply with the FCC's
of the world? 

One of the things I want hal to do, longterm, is to control the binding
of drivers to devices as well as controlling power status - I'm not
exactly sure how this is going to work on the kernel side; it seems that
people are indeed working on it, but are not there yet


But, given kernel support, I'm pretty sure we can offer a very generic
interface org.freedesktop.Hal.Device.Power with Suspend()/Resume()
methods. Things like NetworkManager can then use that in the UI for e.g.
disabling radios when in an airplane or when connected through a wired
connection and running on batteries.


hal mailing list
hal at lists.freedesktop.org

More information about the Hal mailing list