← Back to team overview

desktop-packages team mailing list archive

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

 

Update to Phil Wright solution, for a more general context

1 - Create a udev rules file '/etc/udev/rules.d/61-sr-change.rules' and
add the line :

KERNEL=="sr*", ACTION=="change", RUN+="/usr/local/bin/sr_change.sh %n"

2 - And create the script '/usr/local/bin/sr_change.sh' :

#!/bin/sh
 
if [ $# -eq 1 ]
then
        source=/dev/sr$1
else
        source=/dev/sr0
fi

dvd+rw-mediainfo $source > /dev/null
n=$?

 if [ "$n" -eq '251' ]  then 
        umount $source
 fi
exit 0

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to udisks2 in Ubuntu.
https://bugs.launchpad.net/bugs/1168742

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

Status in “udisks2” package in Ubuntu:
  Confirmed

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/ubuntu/+source/udisks2/+bug/1168742/+subscriptions