Re: [kde-linux] stop empty floppy drive announcement
- Date: Wed, 13 Nov 2013 12:08:54 +0000 (UTC)
- From: Duncan <1i5t5.duncan@xxxxxxx>
- Subject: Re: [kde-linux] stop empty floppy drive announcement
Felix Miata posted on Tue, 12 Nov 2013 16:06:27 -0500 as excerpted:
> On 2013-11-11 23:43 (GMT-0500) Felix Miata composed:
>> How? Every time I login, focus is stolen from Konsole's restoration by
>> the inane popup announcing the presence of a floppy drive with no media
>> in it.
> This is an unresolved bug with likely upstream roots if not entirely:
The root problem is one of legacy hardware (lack of) features. Floppy
drives are old enough they predate the hardware removable-media-detect
feature found on, for example, optical (CD/DVD) devices. The only
information the BIOS makes available is that there's a device there, and
the only way to see whether there's actually anything in it is to try it.
Making problems worse, there's no media-change-detect notification
either, so once a floppy is inserted, it can be switched out without
anything at the software level realizing it, so if it goes to write to
the device (or even seek to a different place in the file you had open
for reading), for all it knows the physical media has been switched out
and it's reading/writing an entirely different file on the new media now!
The only way to be sure that isn't happening is to actually stat the file
and compare the results to the ones from before to make sure it's the
same thing, before each read/write access.
And because floppy drives are so physically SLOW, that introduces a delay
as the device is physically accessed.
At least on CD/DVD devices, while the media-presence/change detection is
rather crude by modern standards, it exists, and the way change detection
is typically supported in software is by polling -- back in the HAL days
(before udisks, as I said earlier in the thread I have those features
disabled now and haven't followed what the current solution does) there
was a notorious feature that polled the CD/DVD hardware every two seconds
to be sure it hadn't changed -- it was crude, but because the hardware
could answer without actually spinning up the disk to check, it was
comparatively fast and normally happened in the background without
disturbing the user.
Unfortunately, that doesn't work for a floppy, because the device has to
actually re-read the physical media to check whether it has changed,
triggering an audible click and likely a UI-stall as the floppy spins up
and the drive actually rereads the physical sector to see if it's the
same as before. Not only would that constant click every couple seconds
be extremely irritating, it would wear out a floppy in the drive very
fast (perhaps an hour or two) and would likely kill the drive itself
within a few days.
So that solution, while viable for CD/DVDs that retain that info in the
hardware and can simply return it when queried every couple seconds, is
not viable at all for floppy device hardware.
But as I said in the first reply, the world has thankfully moved on and
few machines have floppies any more -- or in the event that they do,
they're often the USB attached version and thus can be physically
unplugged unless they're actually in use.
In my opinion, probably the best way for software like kde's device
notification is to ignore floppies entirely. Just skip anything that the
BIOS reports as a floppy. Sure, that means no notification for floppies
at all, but floppy hardware itself is so old it simply wasn't designed
with this sort of feature in mind in the first place, and it's best to
just let sleeping floppies lie. Fortunately they're now rare, and
anybody (like Felix) who *IS* still using them is surely used to the
limitations of the technology and can cope with it.
That's better than forcing users to choose between support that is at
best broken for floppies, and disabling auto-detect/auto-mount for
/everything/, thus losing the feature for newer (non-floppy) hardware
that /does/ support the feature well, or at least like CD/DVDs, can
answer a poll in firmware without having to physically spinup the media.
But... the same rarity that means few users deal with the problem also
means few developers actually have the hardware to test with, either.
And it's kinda hard to properly set up the floppy-ignore, if you don't
have a floppy device to actually work with to see what you need to
ignore, and to test to see if your proposed solution is actually going to
work in practice or not.
Meanwhile, Felix, don't take this the wrong way as I wouldn't presume to
tell you that can't setup and use your systems as you like, but...
What /is/ your actual use case for floppies? I was thinking about it and
trying to come up with some scenario, some use-case, where I might find
floppies a continued viable solution, and I'm simply coming up dry,
especially where you're not simply using legacy hardware that you still
have, but are actually buying and attaching new floppy drives to any
motherboards that continue to support it, on new installations. I just
can't see the use-case where that's justified.
And even if I had a collection of existing floppies and didn't want to
put all of the data for 1000+ of them on a $2 2-gig USB thumbdrive, I'd
buy the USB-attached floppy-drives that I could plug-in when needed (and
just as importantly, unplug when NOT needed), and thus wouldn't have to
deal with the problems of an internally attached floppy-drive. If you're
booting from floppy, anything remotely new should support booting from
USB-attached floppy as well as it does booting from direct-attached
floppy, and if we're talking hardware that's old enough it doesn't
support booting from USB, then it's also old enough that buying new
floppy-drives and attaching them to it, as you said you do when you can,
doesn't make sense either.
I just don't see the case where either USB thumbdrives, or CD/DVD read/
writers (of comparable cost to floppy devices, possibly even cheaper
since the antique-hardware tax that applies to floppy devices isn't as
steep for CD/DVD writers yet), or worst-case, USB-attached floppies,
doesn't make more sense than legacy mobo flat-cable-attached floppy-
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
This message is from the kde-linux mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde-linux.
More info: http://www.kde.org/faq.html.