Kodi Community Forum

Full Version: HAL error in the log mounting DVD drive
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I was just reviewing XBMC log trying to resolve some minor glitch and saw a HAL error mounting DVD drive:

Quote:13:53:20 T:3051190112 M:3282100224 INFO: HAL: Starting initializing
13:53:20 T:3051190112 M:3282100224 DEBUG: HAL: Clearing old global device list
, if any
13:53:20 T:3051190112 M:3282100224 NOTICE: HAL: Generating global device list
13:53:20 T:3051190112 M:3281793024 DEBUG: HAL: Added - cdrom | FileSystem iso9
660 | HotPlugged NO | Type 2 |Approved YES
13:53:20 T:3051190112 M:3281793024 NOTICE: HAL: Trying to mount Vlad movies
13:53:20 T:3051190112 M:3281690624 NOTICE: HAL: Mounting /org/freedesktop/Hal/d
evices/volume_label_Vlad_movies (FileSystem iso9660 | HotPlugged NO | Type 2 |A
pproved YES ) at Vlad movies
13:53:20 T:3051190112 M:3281690624 ERROR: DBus: org.freedesktop.DBus.Error.Acc
essDenied - A security policy in place prevents this sender from sending this me
ssage to this recipient, see message bus configuration file (rejected message ha
d interface "org.freedesktop.Hal.Device.Volume" member "Mount" error name "(unse
t)" destination "org.freedesktop.Hal")

13:53:20 T:3051190112 M:3281690624 NOTICE: LFS: Added - cdrom | Vlad movies
13:53:20 T:3051190112 M:3281178624 DEBUG: HAL: Added - disk | UUID 539b83d9-2b
3f-4ffe-9bf9-89a766b3b975 | FileSystem ext3 | Mounted on /mnt/beta/ | HotPlugged
NO | Type 1 |Approved YES
13:53:20 T:3051190112 M:3281178624 NOTICE: LFS: Added - disk | Volume (ext3)
13:53:20 T:3051190112 M:3281076224 DEBUG: HAL: Added - disk | HotPlugged NO |
Type 1 |Approved NO
13:53:20 T:3051190112 M:3280666624 NOTICE: LFS: Updated - disk | Volume
13:53:20 T:3051190112 M:3280666624 DEBUG: HAL: Added - disk | UUID fa41805d-c0
0c-405f-8ae6-7d039048ed5b | FileSystem ext3 | Mounted on /mnt/alpha/ | HotPlugge
d NO | Type 1 |Approved YES
13:53:20 T:3051190112 M:3280666624 NOTICE: LFS: Added - disk | Volume (ext3)
13:53:20 T:3051190112 M:3280666624 DEBUG: HAL: Added - disk | UUID ac6c118d-23
03-40ac-af84-3e1e39a9540a | FileSystem ext3 | Mounted on /home/ | HotPlugged NO
| Type 1 |Approved YES
13:53:20 T:3051190112 M:3280666624 NOTICE: LFS: Added - disk | Volume (ext3)
13:53:20 T:3051190112 M:3280666624 DEBUG: HAL: Added - disk | UUID 05fd75f4-da
bc-436f-a8fe-aa0452970100 | FileSystem ext3 | Mounted on / | HotPlugged NO | Ty
pe 1 |Approved NO
13:53:20 T:3051190112 M:3280666624 NOTICE: LFS: Added - disk | Volume (ext3)
13:53:20 T:3051190112 M:3280666624 DEBUG: HAL: Added - disk | UUID 0d5de629-f3
aa-4898-9b86-230c7c33fc7e | FileSystem ext3 | Mounted on /boot/ | HotPlugged NO
| Type 1 |Approved YES
13:53:20 T:3051190112 M:3280666624 NOTICE: LFS: Added - disk | Volume (ext3)
13:53:20 T:3051190112 M:3280666624 DEBUG: HAL: Added - disk | UUID d5bd12e7-0c
61-47a5-86bc-87f2b327463f | FileSystem swap | HotPlugged NO | Type 1 |Approved
NO
13:53:20 T:3051190112 M:3280666624 NOTICE: LFS: Added - disk | Volume (swap)
13:53:20 T:3051190112 M:3280666624 DEBUG: HAL: Added - disk | HotPlugged NO |
Type 1 |Approved NO
13:53:20 T:3051190112 M:3280666624 NOTICE: LFS: Updated - disk | Volume
13:53:20 T:3051190112 M:3280666624 DEBUG: HAL: Added - disk | UUID DE10F5F410F
5D40D | FileSystem ntfs | HotPlugged NO | Type 1 |Approved YES
13:53:20 T:3051190112 M:3280666624 NOTICE: LFS: Added - disk | Volume (ntfs)
13:53:20 T:3051190112 M:3280666624 INFO: HAL: Generated global device list, f
ound 106
13:53:20 T:3051190112 M:3280666624 INFO: HAL: Sucessfully initialized

I can still play DVD files, so there are no obvious adverse effects from what I can tell, though it might be blocking some functionality I'm not aware off. I guess it's a matter of some privileges, but can't quite put my finger on it. Below are some details:

SVN build: 19387
OS: Ubuntu 8.04.2
/etc/group: 'xbmc' user (under which XBMC is started) IS in the 'cdrom' group

Tried to search the forums, but couldn't dig anything on the topic... Any hints would be highly appreciated!
For the record, the problem was in DBus settings. To remove the error (completely), one need to do two things:

1) modify /etc/dbus-1/system.d/hal.conf file:
at the end of the file there should be a section
<policy user="0">

replace '0' with the user you are starting XBMC from.

Explanation: you need to allow 'org.freedesktop.Hal.Device.Volume' interface for the XBMC user. Below is the full sniplet of the section (not sure if you really need to enable other interfaces or whether enabling them would consistitute a security breach):

Quote: <!-- You can change this to a more suitable user, or make per-group -->
<policy user="xbmc">
<allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
<allow send_interface="org.freedesktop.Hal.Device.VideoAdapterPM"/>
<allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
<allow send_interface="org.freedesktop.Hal.Device.Volume"/>
<allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
</policy>

2) Edit /etc/PolicyKit/PolicyKit.conf file.
Include XBMC user in the 'allow all' group (together with the root):

Quote:<config version="0.1">
<match user="root|xbmc">
<return result="yes"/>
</match>
<define_admin_auth group="admin"/>
</config>

Alternatively, you can do in on a more granular level - you only need to allow 'mount-removable' action:

Quote:<config version="0.1">
<match user="root">
<return result="yes"/>
</match>
<match action="org.freedesktop.hal.storage.mount-removable">
<match user="xbmc">
<return result="yes"/>
</match>
</match>

<define_admin_auth group="admin"/>
</config>

NB: I could not resolve the issue by editing ONLY PolicyKit file: seems like the HAL interface can only be enabled through the /etc/dbus-1/system.d/hal.conf file mentioned above. Not sure if that's the right thing to do. If anyone knows a better solutions, pls post!