← Back to team overview

touch-packages team mailing list archive

[Bug 1168742] Re: [udev] Disks are not unmounted when physical eject button is used

 

Launchpad has imported 9 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=72206.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2013-12-01T18:48:57+00:00 Yyz82 wrote:

I have a problem with some media types: DVD+R DL, DVD-R, DVD+RW and
CD-R. Only audio CD works fine. I will explain...

audio cd (I think this is the correct behavior):
Insert the media in optical drive
the media is mounted and read without any problem
Press the optical device button to eject the audio cd
Nautilus automatically goes to home folder and the optical device icon disappears from nautilus left side and gnome-shell tray
insert other media type
the media is mounted and read without any problem again

DVD+R DL, DVD-R, DVD+RW and CD-R (annoying behavior)
insert the media
the media is mounted and read without any problem
press optical device button to eject the media
nautilus keeps showing the media content (???) and device icon on nautilus left side changes to "CD/DVD Drive"
insert other media immediately (except audio cd)
the system recognize the media because device icon name on nautilus changes to the media label (on gnome-shell tray is still "CD/DVD Drive"), but nautilus shows no file (???)
if I eject and reinsert the media using the optical device button I have the same result
I need eject the media using nautilus or gnome-shell icon to access the new media files


After eject problematic media I run below command

mount|grep sr0


My system says that the media is still mounted.
I insert other media and run the command again and it says that the previous media is mounted.  
My system is not umount/mount media correctly.

My optical device: BenQ DW1640 (IDE) with latest firmware (BSRB)
Thanks.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1168742/comments/9

------------------------------------------------------------------------
On 2014-01-16T16:52:00+00:00 Tbzatek wrote:

Created attachment 92238
[PATCH] Check if cdrom drive has media on cleanup

When cleanup is run, it is supposed to remove lingering mounts.
That probably works fine for card readers etc. since there's
a partition exposed for the drive but fails for optical media.
As a result, when mounted and user presses the drive eject
button, tray is ejected but mounts lives on.

This patch adds a special check for CDROM drives and looks for
active media.

--

The test is highly cdrom-specific and should not break anything else. On
the other hand, not sure if there are e.g. card readers not exposing the
"partition" device type, only presenting itself as a "disk". Haven't
tested that, my concern was a flash medium having no partition table,
used directly. Or, a ZIP drive (ATAPI vs. floppy mode) and such...

Reply at:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1168742/comments/10

------------------------------------------------------------------------
On 2014-01-16T17:08:55+00:00 Zeuthen wrote:

Hmm, I'm not sure this is the right fix so please don't commit it. I'll
try to reproduce this...

Reply at:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1168742/comments/11

------------------------------------------------------------------------
On 2014-01-20T16:52:20+00:00 Tbzatek wrote:

(In reply to comment #2)
> Hmm, I'm not sure this is the right fix so please don't commit it. I'll try
> to reproduce this...

Reproducing this is easy:
1. Insert CD/DVD media
2. Let Gnome/gvfs automount it (clean system, defaults)
3. Press the eject button on the drive
4. Watch the mount staying alive

Note that udisks cleanup routine properly registers the event, it's all
about matching the cleanup conditions.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1168742/comments/12

------------------------------------------------------------------------
On 2014-06-17T11:50:00+00:00 Lodgerz wrote:

I have the same problem. Can you solve please? Thanks.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1168742/comments/13

------------------------------------------------------------------------
On 2014-09-26T16:42:21+00:00 Lynx-light0 wrote:

Yes. This needs to be fixed.

See:

https://bugs.archlinux.org/task/42071

Reply at:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1168742/comments/18

------------------------------------------------------------------------
On 2014-09-29T13:25:57+00:00 Tbzatek wrote:

*** Bug 84374 has been marked as a duplicate of this bug. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1168742/comments/19

------------------------------------------------------------------------
On 2014-10-05T09:17:42+00:00 Lynx-light0 wrote:

(In reply to Tomas Bzatek from comment #3)
> (In reply to comment #2)
> > Hmm, I'm not sure this is the right fix so please don't commit it. I'll try
> > to reproduce this...
> 
> Reproducing this is easy:
> 1. Insert CD/DVD media
> 2. Let Gnome/gvfs automount it (clean system, defaults)
> 3. Press the eject button on the drive
> 4. Watch the mount staying alive
> 
> Note that udisks cleanup routine properly registers the event, it's all
> about matching the cleanup conditions.

Thomas: can you not commit your patch? This is a much needed fix, and,
even if your fix is not perfect, there has been no movement towards
improvement in over 6 months.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1168742/comments/20

------------------------------------------------------------------------
On 2015-01-28T13:12:07+00:00 Martin Pitt wrote:

This was discussed recently on the systemd (udev) mailing list:

http://lists.freedesktop.org/archives/systemd-devel/2015-January/026948.html
http://lists.freedesktop.org/archives/systemd-devel/2015-January/027403.html

After a lot of back and forth, it was decided that the most robust fix
under systemd is

http://lists.freedesktop.org/archives/systemd-
devel/2015-January/027577.html

For the record, for distros without systemd it is easiest to adjust
/lib/udev/rules.d/60-cdrom_id.rules like this:

-ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end"
+ENV{DISK_EJECT_REQUEST}=="?*", RUN+="/usr/bin/eject $devnode", GOTO="cdrom_end"

Reply at:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1168742/comments/23


** Changed in: systemd
       Status: Unknown => Confirmed

** Changed in: systemd
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1168742

Title:
  [udev] Disks are not unmounted when physical eject button is used

Status in systemd:
  Confirmed
Status in systemd package in Ubuntu:
  In Progress

Bug description:
  In 13.04, disks (DVDs, CDS) are not unmounted when ejected via the
  hardware button on the drive. After ejecting disks via the hardware
  button, an entry for the disk still shows up in the file manager, and
  shows when I run df. If I do a soft eject (ie from the right click
  menu from the icon on the launcher), however, everything works
  properly.

  Just as a note, as per
  https://wiki.ubuntu.com/Bugs/FindRightPackage#Hardware_Malfunctions, I
  attempted to report this using ubuntu-bug storage, however there is
  not an option dealing with unmounting devices, and clicking other
  tells you that you should run ubuntu-bug again with a specific package
  name. In an attempt to get this to a semi-relevant audience, I ended
  up just saying that a disk wasn't auto-mounted, clicking through the
  next few popups, and ended up here. If this isn't the right place to
  report this bug, I apologize.

  ProblemType: Bug
  DistroRelease: Ubuntu 13.04
  Package: linux-image-3.8.0-17-generic 3.8.0-17.27
  ProcVersionSignature: Ubuntu 3.8.0-17.27-generic 3.8.6
  Uname: Linux 3.8.0-17-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 2.9.2-0ubuntu8
  Architecture: amd64
  AudioDevicesInUse:
   USER        PID ACCESS COMMAND
   /dev/snd/controlC1:  chris      1590 F.... pulseaudio
   /dev/snd/controlC0:  chris      1590 F.... pulseaudio
  Date: Sat Apr 13 12:54:33 2013
  GvfsMonitorLog: Monitoring events. Press Ctrl+C to quit.
  HibernationDevice: RESUME=UUID=bd2c881c-7bf8-4996-8b05-7efbd9852333
  HotplugNewDevices:

  HotplugNewMounts:

  InstallationDate: Installed on 2013-03-26 (18 days ago)
  InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Alpha amd64 (20130325)
  MachineType: ASUSTeK COMPUTER INC. G55VW
  MarkForUpload: True
  ProcEnviron:
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcFB:

  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.8.0-17-generic root=UUID=f44b6481-8a06-4cf1-a494-0e4c233720c8 ro quiet splash
  RelatedPackageVersions:
   linux-restricted-modules-3.8.0-17-generic N/A
   linux-backports-modules-3.8.0-17-generic  N/A
   linux-firmware                            1.105
  SourcePackage: linux
  Symptom: storage
  UdevMonitorLog:
   monitor will print the received events for:
   UDEV - the event which udev sends out after rule processing
  UdisksMonitorLog:
   Monitoring the udisks daemon. Press Ctrl+C to exit.
   12:54:42.343: The udisks-daemon is running (name-owner :1.39).
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 04/05/2012
  dmi.bios.vendor: American Megatrends Inc.
  dmi.bios.version: G55VW.206
  dmi.board.asset.tag: ATN12345678901234567
  dmi.board.name: G55VW
  dmi.board.vendor: ASUSTeK COMPUTER INC.
  dmi.board.version: 1.0
  dmi.chassis.asset.tag: No Asset Tag
  dmi.chassis.type: 10
  dmi.chassis.vendor: ASUSTeK COMPUTER INC.
  dmi.chassis.version: 1.0
  dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrG55VW.206:bd04/05/2012:svnASUSTeKCOMPUTERINC.:pnG55VW:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnG55VW:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
  dmi.product.name: G55VW
  dmi.product.version: 1.0
  dmi.sys.vendor: ASUSTeK COMPUTER INC.

To manage notifications about this bug go to:
https://bugs.launchpad.net/systemd/+bug/1168742/+subscriptions