[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
There is no robust way how udisks could do this, but on the upstream systemd list we discussed how to do this cleanup under systemd. For udev under upstart there is a hack to call "eject" instead of "cdrom_id --eject" in the udev rule for the eject request, but this relies on udev not running under an unshared mount namespace (i. e. a patch we have in Debian/Ubuntu). I'll look into fixing this the proper way. ** Package changed: udisks2 (Ubuntu) => systemd (Ubuntu) ** Changed in: systemd (Ubuntu) Status: Confirmed => Triaged ** Summary changed: - Disks are not unmounted when physical eject button is used + [udev] Disks are not unmounted when physical eject button is used -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: [udev] Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
** Tags added: trusty -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[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 Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
Further again to my #10 comment: My apologies, the shell script '/usr/local/bin/sr0_change.sh' above posted only works for dvd media. The following should (?) work for other media (eg. audio CDs) as well: #!/bin/sh dvd+rw-mediainfo /dev/sr0 > /dev/null n=$? if [ "$n" -eq '251' ];then eject /dev/sr0;fi -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
Further to my #10 comment, I forgot to point out that the utility 'dvd +rw-mediainfo' is in the package 'dvd+rw-tools' in the Ubuntu repositories. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
After trawling the internet for possible solutions, I have put together a kludgey script workaround to automatically unmount a dvd when it's ejected via the dvd drive eject button. This kludge assumes the dvd drive is /dev/sr0 and the shell script uses /bin/sh; customise according to your system configuration. It uses the utility 'dvd+rw-mediainfo'. 1. Create a udev rules file '/etc/udev/rules.d/61-sr0-change.rules' and add the line: KERNEL=="sr0", ACTION=="change", RUN+="/usr/local/bin/sr0_change.sh" and save the file. 2. Create a shell script '/usr/local/bin/sr0_change.sh'. Add the following lines: #!/bin/sh dvd+rw-mediainfo /dev/sr0 > /dev/null n=$? if [ "$n" -ne '0' ];then eject /dev/sr0;fi 3. Save the shell script file and change the file permissions to make it executable. That's it. It's ugly, but it works on my system. I hope it helps. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
This bug is still present in Ubuntu 14.04 3.13.0-32-generic (both 32bit and 64bit). This makes Ubuntu and derivatives problematic for newbie users who expect cd/dvd ejection to just work as it does in Windows. Having to manually unmount the drive before inserting another disc is a poor solution. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
Confirmed on Ubuntu 13.04 64bit (3.8.0-33-generic). What a PITA bug, I was backing up my family video dvds using dd command and noticed that the size of the images is always the same. I eventually tried playing and iso file and of course some of the chapters weren't playing. No workaround yet other than using "eject" button in Nautilus? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
Confirmed on Ubuntu Gnome 13.04 64-bit (3.8.0-32-generic) It causes all kinds of DVD playback problems see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/404472?comments=all -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
I confirm this problem -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: udisks2 (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
** Package changed: linux (Ubuntu) => udisks2 (Ubuntu) ** Changed in: udisks2 (Ubuntu) Status: Confirmed => New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
Tested it with the daily build of the 3.9 kernel, and the bug still exists. I've added the kernel-bug-exists-upstream tag and changed the status. ** Tags added: kernel-bug-exists-upstream ** Changed in: linux (Ubuntu) Status: Incomplete => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1168742] Re: Disks are not unmounted when physical eject button is used
Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.9 kernel[0]. You will need to install both the linux-image and linux- image-extra .deb packages. If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'. If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'. If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'. Once testing of the upstream kernel is complete, please mark this bug as "Confirmed". Thanks in advance. [0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9-rc7-raring/ ** Changed in: linux (Ubuntu) Importance: Undecided => Medium ** Changed in: linux (Ubuntu) Status: Confirmed => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1168742 Title: Disks are not unmounted when physical eject button is used To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1168742/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs