service/hal needs restart after hardware change
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.
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
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.