# Problem with hald and dbus

## Iced-Tux

Hello @all...

After a crash of my Gentoo-Powered notebook, the services hald and dbus seem to be defect.

Normaly when I plug in e.g an USB-stick gnome would mount it and show me some nice icon on the desktop.

The USB-stick appears in dmesg

```
usb 1-1: USB disconnect, address 2

usb 1-1: new high speed USB device using ehci_hcd and address 5

scsi1 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 5

usb-storage: waiting for device to settle before scanning

  Vendor:           Model: USB DRIVE         Rev: 1.13

  Type:   Direct-Access                      ANSI SCSI revision: 00

SCSI device sdb: 1014784 512-byte hdwr sectors (520 MB)

sdb: assuming Write Enabled

sdb: assuming drive cache: write through

SCSI device sdb: 1014784 512-byte hdwr sectors (520 MB)

sdb: assuming Write Enabled

sdb: assuming drive cache: write through

 sdb: sdb1

Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0

usb-storage: device scan complete

```

But when I start the gnome-volume-manager I get this:

```
(gnome-volume-manager:7423): GnomeUI-WARNING **: While connecting to session manager:

Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.

libhal.c 644 : Error connecting to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: Datei oder Verzeichnis nicht gefunden

** (gnome-volume-manager:7423): WARNING **: manager.c/915: failed to initialize HAL!

```

I have reemerged hal and dbus, but no success. The services can also not properly shutted down.... 

So has anybody any ideas?

BTW: If I manually mount the USB-stick everything is fine. Its just the automatic thing that bothers me.

iced-tux

----------

## keyson

Hi.

You may have some stalled files.

Check if dbus and hald is running.

```
ps xau |grep hald

ps xau |grep dbus

```

If you se them running, then come back but if you

don´t have the hald running do

```
/etc/init.d/hald zap

/etc/init.d/hald start

```

The same goes for dbus. When you did a upgrade it changed the

config. And somethimes it 'hang' the program. And it could not be

shutdown and then the run file in /var/lib/init.d/started/ is left

and it tells the startup script that it is running.

----------

## Iced-Tux

Hi 

so here is my output from what you suggested.

```
-(root@iced-tux:3)-(94 files:283K@christian)-(0 jobs)-(15:29)-

-(/home/christian:#)-> ps aux | grep hald

root      2361  0.0  0.0   1864   720 pts/3    S+   15:31   0:00 grep hald

-(root@iced-tux:3)-(94 files:283K@christian)-(0 jobs)-(15:31)-

-(/home/christian:#)-> ps aux | grep dbus

101      11457  0.0  0.1   3508  1428 ?        Ss   11:35   0:00 /usr/bin/dbus-daemon-1 --system

1000     13669  0.0  0.0   2508   736 ?        S    11:37   0:00 /usr/bin/dbus-launch --sh-syntax --exit-with-session

1000     13670  0.0  0.1   3392  1252 ?        Ss   11:37   0:00 dbus-daemon-1 --fork --print-pid 8 --print-address 6 --session

root      2373  0.0  0.0   1864   708 pts/3    R+   15:31   0:00 grep dbus

```

As you can see just dbus is running, when I try to start hald:

```

 * Starting D-BUS system messagebus ...

/usr/bin/dbus-daemon-1 already running.                                   [ !! ] * ERROR:  Problem starting needed services.

 *         "hald" was not started.
```

so what now??

----------

## keyson

Hi.

Stop the dbus by

```
/etc/init.d/dbus stop
```

Beqause the error that dbus gives stops hald from starting as it seems.

check that both are stop't

```
/etc/init.d/hald status

/etc/init.d/dbus status
```

If one is indicating started. Check if it is running by

```
ps aux
```

If it indicate started but is not found with ps xau do a zap like

```

/etc/init.d/dbus zap

```

(This reset the files for dbus)

Now try to start hald.

----------

## Iced-Tux

First of all, THANX for your time and patience  :Wink: 

So now back to business:

```

-(root@iced-tux:2)-(94 files:311K@christian)-(0 jobs)-(18:16)-

-(/home/christian:#)-> /etc/init.d/dbus stop

 * Stopping Hardware Abstraction Layer daemon ...                         [ !! ] * ERROR:  problems stopping dependent services.

 *         "dbus" is still up.

```

What I did was the following, I zapped both services, kiled any process smelling like hald or dbus, checked their status, removed the pid file in /var/run/.

Still no success. I start hald and everything seems ok, but

1)no pid file for halt

2)when I try to stop ... you read the message

Still the gnome-volume-manger gives me the HAL not started failure.  :Sad: (

----------

## keyson

Ok.

It seems that it is hald that make the trouble.

As you tryed to reemerge the package i can't give you

any new clue.

Maybe check the forum for how to debug the hald.

check the log for any info about the failur.

If somethings come up, i let you know.

----------

## Merlin-TC

I think I have the same problem and the reason why hald is not starting is because of a dbus problem I think.

Dbus creates two sockets (you can see it in configure when you compile it) but somehow they are not created for me.

They should be in /var/run/dbus/system_bus_socket and in  /var/lib/dbus/system_bus_socket .

I reemerged dbus a million of times but it just isn't created.

Any clues on how to fix that?

It's keeping me from communicating with Skype via dbus.

----------

## Merlin-TC

Well, I fixed the problem in creating a symlink:

```

ln -sf /var/lib/dbus/system_bus_socket /var/run/dbus/system_bus_socket

```

Another strange thing is that I had to create the directory /var/lib/dbus/ as the socket was not created when the directory was not there.

----------

## Iced-Tux

Now everything works like a charm since I updated my Gnome. Strange though  :Very Happy: 

Thanx for your support.

----------

## Terz

Probhably you did an etc-update or cfg-update or whatever.

I had the same problem, creating a symlink also solved it for me. But this felt somehow wrong, so I took a closer look and finally I found out, that there was a new /etc/dbus-1/system.conf file. So I updated the file, removed the symlink and everything was fine.

# diff /etc/dbus-1/._old-cfg_system.conf /etc/dbus-1/system.conf

33c33

<   <listen>unix:path=/var/run/dbus/system_bus_socket</listen>

---

>   <listen>unix:path=/var/lib/dbus/system_bus_socket</listen>

----------

## Iced-Tux

Yes I merged a lot of config files with etc-update.

Probably there was a config for hal. But I really can't remember.

Now working though  :Smile: 

----------

