LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-25-2009, 03:10 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
HAL Daemon Polling and Hard Drive LED Blinking


I have a new box that eventually will become an HTPC. An Asus M3N78-EM motherboard, AMD 5050e 2.6 GHz Dual Core CPU, Western Digital WD6400AAKS SATA hard drive, Lite-On iHAS324-08 24X SATA DVD, HDMI, DVI-D, VGA.

Currently I have Slackware 12.2 installed. Configurations are almost exactly the same as my office box.

With the new box the hard drive LED blinks every 2 seconds. Easily traceable to HAL daemon polling. When I disable the polling on the DVD drive (/dev/sr0), the LED stops blinking except during actual hard drive access (/dev/sda).

The only significant difference I see is the new DVD drive is SATA while all of my other machines use IDE DVD/CD drives. I never have seen the hard drive LED blink on my other machines every two seconds like the new box.

Is there a way to stop the blinking while enabling polling on the new DVD drive (/dev/sr0)?

Is there a way to configure the BIOS or system such that that DVD drive is not sending signals to or being monitored by the hard drive LED?

The smart-ass answer is disconnect the LED wires. An option but not what I am seeking.

Second, how does one modify the polling period from 2 seconds?

I tried a Live CD and the LED blinking stopped, but then I realized the operating system has a lock on the drive, which by design then stops the HAL daemon from polling the device. So no real clues there. However, I did notice the polling period was 16 seconds rather than 2.

Thanks.
 
Old 07-31-2009, 02:40 PM   #2
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Bump.
 
Old 07-31-2009, 05:07 PM   #3
rahrah
Member
 
Registered: Jun 2008
Location: London, England
Distribution: Slackware
Posts: 32

Rep: Reputation: 51
Hello,

Nobody else seemed to jump in here. Sooo...

You can disable hal polling with this:

hal-disable-polling --device /dev/sr0

(or whatever your device is /dev/sr2 etc).

It will follow symlinks such as /dev/cdrom /dev/dvd etc.

The hal-disable-polling man page has some illuminating info on
this.

To change the interval, I'd hack:

addon-storage.c

in hal-0.5.11/hald/linux/addons

Change this line, line 284:

static int interval_in_seconds = 2;

and these lines 329ff:


if (system_is_idle)
interval_in_seconds = 16;
else
interval_in_seconds = 2;

You might do this with powers of 2 secs (2, 4, 8, 16, 32...)

I haven't done this, and it might kill your cat, so don't blame me
if it does.

There's some additional info here:

http://ubuntuforums.org/showthread.php?t=77964

which is a bit dated. And sorry to point you to an ubuntu
thread.

<rant>

I HATE hal. It's config files are unnecessarily complicated, for
those of us that want to get an initial grip on how it works. And,
when you invest the time in getting that grip, you find almost
everything you want to do is not configurable in the config files.
You therefore have to hack the src. Which, to me, at least, isn't
really what configuration is about (not that hacking the source
isn't fun, but is that really what David Zeuthen had in mind?).

You cannot, for example, force noexec as a mount option in hal,
something that seems like a thing crying out for a mount option.

You have to hack the defines in:

hal-storage-mount.c

because David Zeuthen thought it was being abused by pesky sys
admins that just RUINED his beautiful creation.

To me, it's just broken broken broken. Tell me I'm WRONG (please).

</rant>

Hope this helps you, anyway.

Having written this, enamoured of my rant as I was, I realised
I've only answered half you question, and answered another
question you answered yourself. Sorry. Just had a look at
addon-storage.c and it seems that it treats ata and sata drives in
the same way, and that the main polling logic is in
poll_for_media_force(). Not helpful I know. FWIW it doesn't light
up the LED on my sata drive (though it does light up the main drive
activity LED on the mobo). My kernel has a home brew config, so
you might be using different kernel drivers, hence the lights.

===Rich

Last edited by rahrah; 07-31-2009 at 05:08 PM.
 
Old 07-31-2009, 08:53 PM   #4
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Thanks for replying.

Quote:
You can disable hal polling with this:

hal-disable-polling --device /dev/sr0
Yes, I knew about that. I mentioned in my original post that I had disabled polling.

I don't want to stop polling. I only want to stop the hard drive LED from blinking every two seconds without disabling polling. As this box will become an HTPC, auto-mounting and polling is rather convenient. A blinking LED in the living room is not.

Sure, I can disconnect the LED, but why should I? The LED does not blink with my office box. That box uses an IDE DVD drive while the new box uses a SATA drive. Perhaps this anomaly happens only with SATA drives. I don't know. Swapping the two drives to troubleshoot the blinking problem is a PITA.

Quote:
To change the interval, I'd hack:
Okay, so hal is poorly designed when polling intervals are not configurable except through editing the source code and recompiling. Actually, "poorly designed" is an understatement.
 
Old 07-31-2009, 09:56 PM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Question HAL-- necessary at all??

Woodsman, thanks for bringing this up. Also, thanks to rahrah for his interesting and informative reply. I agree, the HAL configuration files/methods are IMHO really non-intuitive; and why XML????? Blech!! What was wrong with text files?

I just killed hald, and that blinking stopped (except very faint tiny ones sometimes, due either to logging, or Ext4). I too have a SATA DVD-RW drive /dev/sr0 with the exact same situation as Woodsman.

FWIW, I have no idea why they didn't use a separate motherboard LED for the SATA stuff, though even that is redundant with the optical drive since it has its own built-in LED :/

Anyhow, please answer me this, someone: If I don't want stuff auto-mounting, or for that matter, stuff auto-anythinging, do we need HAL for anything at all? Seems like something really good for *buntu, or something like an HTPC, but for a Slackware desktop machine? I always felt that Udev was doing a fine job... . . ... ..

Sasha
 
Old 07-31-2009, 11:44 PM   #6
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by rahrah View Post
Nobody else seemed to jump in here. Sooo...

SNIPPAGE

To change the interval, I'd hack addon-storage.c in hal-0.5.11/hald/linux/addons
Sorry, Woodsman, I missed this thread earlier - I could have referred you to this:
http://lists.freedesktop.org/archive...er/010073.html where I proposed something similar back in 2007 on the hal mailing list after a discussion in IRC. Read the entire thread and decide what you wish to do :-)

Quote:
You cannot, for example, force noexec as a mount option in hal,
something that seems like a thing crying out for a mount option.

You have to hack the defines in hal-storage-mount.c because David Zeuthen thought it was being abused by pesky sys admins that just RUINED his beautiful creation.

To me, it's just broken broken broken. Tell me I'm WRONG (please).
Well, I'll be the last person to blindly defend davidz, but I happen to agree with him on this. It's pretty trivial to subvert the noexec anyway, and it just complicates things for many people, so it's best left off.
 
Old 08-01-2009, 01:03 AM   #7
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
Read the entire thread and decide what you wish to do
All I really want to do is stop the hard drive LED from blinking when the DVD drive is polled. Preferably without physically disconnecting the connector.

This blinking does not seem to happen with IDE optical drives. This is my first SATA optical drive and the blinking is irritating. I suppose this weekend I'll have to swap optical drives between my computers as the office box has an IDE drive. With that box the hard drive LED does not blink when the optical drive is polled. In that box my primary hard drive is IDE and I have a SATA secondary drive. In my new box all I have is a SATA hard drive. So I'm guessing there is a connection with using a SATA optical drive with a primary SATA hard drive.

The polling period is not a big deal to me. I prefer something around 2 or 4 seconds. I tested a Live CD that is modified to poll 16 seconds and that period is way too long to wait for the (KDE) pop-up dialog. Especially if this box is eventually going to be an HTPC. As that is the case, I want as fast a response as possible when I insert a DVD.

Quote:
FWIW it doesn't light up the LED on my sata drive (though it does light up the main drive activity LED on the mobo). My kernel has a home brew config, so you might be using different kernel drivers, hence the lights.
Hmm. Perhaps then is hope. I too am using a custom kernel. Perhaps I have something configured that causes the blinking.
 
Old 08-01-2009, 12:13 PM   #8
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Update: I swapped my SATA and IDE DVD drives. The hard drive LED started blinking every two seconds in my office box after installing the SATA DVD drive. The new box with the IDE drive does not blink.

The blinking problem is related to using SATA.

Hopfully somebody knows why this happens and does not happen with IDE devices.

Auto-mounting is nice but not critical, even in an HTPC. Still, there must be a way to stop the blinking.
 
Old 08-01-2009, 01:10 PM   #9
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by Woodsman View Post
Update: I swapped my SATA and IDE DVD drives. The hard drive LED started blinking every two seconds in my office box after installing the SATA DVD drive. The new box with the IDE drive does not blink.

The blinking problem is related to using SATA.

Hopfully somebody knows why this happens and does not happen with IDE devices.

Auto-mounting is nice but not critical, even in an HTPC. Still, there must be a way to stop the blinking.
Your question is not an easy one to answer. Although I have done a little bit of programming work with Intel chip-sets I am not familiar with nVidia chip-sets. I suspect that it won't be easy to solve the problem and the hardest part may be finding out enough detailed information.

The hard disk activity LED (from the motherboard) is probably a combined signal from the disk controllers on the motherboard. Each disk controller will be implemented in the chip-set or a separate controller chip. I don't know if the LED is controlled directly by software or is a side effect of performing some particular hardware operation.

One place where I suggest looking is in the Linux driver for the SATA controller in the nForce 730a chip-set. There may be some code in the driver that explicitly blinks the drive LED. I had to make changes to my copy of the SCSI disk driver "sd.c" to disable partition detection for my RAID member disks to avoid I/O errors. Sometimes the comments or code are clear enough to figure out what must be changed. Making changes to a block device driver is dangerous because you can corrupt or delete data if you introduce driver bugs.

Another place to look is at the specification for the nForce 730a chipset. Unfortunately that may be hard to obtain. I checked the nVidia site and one has to sign up as a developer to obtain that information. ASUS might be able to give you more specific information about what causes the LED to blink.

The difference between a hard disk and optical drive is that an optical drive uses ATAPI (AT Attachment Packet Interface) to send commands. At the very lowest level the driver for SATA may or may not be able to tell the difference between that kind of I/O and normal hard disk I/O. Since I don't know exactly what blinks the LED it's hard to suggest anything specific. To avoid blinking the LED might require changes to both the SCSI CD-ROM class driver and the device driver for the SATA controller.

The person more likely to answer your question is a BIOS or driver developer familiar with nVidia chip-sets. You could also address your question generally to nVidia or ASUS. What chip-set registers or I/O operations for the SATA controller cause the LED to blink?

Last edited by Erik_FL; 08-01-2009 at 01:11 PM.
 
Old 08-03-2009, 12:40 AM   #10
Cheesesteak
Member
 
Registered: Jun 2008
Distribution: Slackware
Posts: 102

Rep: Reputation: 24
Woodsman,

Ever give consideration that it may be a quirk with the specific SATA DVD drive you have?

My new box had an HP dvd1170 SATA DVD drive in it. Now and then I would would hear what almost sounded like a regularly intervalled low-toned cat's meow? No disc in the drive, and no LED activity.

I have another box, equipped with a Plextor PX-850SA SATA DVD drive. So, I swapped the DVD drives, and now I have neither LED nor interval sound.

May not seem plausible in your case, but you never know for sure...
 
Old 08-03-2009, 01:55 AM   #11
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
Ever give consideration...
Yes. I already purchased an IDE drive. The drive also chattered for two seconds like an old floppy drive every time I booted. Otherwise burned and read disks quickly and the tray opened and closed fast. Yet sometimes these problems are not worth chasing.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot mount internal hard drive: .hal-mtab and .hal-mtab-lock messed up extremewaffles Linux - Newbie 3 07-01-2009 05:15 PM
when hibernate to ram, power led keeps blinking cyrilng Linux - Hardware 10 06-02-2009 06:49 AM
OpenSuse 11.1 do not mount CDrom or USB pen drive Hal daemon problem reported cstomaci Linux - Newbie 3 03-27-2009 08:58 AM
hard drive led never goes off ololad8 Linux - Hardware 3 07-29-2006 06:53 PM
Hard disk led won't stop blinking AlleyTrotter Slackware 6 10-22-2005 10:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration