need help with hald on MacOS

Cuga cuga at jonive.com
Sun May 15 17:43:25 PDT 2011


I need help debugging a problem with hald!

I'm building an X11 window manager under XQuartz/MacOS 10.6.7. I'm not using Fink or Macports. I'm installing everything in POSIX-compliant locations (/usr/local).

Dbus-1.5.0 and hal-0.5.11 both compile and install fine, but I can't get hald to run. It throws messages and quits.

The X11 wm I'm using requires dbus-session, and optionally uses dbus-system and hal for hardware-specific modules. Dbus is running properly. The X11 wm is successfully connecting to dbus-session which is being launched by launchd. 

I can launch dbus-daemon --system, either by hand at the terminal, or with launchd. I get the same results either way. The pid and socket files are created as expected and the daemon runs in the background without error. However hald does not start up properly after this. The hald man page suggests starting hald by hand in verbose mode, which I have tried, with results shown below. hald quits and gives me some messages I don't understand. I've tried re-compiling both dbus and hald with different config options, but I get the same results, so I'm stumped.

I noticed the directory /usr/local/etc/hal/ contains the expected directories, but they are all empty. The build directory had many fdi files that didn't seem to install. Not sure if that's normal or a source of the problem.

Here are is some system information:

$ ps aux | grep dbus
david   143   0.0  0.0  2447012    760   ??  S     6:56PM   0:00.00 /usr/local/bin/dbus-daemon --nofork --session
messagebus    48   0.0  0.0  2435548    728   ??  Ss    6:55PM   0:00.01 /usr/local/bin/dbus-daemon --nofork --system

$ env | grep DBUS
DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/launch-9irO8p/unix_domain_listener

$ ls -al /tmp/launch-9irO8p/unix_domain_listener
srwx------  1 david  wheel  0 May 13 18:56 /tmp/launch-9irO8p/unix_domain_listener

$ ls -al /var/run/dbus*
-rw-r--r--  1 root  daemon  3 May 13 18:56 /var/run/dbus_pid
srwxrwxrwx  1 root  daemon  0 May 13 18:56 /var/run/dbus_system_bus_socket

$ ls -al /var/cache | grep hald
drwxr-xr-x   2 haldaemon  haldaemon   68 May 14 11:05 hald

$ /usr/local/sbin/hald --daemon=no --verbose=yes
16:57:42.030 [I] hald.c:669: hal 0.5.11
16:57:42.031 [I] hald.c:734: Will not daemonize
16:57:42.031 [I] hald_dbus.c:5381: local server is listening at unix:path=/tmp/dbus-QcRvOECZN8,guid=f638aeb56c645e37d6dbc6164dd06876
16:57:42.074 [I] hald_runner.c:301: Runner has pid 404
Runner started - allowed paths are '/usr/local/libexec:/usr/local/lib/hal/scripts:/usr/local/bin'
16:57:42.087 [I] hald_runner.c:182: runner connection is 0x101000670
16:57:42.089 [D] util_helper.c:124: drop_privileges: could not set group id
[ note: then it quits and gives me the shell prompt ]

$ sudo /usr/local/sbin/hald --daemon=no --verbose=yes
19:08:08.339 [I] hald.c:669: hal 0.5.11
19:08:08.339 [I] hald.c:734: Will not daemonize
19:08:08.339 [I] hald_dbus.c:5381: local server is listening at unix:path=/tmp/dbus-h4OzVqCnRk,guid=a2f53e5960b12f13b8a3625b4dcde408
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
19:08:08.343 [E] hald_dbus.c:5747: dbus_bus_get(): Not enough memory
[ note: then it quits and gives me the shell prompt ]
[ note: org.freedesktop.dbus-session.plist is indeed loaded and DBUS_LAUNCHD_SESSION_BUS_SOCKET is set as shown above! ]

dbus configured with:
./configure --disable-static --with-dbus-user=messagebus --enable-console-owner-file --disable-asserts --disable-tests --enable-checks --enable-kqueue --enable-launchd --disable-userdb-cache --disable-ansi --with-xml=expat --disable-xml-docs --disable-doxygen-docs --disable-dependency-tracking --without-x ac_cv_func_poll=no --with-system-pid-file=/var/run/dbus_pid --with-system-socket=/var/run/dbus_system_bus_socket --with-session-socket-dir=/tmp --enable-verbose-mode --localstatedir=/var

hal configured with:
./configure --with-hal-user=haldaemon --with-hal-group=haldaemon --disable-pci-ids --disable-usb-ids --disable-pnp-ids --disable-pmu --disable-policy-kit --disable-console-kit --disable-dependency-tracking --disable-static --with-socket-dir=/tmp --with-localstatedir=/var --with-macbookpro --with-cpufreq

Let me know if any other system info would be useful.

Thanks in advance,
Dave




More information about the hal mailing list