[Touch-packages] [Bug 1168742] Re: [udev] Disks are not unmounted when physical eject button is used
@Peter Bennett Ok, I finally managed to test this with CDs and worked out the problem. This was a fault in my shell script. The test line in the script should be 'if [ "$n" -ne '0' ];then umount /dev/sr0;fi'. Note the command should have been 'umount' not 'eject'. Complete solution taking the above into account: sudo apt-get install dvd+rw-tools echo 'KERNEL=="sr0", ACTION=="change", RUN+="/usr/local/bin/sr0_change.sh"' | sudo tee /etc/udev/rules.d/61-sr0-change.rules cat << 'EOF' | sudo tee /usr/local/bin/sr0_change.sh #!/bin/sh dvd+rw-mediainfo /dev/sr0 > /dev/null n=$? if [ "$n" -ne '0' ];then umount /dev/sr0;fi EOF sudo chmod +x /usr/local/bin/sr0_change.sh sudo reboot -- 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: Fix Released 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: USERPID 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= 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-firmware1.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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1168742] Re: [udev] Disks are not unmounted when physical eject button is used
@ Peter Bennet (comment #30) Sorry, I don't use Video CD's so I can't check what the problem is - presumably 'dvd-rw-mediainfo' doesn't recognise Video CD's and produces an error of some kind. You could try running 'dvd-rw-mediainfo /dev/sr0; echo "status = $?"' while a Video CD is in the drive to see what exit status dvd-rw-mediainfo returns, and modify the 'sr0_change.sh' script condition to ignore that exit status value, assuming that exit status is unique for Video CDs (if it's a general exit status, then ignore this suggestion): 'if [ "$n" -ne '0' ] && [ "$n" -ne '' ] ;then eject /dev/sr0;fi @ Robert M. Muncrief (comment #31) I agree, this is the sort of functionality that should work out of the box without fail. At the moment it sends the same old Linux subtext of 'geeks only need apply'. I've set up lots of Linux systems for complete newbies, and they've used them quite happily, but if I hadn't been there to work around some of these issues they would never have got started. -- 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: Fix Released 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: USERPID 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= 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-firmware1.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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1168742] Re: [udev] Disks are not unmounted when physical eject button is used
The bug is still present in a new install of Xubuntu 16.04 (and presumably all the other *buntus using systemd 229), and this workaround still works: sudo apt-get install dvd+rw-tools echo 'KERNEL=="sr0", ACTION=="change", RUN+="/usr/local/bin/sr0_change.sh"' | sudo tee /etc/udev/rules.d/61-sr0-change.rules cat << 'EOF' | sudo tee /usr/local/bin/sr0_change.sh #!/bin/sh dvd+rw-mediainfo /dev/sr0 > /dev/null n=$? if [ "$n" -ne '0' ];then eject /dev/sr0;fi EOF sudo chmod +x /usr/local/bin/sr0_change.sh sudo reboot -- 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: Fix Released 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: USERPID 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= 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-firmware1.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 -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp