Bug 489083 - devkit-disk tortures my good old floppy drive
devkit-disk tortures my good old floppy drive
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: DeviceKit-disks (Show other bugs)
11
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: David Zeuthen
Fedora Extras Quality Assurance
: Reopened
: 496586 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-07 04:50 EST by Thomas Meyer
Modified: 2009-10-16 16:05 EDT (History)
16 users (show)

See Also:
Fixed In Version: 004-4.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-16 03:04:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
disable /dev/fd0 polling (599 bytes, patch)
2009-05-18 06:13 EDT, Anton Guda
no flags Details | Diff
This is the floppy entry (57.90 KB, image/jpeg)
2009-06-15 12:38 EDT, Thomas Meyer
no flags Details

  None (edit)
Description Thomas Meyer 2009-03-07 04:50:33 EST
Description of problem:
login to gnome and see this processes:

 3149 ?        S      0:00 /usr/libexec/devkit-disks-daemon
 3152 ?        S      0:00  \_ devkit-disks-daemon: polling /dev/sr0 /dev/fd0

Version-Release number of selected component (if applicable):
003-3.fc11

How reproducible:
always

Steps to Reproduce:
1. login to gnome
2. hear the floppy drive go crazy
3.
  
Actual results:
floppy makes a lot a noise

Expected results:
floppy should get it's earned sleep

Additional info:
Comment 1 Thomas Meyer 2009-03-10 12:59:37 EDT
devkit-disks --inhibit-polling /devices/fd0 is segfaulting since the last upgrade...

See:
$ devkit-disks --inhibit-polling /devices/fd0
Segmentation fault

Shall I provide a dump file of the process?
Comment 2 Matthias Clasen 2009-03-10 14:53:09 EDT
My bad. Should be fixed in DeviceKit-disks-003-6.fc11
Comment 3 Thomas Meyer 2009-03-14 10:54:00 EDT
With the standard fedora kernel you need to modprobe the floppy kernel modul, to hear the floppy go crazy.

# modprobe floppy

In my self compiled kernel I have nearly no modules; everthing is linked in, so the floppy driver.
Comment 4 David Zeuthen 2009-03-16 20:39:37 EDT
I guess we should just ignore pc floppy drives completely (everything works fine with USB floppy drives though). I'll look into this tomorrow, I only have a single machine left with such hardware and it's stuck in the office...
Comment 5 Anton Guda 2009-05-18 06:13:44 EDT
Created attachment 344409 [details]
disable /dev/fd0 polling

Simple hack to disable /dev/fd* polling.
Works for me.
Comment 6 Bug Zapper 2009-06-09 07:58:52 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 udo 2009-06-13 12:22:39 EDT
# devkit-disks --inhibit-polling /dev/fd0
Inhibit polling failed: org.freedesktop.devicekit.disks.inhibit-polling no

Fedora 11 on x86_64.
Comment 8 udo 2009-06-13 12:24:32 EDT
For clarity: over here the daemon is constantly accessing dev/fd0 for no reason at all. Also disabling this behaviour is not documented?
Please SAVE my floppydrive and fix this software.
Comment 9 Alexandr Kara 2009-06-14 05:26:11 EDT
Inhibiting polling with:

devkit-disks --inhibit-polling /dev/fd0 &

works for me. But how do I make this permanent without putting it into startup scripts? I havent't found any configuration file for this.
Comment 10 Clyde E. Kunkel 2009-06-15 12:22:56 EDT
Doesn't work for me:

# devkit-disks --inhibit-polling /dev/fd0 &
[1] 3811
[root@P5K-EWIFI ~]# Inhibit polling failed: org.freedesktop.devicekit.disks.inhibit-polling no


De-installed to save my floppy drive and am keeping a F11 kernel around.
Comment 11 Thomas Meyer 2009-06-15 12:38:24 EDT
Created attachment 347963 [details]
This is the floppy entry
Comment 12 Thomas Meyer 2009-06-15 12:39:27 EDT
Strange entry in gnome-panel after executing "devkit-disks --inhibit-polling /dev/fd0". See attached screen shot.
Comment 13 Fedora Update System 2009-06-16 20:47:44 EDT
gvfs-1.2.3-5.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/gvfs-1.2.3-5.fc11
Comment 14 Fedora Update System 2009-06-19 09:32:27 EDT
gvfs-1.2.3-5.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gvfs'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-6678
Comment 15 Matthias Clasen 2009-06-19 11:08:09 EDT
Reopening this bug. It turned out that the patch I put in here is not sufficient to fix the floppy polling problem. I've asked David to get the remaining parts out as updates as well.
Comment 16 Fedora Update System 2009-06-23 04:29:23 EDT
gvfs-1.2.3-7.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/gvfs-1.2.3-7.fc11
Comment 17 udo 2009-06-24 12:06:37 EDT
After updating, no real change:

(...)
Too big adjustment 32
Too big adjustment 32
Too big adjustment 32
hda-intel: IRQ timing workaround is activated for card #1. Suggest a bigger bdl_pos_adj.
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
end_request: I/O error, dev fd0, sector 0
# rpm -qa |grep gvfs
gvfs-gphoto2-1.2.3-7.fc11.x86_64
gvfs-smb-1.2.3-7.fc11.x86_64
gvfs-fuse-1.2.3-7.fc11.x86_64
gvfs-obexftp-1.2.3-7.fc11.x86_64
gvfs-archive-1.2.3-7.fc11.x86_64
gvfs-1.2.3-7.fc11.x86_64
Comment 18 Fedora Update System 2009-06-26 22:48:15 EDT
gvfs-1.2.3-7.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 19 udo 2009-06-27 00:36:51 EDT
Please see comment #17.
Comment 20 wmccroskey 2009-06-27 12:30:35 EDT
I also had this problem on Fedora 11 x86_64.

I use the floppy drive, so disabling it is NOT an option. I know most of you don't have this type of hardware on your PC these days, but as a bit of an old-timer, here are a few facts to consider:
1. Floppy drive motors are not rated for continuous duty. This polling appears to be running the head positioning motor to try to read track zero as well as possibly the drive motor. Either action every two seconds will fail the drive over time as the the motors have some run time and spin down time.

2. Please review the interface chip. The Intel 82077 (or clone) FDC used pin 31 for DSKCHG and it show up as bit 7 of the Digital Input Register (DIR, PC-AT Mode) "DSKCHG monitors the pin of the same name and reflects the opposite value seen on the disk cable, regardless of the value of /Invert"

The DSKCHG signal would be the preferred way of polling the disk. Poll for a disk change and only try to read after that. (change in the floppy module to get disk change?)

The main thing is to not keep running the motor.

Not sure what problems I'll cause, but under /usr/libexec, I mv'ed the devkit-disks-daemon to devkit-disks-daemon.do_not_run and then rebooted.

It seems the HALD is still polling the other removable drives, so they pop-up as media is inserted.

I tried to put the devkit-disks --inhibit-polling /dev/fd0 & into a startup script and that did not seem to work.
Comment 21 wmccroskey 2009-06-27 12:33:18 EDT
I also had this problem on Fedora 11 x86_64.

I use the floppy drive, so disabling it is NOT an option. I know most of you don't have this type of hardware on your PC these days, but as a bit of an old-timer, here are a few facts to consider:
1. Floppy drive motors are not rated for continuous duty. This polling appears to be running the head positioning motor to try to read track zero as well as possibly the drive motor. Either action every two seconds will fail the drive over time as the the motors have some run time and spin down time.

2. Please review the interface chip. The Intel 82077 (or clone) FDC used pin 31 for DSKCHG and it show up as bit 7 of the Digital Input Register (DIR, PC-AT Mode) "DSKCHG monitors the pin of the same name and reflects the opposite value seen on the disk cable, regardless of the value of /Invert"

The DSKCHG signal would be the preferred way of polling the disk. Poll for a disk change and only try to read after that. (change in the floppy module to get disk change?)

The main thing is to not keep running the motor.

Not sure what problems I'll cause, but under /usr/libexec, I mv'ed the devkit-disks-daemon to devkit-disks-daemon.do_not_run and then rebooted.

It seems the HALD is still polling the other removable drives, so they pop-up as media is inserted.

I tried to put the devkit-disks --inhibit-polling /dev/fd0 & into a startup script and that did not seem to work.
Comment 22 udo 2009-06-27 12:40:50 EDT
`rmmod floppy` is also a beautiful workaround but that prevents you from actually using the device...
Comment 23 udo 2009-06-27 12:42:52 EDT
BTW: could this eject issue https://bugzilla.redhat.com/show_bug.cgi?id=507908 be related? (polling is the root cause for closing the cd tray?)
Comment 24 Joachim Frieben 2009-07-01 11:08:01 EDT
*** Bug 496586 has been marked as a duplicate of this bug. ***
Comment 25 Joachim Frieben 2009-07-01 11:11:17 EDT
Issue now also appears for me on F11 after upgrading to kernel 2.6.29.6-209.rc1.fc11 but not for earlier versions.
Comment 26 udo 2009-07-01 11:13:51 EDT
I compile my own kernels.
So what is the common factor?
(2.6.30 here)
Comment 27 Fedora Update System 2009-07-02 10:50:32 EDT
DeviceKit-disks-004-4.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/DeviceKit-disks-004-4.fc11
Comment 28 David Zeuthen 2009-07-02 10:55:26 EDT
(In reply to comment #27)
> DeviceKit-disks-004-4.fc11 has been submitted as an update for Fedora 11.
> http://admin.fedoraproject.org/updates/DeviceKit-disks-004-4.fc11  

Please let me know if this fixes the problem with floppy drive torturing. Thanks.
Comment 29 udo 2009-07-02 11:47:37 EDT
How can we test?
Just install?
So I did.

My floppy's green light was still on since the recent reboot.
I reinserted the floppy module.
I still heard some grinding.
I removed the floppy module.
Quietness.
Comment 30 David Zeuthen 2009-07-03 08:26:09 EDT
(In reply to comment #29)
> How can we test?
> Just install?
> So I did.
> 
> My floppy's green light was still on since the recent reboot.
> I reinserted the floppy module.
> I still heard some grinding.
> I removed the floppy module.
> Quietness.  

It's not clear to me whether you rebooted after installing the new DeviceKit-disks packages - please try doing that.
Comment 31 udo 2009-07-03 08:57:45 EDT
As I did not describe it, I did not reboot. I *will* schedule a reboot when convenient.
Comment 32 udo 2009-07-03 09:23:25 EDT
Rebooted. Quietness remained. :-)
Comment 33 Joachim Frieben 2009-07-03 10:39:36 EDT
DeviceKit-disks-004-4.fc11 does fix the issue.
Comment 34 David Zeuthen 2009-07-03 10:52:13 EDT
Great, thanks for testing this.
Comment 35 wmccroskey 2009-07-03 15:05:01 EDT
How do I load the update to give it a try?
Comment 36 Fedora Update System 2009-07-03 15:49:09 EDT
DeviceKit-disks-004-4.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update DeviceKit-disks'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7382
Comment 37 Thomas Meyer 2009-07-09 15:23:19 EDT
Yes. The new DeviceKit-disks-004-4.fc11 fixes the issue with the Fedora provided kernel. For my self-compiled mainline kernels (2.6.30.1 and 2.6.31-rc2) I still get this error. The difference is maybe that I compile the floppy driver not as a module (i.e. CONFIG_BLK_DEV_FD=y). Strange, hmm? But I guess from a distro maintainer's view you don't care and I would understand this position.
Comment 38 Mike Perrin 2009-07-13 14:43:52 EDT
DeviceKit-disks-004-4.fc11 fixes drive bashing on my system but the floppy
drive icon is missing from the Computer browser window so I cannot mount a
floppy disk from the graphical interface. If I mount the floppy as root from a
terminal window, the floppy disk icon appears on my desktop and in the
Computer browser, and the disk is accessible. When I unmount the drive from
the command line, both icons disappear. Attempting to unmount the floppy disk
from the Computer browser window produces no action and no error message.
Attempting to unmount through the desktop icon produces the "...is not in the
fstab (and you are not root)" error window.
Comment 39 Matthew Whitehead 2009-07-15 14:51:28 EDT
DeviceKit-disks-0040-.fc11 on x86_64 still demonstrates the symptoms on /dev/sr0 device (MacBook Pro hardware).  Still needs some work.
Comment 40 Matthew Whitehead 2009-07-15 14:59:04 EDT
Typo. That was supposed to be DeviceKit-disks-004-4.fc11 on x86_64.
Comment 41 Fedora Update System 2009-07-16 03:04:22 EDT
DeviceKit-disks-004-4.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 42 Mike Perrin 2009-07-16 12:58:03 EDT
Are the problems I reported in comment #38 related to DeviceKit-disks or should I be posting against another package?
Comment 43 Rod Smith 2009-08-06 14:48:43 EDT
I'm having this problem with Fedora 11 for i386 with a locally-compiled 2.6.30 kernel, using DeviceKit-disks-004-4.fc11.i586 and gvfs-1.2.3-9.fc11.i586. I can manually execute "devkit-disks --inhibit-polling /dev/fd0" to make the clicking stop, but I haven't been able to automate this; putting such a line in /etc/rc.d/rc.local has no effect. I consider this a serious problem because it's obtrusive and potentially damaging to hardware. Fedora 10 and earlier didn't exhibit this sort of behavior. Personally, I'd rather do without automounting altogether rather than have this maddening clicking going on at all times, or be forced to manually type a command to get rid of it!
Comment 44 Maciej Żenczykowski 2009-10-16 15:06:10 EDT
Having the same problem:

# ps auxwwf | egrep poll
root      2892  0.0  0.0  46360   312 ?        S    Sep08  14:34  \_ devkit-disks-daemon: polling /dev/sr0
root     30136  0.0  0.0  19884   936 ?        S    Oct15   0:00      \_ hald-addon-storage: no polling on /dev/sr0 because it is explicitly disabled

# rpm -q DeviceKit-disks
DeviceKit-disks-004-4.fc11.x86_64

I can (and have) disabled polling for hal, but can't figure out how to do it for devicekit...

Certainly doesn't seem to be fixed.
Comment 45 Maciej Żenczykowski 2009-10-16 15:08:15 EDT
# devkit-disks --inhibit-polling /dev/sr0
Inhibit polling failed: org.freedesktop.devicekit.disks.inhibit-polling no

Can't seem to figure out how to re-open the bug...

Note You need to log in before you can comment on or make changes to this bug.