[rant] the HAL

kamikaze

Well-Known Member

Reaction score: 76
Messages: 365

Today's rant is about HAL (hardware abstraction layer). Something that probably burns under the fingernails of many people.

In my understanding an abstraction layer is added to make the overlying layer transparently support different underlying layers. So in my understanding the purpose of using HAL in X is to make X speak with HAL and HAL translates whatever X wants to the underlying platform (Linux, *BSD, Solaris, Darwin and so forth).

However this is not what HAL does. HAL really just works on Linux. And to make HAL support FreeBSD was a FreeBSD project (wasn't that a gsoc, or something the gnome guys did?). The thing is HAL works a little bit, now. But this is like an alpha stage, something just at the beginning of development nothing to rely on.

E.g. HAL does strange things in the cam layer of my system that cause an instant panic. So as soon as I start HAL with a USB storage device attached or if I attach a USB storage device while HAL is running, my system instantly panics.

On a Linux system (someone demonstrated this to me, yesterday) when you plug in a keyboard with a German keyboard layout, HAL will recognize that and X will actually automatically use German keyboard settings. I've seen instructions go around that hardcode <insert language/country of choice here> into the HAL XML configuration. Well, this is not the way things are supposed to be working.

Since providing an abstraction layer is not what the HAL people do or appear to be trying to do, what is it that they want to achieve?

And why does the Xorg project use an obsolete layer? They could just directly assume everything was Linux and it would just be as FreeBSD compatible as using HAL makes it.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,191
Messages: 37,329

kamikaze said:
E.g. HAL does strange things in the cam layer of my system that cause an instant panic. So as soon as I start HAL with a USB storage device attached or if I attach a USB storage device while HAL is running, my system instantly panics.
Odd.. I've been running HAL for quite some time (ever since GNOME started to depend on it). Never had any problems with USB sticks or USB harddrives (and I use them quite a lot).


And why does the Xorg project use an obsolete layer? They could just directly assume everything was Linux and it would just be as FreeBSD compatible as using HAL makes it.
No it won't.
 
OP
kamikaze

kamikaze

Well-Known Member

Reaction score: 76
Messages: 365

You're right, it would be more FreeBSD-compatible.

BTW, haldaemon doesn't even have the access rights to mess with these devices on my system. How does it cause a panic by messing with devices it cannot even access?

You've been using hald for a while and it works fine for you. But you've seen all those Xorg threads popping up lately. Most of these are actually HAL *beep**beep**beep**beep*s up my system threads.
 

artificer

New Member

Reaction score: 9
Messages: 19

Yes, it seems HAL was written with Linux in mind only. It also seems that everything is moving towards the "HAL way", especially with the latest X.org defaulting to HAL for almost everything.

Fortunately, people like Joe Markus Clarke and others are making huge steps in porting the HAL mess to FreeBSD. It seems the hardest part is already done, and that HAL needs a period of cruel bug squashing now. Let's hope that 8.0 will provide a seamless HAL desktop experience. :)
 

oliverh

Aspiring Daemon

Reaction score: 38
Messages: 557

>HAL really just works on Linux.

To be more precise: most of the time.
 

ksym

Member

Reaction score: 3
Messages: 29

Sad but true.

Not much use for hal in FreeBSD. As for me it is a nuisance since many gui-applications seem to depend on it. And today (yet again) hal was broken and I had to fix it with a quick and dirty additude. Not very nice ...
 

graudeejs

Son of Beastie

Reaction score: 705
Messages: 4,617

ye, i'm not updating my progs .... because of that **** soft
[I wonder if Microsoft is developing it (j/k), but seriously, it makes me sick]
 

ksym

Member

Reaction score: 3
Messages: 29

And the quick fix

http://koti.kapsi.fi/~isoa/files/freebsd

Here is the quick fix for hal-0.5.11_18 ... it didn't compile on my machine, since a function proto was missing. Maybe this is already fixed but posting here already. I take no responsibility for this fix, but hope it helps.
 
OP
kamikaze

kamikaze

Well-Known Member

Reaction score: 76
Messages: 365

Did anyone ever wonder how HAL accesses devices it doesn't have the permissions to access? I sure do.
 

ksym

Member

Reaction score: 3
Messages: 29

Yep ...

kamikaze said:
Did anyone ever wonder how HAL accesses devices it doesn't have the permissions to access? I sure do.

One of the reasons why i'd like to do without Hal. Makes me a bit nervous. But, like I said, a lot of gui software force it as a dependency. Of course, one does not need to run the daemon, but still ..

The world is not a perfect place, and integrating software which has Linux-stuff on it is hard. Let us wait and see if the future Hal versions are without these problems.

Meanwhile, I'll cross my fingers.
 

vermaden

Son of Beastie

Reaction score: 1,607
Messages: 3,007

ksym said:
The world is not a perfect place, and integrating software which has Linux-stuff on it is hard. Let us wait and see if the future Hal versions are without these problems.

Future versions you say, it reminds me of PulseAudio shit, total rewrite/something totally new that does not work, works in wrong *space (userspace instead of kernelspace) and creates more problems then it solves, I think that would also hal replacement look like.
 
OP
kamikaze

kamikaze

Well-Known Member

Reaction score: 76
Messages: 365

Maybe the best solution would be a HAL compatible devd wrapper. After all, devd has a listener model which is obviously superior to a polling daemon, both in reliability and the need of system resources.
 

vermaden

Son of Beastie

Reaction score: 1,607
Messages: 3,007

kamikaze said:
Maybe the best solution would be a HAL compatible devd wrapper. After all, devd has a listener model which is obviously superior to a polling daemon, both in reliability and the need of system resources.

Very nice idea.
 
OP
kamikaze

kamikaze

Well-Known Member

Reaction score: 76
Messages: 365

Actually it's an obvious idea. Very nice would be someone who does it. I'd love to, but my project schedule is already overflowing. I'm working on binary package upgrades, some cooperation with kports, the ioq3 1.36 port...

And then there are a couple of other things I've put on hold and of course I've still got my studies.

So much to do, so few people to do it. I bet Microsoft has more employees then there are OS developers. It's a miracle what we achieve, many of us only in their spare time.
 
Top