DebuggingHal

Debugging Central

This page is part of the debugging series — pages with debugging details for a variety of Ubuntu packages.

Introduction

Bugs relating to hal typically fall into the following categories:

  1. Hardware detected by the kernel is not or wrongly represented in the hal database and thus desktops act wrongly on them.
  2. hald crashes at startup and thus is not running at all. GNOME complains about "Failed to initialize HAL".

  3. Automounting of removable drives, or mounting of internal hard drive partitions does not work. This might be a bug in hal, or gnome-volume-manager, or gnome-mount. See DebuggingRemovableDevices for details.

  4. Failure to handle the laptop's brightness keys (Fn+something)

How to file

When filing a bug against hal, please restart your machine to get a clean and fresh state. Then do the following in a Terminal to start hal in the foreground with debugging output:

  •  sudo /etc/init.d/hal stop
    sudo hald --verbose=yes --daemon=no 2>&1 | tee /tmp/hal.log

A lot of messages will scroll by, and after some seconds (might take longer) the output eventually settles down.

Now reproduce the situation that shows the problem, e. g. insert the USB stick that does not automount, press Fn+Fx to alter the screen brightness, or just watch it crashing (you'll get back to the terminal prompt). Now open a second Terminal window, and do

  •  lshal > /tmp/lshal.txt

Go back to the first terminal, press Control-C now to stop the foreground debugging-mode hal and do

  •  sudo /etc/init.d/hal start

to restore the normal background process.

Then add the following information to the bug report:

  • Describe the actions you did to demonstrate the problem. E. g. "I pressed Fn+Cursor up on my Dell Latitude D430 to raise the screen brightness" or "I inserted an USB stick".
  • Attach /var/log/kern.log

  • Attach /tmp/hal.log

  • Attach /tmp/lshal.txt

Debugging procedure

To be written.

In depth debugging procedures for this particular package or subsystem. This usually is information about the log files to gather and what to look for in them.

How to Triage

Music players

A very common special case of "improperly represented hardware" are USB music players which just appear as a normal hard disk. For those we need information about the vendor/product ID and the exact name (can usually be seen in lsusb and/or /var/log/kern.log and a description of the device's capabilities like supported formats (mp3/ogg), recording ability, etc. This information needs to be turned into a proper hal .fdi file snippet and integrated into /usr/share/hal/fdi/information/10freedesktop/10-usb-music-players.fdi.

These reports should be assigned to hal-info.

Bugs which belong to other packages

The following problems are commonly filed against hal, but belong to other packages:

  1. suspend/resume failures: Those are usually kernel or pm-utils bugs.

  2. Wifi problems: If the device is detected and visible in iwconfig, then it's usually a NetworkManager bug. If it is not even detected, then it is a kernel problem.

  3. Sound problems: If the problem is crackling, it should be assigned to alsa-lib. Otherwise sound bugs belong on one of the linux- packages. Also see DebuggingSoundProblems.

Stock Reply

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it, because your description didn't include enough information.

Please follow the "How to file" procedure described at https://wiki.ubuntu.com/DebuggingHal and attach the requested files here.

How to Forward

The official upstream bug tracker for hal is on Freedesktop: https://bugs.freedesktop.org/buglist.cgi?product=hal

However, it is (unfortunately) much more fruitful to forward problems to the HAL mailing list.

Known bugs

Description of known bug reports that may receive duplicates and how to recognise them. This information should be obtained by looking for bugs tagged as 'metabug'.

Open

Bug

Subject

Symptom

https://launchpad.net/bugs/25931

Failed to initialize HAL

90% of those are due to wrong dbus/hal RC startup link priorities.

Non-bugs

  • Some times, USB hard disks without a dedicated power adapter are not properly recognized or automounted because the USB port does not provide enough power. This should appear in dmesg as USB port resets, or unusually long detection duration. It is worth trying the device on a powered hub, or remove it from an unpowered hub and directly attach it to the computer's USB port without any other device besides it.


CategoryBugSquad CategoryDebugging

DebuggingHal (last edited 2008-08-06 17:01:23 by localhost)