Bug 393632

Summary: USB unmount should poweroff device too
Product: [Plasma] plasmashell Reporter: fademind
Component: Disks & DevicesAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: fademind
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:

Description fademind 2018-04-29 08:24:31 UTC
Issue:
After unmount external hdd via applet, device is not poweroff automatically. 

Workaround:
Using `udisksctl power-off -b /dev/sdb` and so on. For safety poweroff external hdd after unmount.

Please consider allow poweroff external HDD after unmount them via applet.

For now I using this code:

#!/usr/bin/env bash

if [ "$(id -u)" = "0" ]; then
   echo "This script must be run as normal user" 1>&2
   exit 1
fi

if [ -e /dev/sdb ] ; then
    udisksctl unmount --block-device /dev/sdb1
    udisksctl power-off -b /dev/sdb
fi

if [ -e /dev/sdc ] ; then
    udisksctl unmount --block-device /dev/sdc1
    udisksctl power-off -b /dev/sdc
fi

if [ -e /dev/sdd ] ; then
    udisksctl unmount --block-device /dev/sdd1
    udisksctl power-off -b /dev/sdd
fi

but should be able to power off device after unmount.

Regards
Comment 1 Christoph Feck 2018-04-29 12:46:20 UTC

*** This bug has been marked as a duplicate of bug 270808 ***