News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

1204/1404 HAL replacement !!! Please read!

Started by phenigma, March 21, 2015, 02:19:48 AM

Previous topic - Next topic

phenigma

Hey there LMCE'ers!   :o

A major change within the linux community has driven a need for a change to the hardware detection methods within the lmce smart home automation system.  This change will affect all users of LMCE1204 (Ubuntu Precise) and up, including the pre-pre-alpha LMCE1404 (Ubuntu Trusty).

The linux community dropped support for hald (the hal daemon) which provided hardware detection events and information to applications, including lmce, for many years.  This change happened about 4 years ago.  LMCE has been sheltered from the changes because Ubuntu has maintained support for hald through the 1204 LTS release.  As of Ubuntu 1404 LTS hald has been discontinued completely.

In order to maintain our level of automatic hardware detection, and ultimately improve it beyond its' current capabilities, hal detection is being replaced with udev based device detection with appropriate device detected/removed event notifications for dcerouter.

udev is the hardware event notification system that has replaced the hald (hal daemon) in the general linux community.  udev has been incorporated into the new systemd (system daemon) which is becoming the standard for boot managment and service launching under the linux kernel.  LMCE will also support systemd launching in the near future.

In the next few days we will be pushing an updated version of the HAL daemon that linuxmce uses to detect devices.  The HAL daemon was named for its interface to the hald.  The updated version of our HAL daemon will now interface with udev directly rather than hald.  The package in question is "pluto-hald".  At the moment the pkg name will not change to avoid issues with upgrades.  Eventually the package name will change to reflect the new "lmce-" package naming convention.

Once the update is deployed you will need to

apt-get update
apt-get dist-upgrade

your lmce core and MD devices to receive the new device detection system.  I am doing everything I can to mitigate issues that people may encounter during this upgrade process and I can offer the following observations so far:

  • Some devices may trigger the Setup Wizard to appear.  This is usually the Wizard confirming that the new device is actually the old device.  i.e.  My Zwave dongle is re-detected (due to changes in device identification) but recognizes that it is actually the old (original) device and simply requests confirmation of that fact.
  • GSD devices may need to have their serial ports reset (as they may be lost) and saved, followed by a router reload.  No issues have been observed after this with serial devices.

As always we ask you to remember that this is ongoing alpha software with very few developers contributing.  If you have any issues please file tickets in the trac system (contact posde in IRC for credentials).  Please watch http://wiki.linuxmce.org/index.php/LinuxMCE-1204_pre-alpha to follow changes to the 1204 development version, including when this change hits release.

Thanks everyone and enjoy LinuxMCE!

(J.)ason
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

Marie.O

Jason,

I'm up-to-date with all the latest packages, and haven't seen any ill behavior so far.

Great job!
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

phenigma

Excellent!  Thank you.  Please keep me apprised of any ill behaviour you may experience.   :D

Jason.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

maverick0815

I don't know, if this is really related, but since the update, I noticed some decrease in performance, qorbiter takes long to load and display the viewpoint.....also internet access seems slower. I checked my connection in the fritzbox...there it's fine.

phenigma

There is no way that the new HAL could affect performance of your system.  qOrbiter is under a lot of changes atm and HAL is completely unrelated to it.  There is no affect that HAL could have on your internet connection either.  Talk to golgo about the qOrbiter issues in the qOrbiter thread.

To be sure you can always check if HAL is chewing cpu using top at the command line, but it sits consistently at 0% cpu usage on all my test systems, including rpi1 & rpi2.

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

maverick0815

I have no more access to my drives in the core...
Phenigma was so kind as to try to assist me. I will attach the output file generated by HAL, until it terminated. Maybe this will help.

phenigma

Thanks Mav, I'll check the output and get a fix out asap.

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

phenigma

#7
The fix for this issue is in the repo.

apt-get update
apt-get upgrade

will bring the fix.

It's probable that this is not the only/last issue.  Please report back any other issues or crashes of the Hardware Abstraction Layer.  I will be sure to help fix things as quickly as possibe.

Some tips if you're having issues:

ps ax | grep HAL

should show multiple lines of output.  If you only get one line, then hal is not running and has likely crashed for some reason (most likely my incompetence as a programmer :P ).

If you're running on the core and through the test above you determine that HAL is not running.  Please do the following:
Edit /etc/pluto.conf and add ",34,35" to the LogLevels= variable.
Reload the DCERouter.
Then:

/usr/pluto/bin/HAL -d 16 -r localhost | tee out.txt

If you didn't see HAL running earlier then I expect this might crash. 

If it crashes... and only if it crashes please pastebin the output file 'out.txt' by running:

pastebinit out.txt

That will paste the complete output of the HAL daemon up until the possible crash and likely point me directly to the problem with extremely specific information ;).

Thanks for helping troubleshoot this one Mav!  Seemingly un-related missing hard drives brought us back to the HAL daemon changes.  I really (can't emphasize enough) REALLY appreciate the time you spent with me to figure out the problem!

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

maverick0815

No need to thank me....I'm glad I can contribute at least this way. On the other hand, I still couldn't revive the drives. I'm really considering a fresh install. After a kernel upgrade on the core I always have to reinstall asterisk. Kernelupgrades on the core give me dependency errors. So many guess is, something went wrong earlier. This way we can see how the new system works on a fresh install.

maverick0815

So, I checked a little more. I removed the devices from the configuration and did a reboot. The disks were immediately recognised, but they don't get online. I tried setting them in the webadmin, but that doesn't do anything. After reboot the tick for online is gone again too.

phenigma

I'm not sure what is up there Mav.  I added an internal drive here and it was detected and stays online with both router reloads and reboots.  So I'm at a bit of a loss.  You can try running /usr/pluto/bin/StorageDevices_Radar.sh manually and see if the drives come 'online' then.

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

maverick0815

#11
problem solved with the ever so resourceful Phenigma :-)
only now asterisk doesn't register my phones anymore. this time reinstalling it won't do the trick anymore.

phenigma

Glad things are working for you with the drives.  Thanks for helping to identify a hidden location that's still using hald for information, we'll have to convert autofs to use udev rather than hal.  Perhaps start another thread for the asterisk issues you're having.  I know very little about asterisk.

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

Marie.O

Grep'ing through the code shows some stuff in

pnp_detection_scripts/ZWave.sh
pnp_detection_scripts/99_PLCBUS_1141.sh
Setup_CaptureCards/CaptureCards_Setup_PVR_USB2.sh
Disk_Drive/Disk_Drive.cpp
AVWizard/scripts/AVWizard_Remote_Detect.sh
drivers/pvrusb2/driver
Powerfile_C200


I'd say the last two can be ignored. The others I am not too sure.
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

phenigma

mhm.  Okay, a couple points to look at and verify.  Silly me for thinking that device detection occurred only in the device detection system....   :P  I'll check them out.  Thanks posde.

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]