Project

General

Profile

Actions

Bug #14226

open

service/hal needs restart after hardware change

Added by David Stes 6 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:

Description

Hi,

This issue was originally reported by Gary Mills but I just log it here for further reference.

On my OpenIndiana system running OI 2021.10

$pkg list osnet-incorporation dbus hal
NAME (PUBLISHER) VERSION IFO
consolidation/osnet/osnet-incorporation 0.5.11-2020.0.1.20768 i--
service/hal 0.5.11-2020.0.1.20768 i--
system/library/dbus 1.12.20-2020.0.1.1 i--

This is OI 2021.10

$ cat /etc/release
OpenIndiana Hipster 2021.10 (powered by illumos)
OpenIndiana Project, part of The Illumos Foundation (C) 2010-2021
Use is subject to license terms.
Assembled 30 October 2021

After changing some hardware such as adding a USB webcam, audio card, card reader, keyboard or mouse or USB storage, the command "lshal" which lists the hal hardware, does not show the new hardware.

When issuing

svcadm restart hal

it works for me: the new hardware is in the output of the command "lshal".

There has been work on this by Gary Mills to show via "dtrace" that hal is actually getting a request to update the database via 'dbus' but it is unclear to me whether this is a dbus error or both hal and dbus or dbus-daemon issue.

The workaround that works for me is to use the command : svcadm restart hal

or also:

svcadm disable hal
svcadm enable hal

Because the restart_on attribute of the dependents like rmvolmgr and lightdm is set to "none" , I think that restarting hal does not force a restart / kill of lightdm desktop or rmvolmgr.


Related issues

Related to OpenIndiana Distribution - Bug #13711: USB Flash Drive does not automount correctlyNew

Actions
Related to OpenIndiana Distribution - Bug #14216: Problem with USB New

Actions
Related to OpenIndiana Distribution - Bug #13858: x11 hot plug keyboard does not workNewOI Userland

Actions
Related to illumos gate - Bug #14227: USB automount failure implicates haldNew

Actions
Related to OpenIndiana Distribution - Bug #14615: glib2 2.70.0 (0.0.1) is actually glib2 2.62.6Rejected

Actions
Actions #1

Updated by David Stes 6 months ago

  • Related to Bug #13711: USB Flash Drive does not automount correctly added
Actions #2

Updated by David Stes 6 months ago

Actions #3

Updated by David Stes 6 months ago

  • Related to Bug #13858: x11 hot plug keyboard does not work added
Actions #4

Updated by David Stes 6 months ago

  • Related to Bug #14227: USB automount failure implicates hald added
Actions #5

Updated by David Stes about 2 months ago

The restart of HAL is not required for me under OpenIndiana with USB storage on a Dell Precision 3640 with USB 3.1 xhci driver and using the following new glib2 package:

$ pkg info glib2
Name: library/glib2
Summary: GNOME core libraries
Category: Desktop (GNOME)/Libraries
Version: 2.66.8
Branch: 2022.0.0.1
Packaging Date: March 18, 2022 at 12:07:09 PM
Source URL: https://download.gnome.org/sources/glib/2.62/glib-2.62.6.tar.xz

Note that 2.66.8 revision 1 is actually glib-2.62.6.

Given the complexity of the issue, it is unclear to me whether the HAL version and DBUS version is also relevant.

The test (where usb did not require a HAL restart and HAL picked up usb changes) was using

service/hal 0.5.11-2022.0.0.21013 i--
system/library/dbus 1.12.20-2020.0.1.1 i--
system/library/dbus/dbus-x11 1.12.20-2020.0.1.1 i--
system/library/libdbus 1.12.20-2020.0.1.1 i--
system/library/libdbus-glib 0.112-2022.0.0.0 i--

Actions #6

Updated by David Stes about 2 months ago

Unfortunately the "hal" daemon is again not seeing the hardware change when a USB drive is attached with the following new setup:

  1. pkg list hal dbus libdbus-glib media-volume-manager glib2
    NAME (PUBLISHER) VERSION IFO
    library/glib2 2.70.0-2022.0.0.0 i--
    service/hal 0.5.11-2022.0.0.21024 i--
    service/storage/media-volume-manager 0.5.11-2022.0.0.21024 i--
    system/library/dbus 1.12.20-2020.0.1.1 i--
    system/library/libdbus-glib 0.112-2022.0.0.0 i--

the old solution of restarting hal helps :

  1. svcadm disable hal
  2. svcadm disable rmvolmgr
  3. svcadm enable hal
  4. sleep 30; svcs hal
  5. svcadm enable rmvolmgr

the sleep 30 is because it seems to take a while now for hal to restart but eventually svcs hal reports it is online again.
The sleep is to avoid enabling rmvolmgr while hal is still in offline* state.

Actions #7

Updated by David Stes about 2 months ago

Also see Debugging issues with eject and hal in the documention
[[
http://docs.openindiana.org/handbook/community/quikstor/]]

and the link there to the documentation
[[
https://iks.cs.ovgu.de/~elkner/s11/rmmount.html
]]

Actions #8

Updated by David Stes about 2 months ago

It is useful to debug this issue with the command:

dbus-monitor --session

Currently it works for me succesfully with the following packages:

  1. pkg list media-volume-manager hal glib2 dbus
    NAME (PUBLISHER) VERSION IFO
    library/glib2 2.70.0-2022.0.0.1 i--
    service/hal 0.5.11-2022.0.0.21026 i--
    service/storage/media-volume-manager 0.5.11-2022.0.0.21026 i--
    system/library/dbus 1.12.20-2020.0.1.1 i--
  1. pkg contents -t depend media-volume-manager
    TYPE FMRI
    require pkg:
    require pkg:
    require pkg:
    require pkg:
    require pkg:
    require pkg:
    require pkg:
    require pkg:
    require pkg:
    require consolidation/osnet/osnet-incorporation

The above combination works and HAL receives an update of the USB hardware change.

Actions #9

Updated by David Stes about 2 months ago

The above packages claim to use glib2 2.70 but those are built from 2.62

pkg:,5.11-2022.0.0.1:20220331T113620Z

built from https://download.gnome.org/sources/glib/2.62/glib-2.62.6.tar.xz

‚Äč

Actions #10

Updated by David Stes about 2 months ago

  • Related to Bug #14615: glib2 2.70.0 (0.0.1) is actually glib2 2.62.6 added
Actions #11

Updated by David Stes about 2 months ago

with glib2 2.62 (installed as 2.70 . 0.0.2) on my OpenIndiana system, if I insert a USB device and monitor it with :

$ dbus-monitor --session --profile | grep RemoteVolumeMonitor

I see events on the dbus-monitor output like :

1.  DriveConnected
2. DriveChanged
3. VolumeAdded
4. VolumeMount
5. VolumeChanged
6. MountAdded

For the versions of OpenIndiana that have glib2 > 2.62 it is not known whether dbus-monitor shows the same events and HAL is not updated.

Actions

Also available in: Atom PDF