https://bugs.kde.org/show_bug.cgi?id=293906

--- Comment #28 from antonio <antde...@gmail.com> ---
While waiting for the problem to be solved I have adopted a temporary solution:

1-created a file "/etc/udev/rules.d/99-usbdisk-nopoweroff.rules"
        SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_TYPE}=="disk",
ENV{ID_BUS}=="usb|ata", ENV{ID_USB_TYPE}="disk", ENV{ID_USB_SERIAL_SHORT}!="",
ENV{UDISKS_CAN_POWER_OFF}="0", RUN+="/bin/sh -c 'echo %p > /etc/mobile.device'"

2-restart udev:
        sudo systemctl restart udev

3-create shortcut F12 key:
        "ResetUSB"
        /usr/bin/sudo /bin/bash -c 'usb="$(IFS="/"; set -- $(/bin/cat
/etc/mobile.device); for usb in $@; do [[ "$usb" =~ ^usb ]] &&  echo $usb &&
break; done)"; echo "$usb" > /sys/bus/usb/drivers/usb/unbind; echo "$usb" >
/sys/bus/usb/drivers/usb/bind'

Now, when the disk is no longer visible, I press F12 to turn off and on the
affected USB port, and the external USB disk becomes visible again. If it can
be useful to someone.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to