Sjoerd Simons a écrit :
Hal does indeed pol cdrom drives for media every two seconds. It could be that
your hardware for some reason blinks it's led when that happens. I don't see
why this is a bug? Please enlighten me.
Hi Sjoerd,
Sorry for the delay, your reply went into my spambox.
I consider this a bug in the perspective that this LED is used to
indicate system activity, and polling the CD is not [relevant] system
activity. But of course detecting new CDs is useful and there has to be
a way to do it. My perception was that polling was a hacky way to do it
used by developers who don't have systems with LEDs responding to CD
polling. I assumed that KDE developers had fixed #308603 by changing to
the clean way. But, after investigation, I see that the KDED Media
Manager uses hal to do CD polling when it is available. I'm not sure if
it does CD polling using an alternative if hal is not enabled. I frankly
don't know much about the role of the KDED Media Manager. I assumed it
did CD insertion autodetection, but after disabling hal I can't see any
sign of that. I have Googled "KDED Media Manager", and most results were
about disabling it to avoid LED blinking. Perhaps the source code
(http://websvn.kde.org/trunk/KDE/kdebase/kioslave/media/mediamanager/)
could help figuring out if it can do CD polling without hal, and what
kind of API it uses to do so, but trying to read the code only made me
realize I would better learn C++ first.
So, I can't point you to a FLOSS feature which detects CD insertion
without blinking my LED constantly for now. So I have turned to Redmond
to see whether hal is doing the right thing or not. The activity on the
IDE channel was much more than I expected, but I have seen, at the
maximum, no activity of the LED for about 20 seconds. Meanwhile, the
time for an OS reaction after a CD insertion was about 13 seconds on my
laptop, which is similar to the time hal took (with 2 seconds polls). On
another machine, Redmond's OS reacted to CD insertion in about 4 seconds.
I think you now have all the information that motivated me to open a
bug, and should be able to decide how to handle this bug, forwarding
upstream or not. Tagging wontfix could be an option, but I would
recommend not to close.