USB floppy drive is running without floppy

Bug #1456338 reported by P_Aleksandrov
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When I connect USB floppy drive (Gembird) without floppy under Ubuntu, the drive engine seems to be running (the floppy drive LED is on and the drive is sounding). The same behaviour takes place if I connect the drive with a floppy and then remove the floppy. It seems that the system accesses the drive permanently when there is no floppy. Under Windows XP it works normally - when there is no floppy, the LED and engine are switched off. I have tried Ubuntu 14.10 (amd64) with upstart, LXQt and KDE 5; Ubuntu 15.04 with systemd, LXQt - the same behaviour.
If I boot using bash as init (init=/bin/bash) and connect the floppy drive after boot, the engine is off (the normal behaviour).
lsof /dev/sdb during engine running outputs nothing.

description: updated
description: updated
Revision history for this message
P_Aleksandrov (petr-aleksandrov) wrote :

I have tried to log file access using fatrace during the USB floppy drive connection.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1456338/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Armin Breiteneder (armin-breiteneder) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . I have classified this bug as a bug in udisks2.

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://help.ubuntu.com/community/ReportingBugs.

affects: ubuntu → udisks2 (Ubuntu)
Revision history for this message
P_Aleksandrov (petr-aleksandrov) wrote :
Download full text (8.6 KiB)

The same problem in Ubuntu 17.10 (updated from previuos version). I tried to stop some systemd services, remove kernel modules, kill some processes and unmount some filesystems. There are output of lsmod, ps, mount (executed after stopping, removing modules and so on) below. The problem was not solved.

Output of lsmod:
Module Size Used by
usb_storage 69632 0
binfmt_misc 20480 1
nls_iso8859_1 16384 1
fam15h_power 16384 0
k10temp 16384 0
autofs4 40960 2
hid_generic 16384 0
usbhid 49152 0
hid 118784 2 hid_generic,usbhid
amdkfd 188416 1
amd_iommu_v2 20480 1 amdkfd
amdgpu 2007040 1
i2c_algo_bit 16384 1 amdgpu
ttm 94208 1 amdgpu
drm_kms_helper 167936 1 amdgpu
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
sysimgblt 16384 1 drm_kms_helper
fb_sys_fops 16384 1 drm_kms_helper
drm 356352 4 amdgpu,ttm,drm_kms_helper
ahci 36864 2
libahci 32768 1 ahci

Output of ps:
  PID TTY TIME CMD
    1 ? 00:00:01 systemd
    2 ? 00:00:00 kthreadd
    3 ? 00:00:00 kworker/0:0
    4 ? 00:00:00 kworker/0:0H
    6 ? 00:00:00 mm_percpu_wq
    7 ? 00:00:00 ksoftirqd/0
    8 ? 00:00:00 rcu_sched
    9 ? 00:00:00 rcu_bh
   10 ? 00:00:00 migration/0
   11 ? 00:00:00 watchdog/0
   12 ? 00:00:00 cpuhp/0
   13 ? 00:00:00 cpuhp/1
   14 ? 00:00:00 watchdog/1
   15 ? 00:00:00 migration/1
   16 ? 00:00:00 ksoftirqd/1
   18 ? 00:00:00 kworker/1:0H
   19 ? 00:00:00 cpuhp/2
   20 ? 00:00:00 watchdog/2
   21 ? 00:00:00 migration/2
   22 ? 00:00:00 ksoftirqd/2
   24 ? 00:00:00 kworker/2:0H
   25 ? 00:00:00 cpuhp/3
   26 ? 00:00:00 watchdog/3
   27 ? 00:00:00 migration/3
   28 ? 00:00:00 ksoftirqd/3
   30 ? 00:00:00 kworker/3:0H
   31 ? 00:00:00 cpuhp/4
   32 ? 00:00:00 watchdog/4
   33 ? 00:00:00 migration/4
   34 ? 00:00:00 ksoftirqd/4
   36 ? 00:00:00 kworker/4:0H
   37 ? 00:00:00 cpuhp/5
   38 ? 00:00:00 watchdog/5
   39 ? 00:00:00 migration/5
   40 ? 00:00:00 ksoftirqd/5
   42 ? 00:00:00 kworker/5:0H
   43 ? 00:00:00 cpuhp/6
   44 ? 00:00:00 watchdog/6
   45 ? 00:00:00 migration/6
   46 ? 00:00:00 ksoftirqd/6
   48 ? 00:00:00 kworker/6:0H
   49 ? 00:00:00 cpuhp/7
   50 ? 00:00:00 watchdog/7
   51 ? 00:00:00 migration/7
   52 ? 00:00:00 ksoftirqd/7
   54 ? 00:00:00 kworker/7:0H
   55 ? 00:00:00 kdevtmpfs
   56 ? 00:00:00 netns
   58 ? 00:00:00 kworker/2:1
   59 ? 00:00:00 khungtaskd
   60 ? 00:00:00 oom_reaper
   61 ? 00:00:00 writeback
   62 ? 00:00:00 kcompactd0
   63 ? 00:00:00 ksmd
   64 ? 00:00:00 khugepaged
   65 ? 00:00:00 crypto
   66 ? ...

Read more...

Revision history for this message
Phillip Susi (psusi) wrote :

What if you only shut down udidks? Can you post the output of udisksctl dump?

Revision history for this message
P_Aleksandrov (petr-aleksandrov) wrote :

I have attached the output of "udisksctl dump" and "udisksctl monitor" (launched as usual user, not root, before stopping udisks).
I have stopped udisks using "sudo systemctl stop udisks2". The wrong behaviour has remained (floppy drive has runned without floppy disk).

Revision history for this message
P_Aleksandrov (petr-aleksandrov) wrote :
Revision history for this message
Phillip Susi (psusi) wrote :

What if you boot into rescue mode?

Revision history for this message
P_Aleksandrov (petr-aleksandrov) wrote :

I have installed Ubuntu 18.04 (after removal "/bin", "/usr" and some other directories on the root FS). The bug remains. If I boot into rescue mode ("Drop to root shell prompt") and connect the USB floppy drive without disk, it works normally. If I boot into rescue mode, select resuming normal boot and connect the USB floppy drive, the drive works with the bug.

Revision history for this message
Phillip Susi (psusi) wrote :

Let me see if I have this right. If you boot the system normally and plug in the drive, it starts running forever. Does it also do the same if you plug it in and then boot the system normally? But if you boot in rescue mode, then plug in the drive, it works normally even after you resume the normal boot?

Revision history for this message
P_Aleksandrov (petr-aleksandrov) wrote :

> Does it also do the same if you plug it in and then boot the system normally?
Yes. When a splash screen "kubuntu" is shown the drive starts "running forever".

> But if you boot in rescue mode, then plug in the drive, it works normally even after you resume the normal boot?
No. I have tried to plug the floppy drive in rescue mode (root shell) and the exit from the root shell and resume normal boot. The drive started "running forever" during resuming normal boot.

Revision history for this message
Phillip Susi (psusi) wrote :

Ahh, ok.. try disabling udisks to see if that is the cause:

systemctl stop udisks2.service

Then connect the drive.

Revision history for this message
P_Aleksandrov (petr-aleksandrov) wrote :

> Ahh, ok.. try disabling udisks to see if that is the cause:
> systemctl stop udisks2.service
The wrong behaviour remained. Also when I booted in rescue mode (root shell), then resumed normal boot, stopped udisks2 and connected the device.
Is it possible that the problem is in systemd?

Now I have some old user configuration files (in /home) which I have not deleted when reinstalled the system. But if I logout, the problem with the device remains.

Revision history for this message
Phillip Susi (psusi) wrote :

That does indicate that the problem is not in udisks. Try stopping udev as well before plugging in the drive.

Revision history for this message
P_Aleksandrov (petr-aleksandrov) wrote :

I stopped sddm, udisks, udev:
sudo systemctl stop sddm
sudo systemctl stop udisks2.service
sudo systemctl stop systemd-udevd.service
sudo systemctl stop systemd-udevd-control.socket
sudo systemctl stop systemd-udevd-kernel.socket

After connecting the floppy drive, it did not run (seemed not to be turned on).
Then I used
sudo systemctl start systemd-udevd-control.socket
The same behaviour.
I connected my smartphone to check if the USB port was powered - it was powered and the smartphone detected the USB connection.
After "sudo systemctl start systemd-udevd-kernel.socket" and connecting the floppy drive, it started to run.

Revision history for this message
Phillip Susi (psusi) wrote :

Ok, so it is something that udev is doing. Run sudo udevadm monitor, then plug in the drive, and see what it outputs.

Revision history for this message
P_Aleksandrov (petr-aleksandrov) wrote :

"udevadm monitor" (runned as root) output is in the attached file. I have stopped sddm before.

Revision history for this message
Phillip Susi (psusi) wrote :

Maybe someone more familiar with udev can help.

affects: udisks2 (Ubuntu) → udev (Ubuntu)
affects: udev (Ubuntu) → systemd (Ubuntu)
Revision history for this message
Frédéric V. (vfrederix) wrote :

I found a partial workaround to this problem:

The solution has been tested under Ubuntu 14.04 and should work also on more recent versions of Ubuntu.

This solution works only for the cheap Teac USB floppy controllers (for other usb controllers you will maybe have to adapt the solution yourself):

In the terminal simply type lsscsi (if it's not installed type sudo apt-get install lsscsi):

Output: [6:0:0:0] disk TEAC USB UF000x 0.00

If you don't see TEAC and USB UF000x when the floppy drive is connected, this solution is not for you.

Create this file with administrative privileges : /etc/udev/rules.d/00-teacfloppy.rules

Paste in this line:

ACTION=="add", SUBSYSTEM=="block", ATTR{removable}=="1", ATTRS{idVendor}=="0644", ATTRS{idProduct}=="0000", ATTR{events_poll_msecs}="-1"

Save and reboot.

The drive will seek for a few seconds then the motor will quickly stop.

Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.