[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2022-04-22 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=402660

Nate Graham  changed:

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
   Severity|major   |wishlist
   Priority|NOR |HI
 Resolution|--- |DUPLICATE

--- Comment #40 from Nate Graham  ---
So to do this, we need changes in a few places:

- The Device Notifier and Solid framework, to fix Bug 293906.
- KIO framework, to fix Bug 405979.

I've done some re-arranging so that the bugzilla tickets reflect this.

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

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2022-04-21 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=402660

ak...@iname.com changed:

   What|Removed |Added

 CC||ak...@iname.com

--- Comment #39 from ak...@iname.com ---
Could you add an umount option next to safely remove so people could choose
which function to use?

I'm mainly looking for this function so that I could umount usb sticks and not
have to re-plug them in if
I wanted to manage the stick's partition table.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2021-01-14 Thread soredake
https://bugs.kde.org/show_bug.cgi?id=402660

soredake  changed:

   What|Removed |Added

 CC||ndrzj1...@relay.firefox.com

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2020-08-06 Thread Mihai Sorin Dobrescu
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #38 from Mihai Sorin Dobrescu  ---
An idea: what if the devices under same controller are grouped under a tree
node and a device can be mounted/unmounted by clicking on it's button and the
controller itself by clicking on it's own button?
What if that controller would eject all its children, if possible (if they are
in use, is expected not to, for example)?

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2020-01-12 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=402660

Nate Graham  changed:

   What|Removed |Added

 CC||ro...@kde.org

--- Comment #37 from Nate Graham  ---
*** Bug 334429 has been marked as a duplicate of this bug. ***

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2020-01-12 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=402660

Nate Graham  changed:

   What|Removed |Added

   Keywords||usability
 Status|REPORTED|CONFIRMED
 Ever confirmed|0   |1

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-12-13 Thread Mihai Sorin Dobrescu
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #36 from Mihai Sorin Dobrescu  ---
Well, the most annoying is, I realize now, when I need to scan a disk - so it
goes away at unmount.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-12-06 Thread Stuart K. Smith
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #35 from Stuart K. Smith  ---
Still not resolved.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-12-06 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #34 from Christoph Feck  ---
*** Bug 414906 has been marked as a duplicate of this bug. ***

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-04-10 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #33 from David Edmundson  ---
FWIW, I withdraw my original comment in #5

>From the kernel ioctl udisks calls

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=253e05724f9230910344357b1142ad8642ff9f5a

it very much affects usb devices.

I'm happy to admit that kernel and udisks people know way more than me when it
comes to this sort of thing.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-04-10 Thread Stuart K. Smith
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #32 from Stuart K. Smith  ---
Mihai Sorin Dobrescu: I totally got what you meant and my comment wasn't
pointed at you. Rather, I was try to illustrate a broader point that different
devices needs different actions and the terms are important because of that.
Using "Safely Eject" obfuscates the actual needed action and is part of the
problem in my view.

Christoph Feck: Precisely and exactly to the issue. There are many uses for the
Notifier when controlling USB storage devices and there is no "one size fits
all" solution. Fully ejecting a non-spinning device in unwarranted and in many
cases very inconvenient.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-04-09 Thread Mihai Sorin Dobrescu
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #31 from Mihai Sorin Dobrescu  ---
(In reply to Stuart K. Smith from comment #26)
Right, sorry I was careless about terminology, this discussion began after all
from the wonderful Linux flexibility of mounting and unmounting disks so blamed
by the initial DE users, but you know what I've meant.
I have never had multiple partitions for the disks I need to handle like this,
but indeed, having this feature for them at partition level is very important
also.

(In reply to Christoph Feck from comment #30)
I need primarily this for hard disks, but what about sticks? Sometimes
unmounting only is needed, especially for backing them up before making some
bootable stick with some tool that requires unmounting it? Is this possible?

Assuring the safe unmount is very important, generally speaking. Remember
Windows initial stick eject that corrupted the filesystem. How safely can these
be unmounted?

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-04-09 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #30 from Christoph Feck  ---
hdparm is for spinning disks. It doesn't unmount, but sends a direct IDE/SATA
command to the disk.

Different needs for different device types...

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-04-09 Thread Stuart K. Smith
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #29 from Stuart K. Smith  ---
That doesn't seem to work here, at least not with a USB stick:

sudo hdparm -y /dev/sdi
[sudo] password for stuart: 

/dev/sdi:
 issuing standby command
SG_IO: bad/missing sense data, sb[]:  f0 00 05 00 00 00 00 14 00 00 00 00 20 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

The drive is still mounted after this and unmounting first has the same
results.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-04-09 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #28 from Christoph Feck  ---
People have long requested to power-down-on-remove, see bug 270808. The problem
is the way the power-down is done. May be an udisk2 bug.

When I use the 'hdparm -y /dev/sdX' command, the disk is powered down, but it
is still visible in /dev, so that it can be remounted later without an
unplug/replug cycle.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-04-09 Thread Stuart K. Smith
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #27 from Stuart K. Smith  ---
Thinking it over, what I would like to see is;

If the USB storage device is a CD/DVD/BR, "Eject" is the default action.

If the device is a USB attached file system but not a CD/DVD/BR, then set
"Unmount all file systems on this device" as default action, and offer "Unmount
only this file system" as an action in the list for the device.

Then if you want to unmount and grab your thumb drive or USB hard drive, the
default is perfect. If you are continuing to work with a multi-file system USB
device, then you can select and specify which file system to unmount (or
mount).

In both cases, the device remains accessible because it has not been powered
off by Eject.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-04-09 Thread Stuart K. Smith
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #26 from Stuart K. Smith  ---
Agreed, however in the case of USB thumb drive, unmounting forces commit or it
won't unmount until cache is clear. It least that's my belief. IME I can't
unmount any file system until it's not being used.

Part of the issue might be the understanding of eject vs. unmount. A file
system is unmounted, but not ever "ejected". A device may be ejected, but only
cleanly if it has been unmounted prior.

A device, like a USB thumb drive or USB hard drive is never really in need of
"Eject" because once the file system(s) on it are unmounted you can just pull
it out.

This is where this whole mess started. Someone had multiple file systems on a
USB device and failed to unmount one or more of them before pulling the plug.
This could cause a file corruption if a write were not complete. This potential
outweighed (at least in some persons minds) the inconvenience to the thousands
of users just a thumb drive.

In my mind, the best possible solution for USB r/w storage devices is an
"unmount all" condition where all file systems on the device are unmounted.
"Eject" does this conveniently enough but then you end up where we are -
pulling a re-inserting the device. 

Seems like an expansion of the Notifier actions in this regard is in order.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-04-09 Thread Mihai Sorin Dobrescu
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #25 from Mihai Sorin Dobrescu  ---
For me there is one more thing important: to be able to eject "logically" with
the insurance of data fully written on it. Then to be able to eject it for
"physical" eject - unplug, with the insurance of data fully written on it (as
it is now). Don't know if there are cases when somebody wouldn't want to commit
the writes. Is there any?

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-04-09 Thread Stuart K. Smith
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #24 from Stuart K. Smith  ---
There seems to be a lot of rambling on this bug report about loosely related
topics. My issue is that a USB device should not have to be unplugged and
re-inserted by design. That is a very poor working practice. You should be able
to choose or default to Unmount rather than Eject (aka "Safely Remove") devices
that do not require ejection.

Is there no way for the programming of the Device Notifier to detect if a
plugged in device is a spinning hard drive vs. a USB thumb drive? BTW, my WD
USB spinning hard drive does not need to be "parked" to be removed.

This effectively make Notifier mostly useless for USB thumb drives. If I have
to go to the command line so I don't have to reach behind my monitor or PC case
to unplug and reinsert my USB drive, then why have the GUI Notifier?

At a minimum, "Unmount" should be in the options available and at best be the
default choice when clicking the up arrow in Notifier. I'd bet that there are
oodles more thumb drives being used than portable hard drives. Let the lesser
sized user group have the extra "Fully Eject" option available in the action
list but make Unmount the option. Seems way more logical to me.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-04-09 Thread Kai Uwe Broulik
https://bugs.kde.org/show_bug.cgi?id=402660

Kai Uwe Broulik  changed:

   What|Removed |Added

 CC||stuartksm...@gmail.com

--- Comment #23 from Kai Uwe Broulik  ---
*** Bug 406362 has been marked as a duplicate of this bug. ***

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-03-29 Thread Patrick Silva
https://bugs.kde.org/show_bug.cgi?id=402660

Patrick Silva  changed:

   What|Removed |Added

 CC||ash...@linuxcomp.ru

--- Comment #22 from Patrick Silva  ---
*** Bug 405979 has been marked as a duplicate of this bug. ***

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-03-24 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=402660

Christoph Feck  changed:

   What|Removed |Added

 CC||torokhov_...@mail.ru

--- Comment #21 from Christoph Feck  ---
*** Bug 293906 has been marked as a duplicate of this bug. ***

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-03-24 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=402660

Christoph Feck  changed:

   What|Removed |Added

 CC||p...@gmx.de

--- Comment #20 from Christoph Feck  ---
*** Bug 404946 has been marked as a duplicate of this bug. ***

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-03-18 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=402660

Nate Graham  changed:

   What|Removed |Added

 CC||cf...@kde.org

--- Comment #19 from Nate Graham  ---
*** Bug 405617 has been marked as a duplicate of this bug. ***

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-02-09 Thread Mihai Sorin Dobrescu
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #18 from Mihai Sorin Dobrescu  ---
One more question: Assuming I have a multiple disk enclosure, mounting two
disks, ejecting disk A, then B, will flush and ensure the disk A (first
ejected) is in the full written state too, along with the last ejected disk?

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-02-03 Thread Mihai Sorin Dobrescu
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #17 from Mihai Sorin Dobrescu  ---
I have a supplemental issue related to this.
Some disks go to sleep after a while (WD Green type).
At this point, I can't revive them unless a power down them occurs. 
At this point, the disks are mounted from the OS point of view. Trying to eject
them or system shutdown/reboot will try to eject and power them down
indefinitely, as they are already powered down or sleeping (?). This is a mess.
Don't know if it is possible to raise some event when the hardware goes to
sleep, though.
Another problematic situation is when a disk goes to sleep and the system seems
to "think" the disk is available. You have apparently a woken up disk, Dolphin
can browse on it as long as it has a cache of the file system until you try to
operate on it, like copying or moving files. Then KDE becomes pretty much
stalled. No new mounts can be done, complaining to have not available D-Bus
resources anymore for that. Dolphin starts having trouble. But not Gnome's file
manager, not the GTK based apps (like EasyTag). VLC works too. But even the
KDE/Plasma Desktop might become unresponsive. I don't know how much of thesee
can be fixed, but it should improve KDE as much as possible.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-01-20 Thread Mihai Sorin Dobrescu
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #16 from Mihai Sorin Dobrescu  ---
Backend functionality is important for the reason of the current behaviour, but
I think the mounting unavailability is the main issue for the user. Thinking of
not IT related persons, they won't even care and understand the technical
background. So it is pretty much the same bug from the user experience point of
view. A reliable technical solution is a must.
Discussing the configuration, as Sabayon user I am not comfortable with the
workaround of editing configuration files because my distro updates them from
time to time and becomes a pain to run a diff and conceal that.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-01-20 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #15 from Nate Graham  ---
Similar, but not actually the same issue. That one's about the display in the
Devices Notifier Widget, but this bug is about what's going on on the backend.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2019-01-20 Thread Patrick Silva
https://bugs.kde.org/show_bug.cgi?id=402660

Patrick Silva  changed:

   What|Removed |Added

 CC||bugsefor...@gmx.com

--- Comment #14 from Patrick Silva  ---
duplicate of bug 293906

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2018-12-29 Thread Mihai Sorin Dobrescu
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #13 from Mihai Sorin Dobrescu  ---
A new question, after thinking at the power down vs. keeping it online by
simply unmounting. I see two cases:
- power on the enclosure, the available disks are listed, not yet mounted
- mount at least two by pressing the "arrow down" button
- case I: press the "arrow up" button and ... what happens? The disk is
unmounted for sure, not powered down, it is still listed and could be mounted
again
- if it is the case repeat the above action until there is only one drive
mounted left
- case II: press the "arrow up" button and, being the last mounted drive, the
power down is triggered. What is the state of the before unmounted drives? Were
they safely powered down too or not?

I have several scenarios when I need to mount/unmount freely (like when I
unmount them to scan them with a tool like gparted), but not want to power them
down.

At the end of operating with them, I clearly need to power them down all,
safely.

Most important, in the both cases, flushing their streams expressingly is
mandatory.

Definitely, both features are needed.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2018-12-29 Thread Mihai Sorin Dobrescu
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #12 from Mihai Sorin Dobrescu  ---
Tell that to a simple user. Even though would go in that config, the content
will scare him. Some option should be in the UI.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2018-12-29 Thread Stefan Brüns
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #11 from Stefan Brüns  ---
(In reply to Mihai Sorin Dobrescu from comment #9)
> Right, still, had no corruption before - was there an other method?
> Still, I need to mount/unmount separately than powering off.
> As any other disk or data storage.
> And I have one tat I can never eject without powering off the system. Why?

The unmounting *always* flushes the buffers from the operating system. The
drive will also eventually flush its internal buffers.

A drive which supports eject should flush its internal buffers in the drive
before actually ejecting the medium (safe any firmware bugs).

If the driver does not support ejecting, it is explicitly told to flush the
buffers and to stop *by UDisks*. This makes sure the heads are in the park
position. Without power down, the disk is still spinning, and the heads may be
flying above the platters.

You can use the UDISKS_CAN_POWER_OFF udev property to disable power down.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2018-12-29 Thread Mihai Sorin Dobrescu
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #10 from Mihai Sorin Dobrescu  ---
Also, "then requesting that in-flight buffers and caches are committed to
stable storage" should be done on any unmount or whatever similar operation,
not for powering down only. If the data stream is cut, should be cut in a safe
way.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2018-12-29 Thread Mihai Sorin Dobrescu
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #9 from Mihai Sorin Dobrescu  ---
Right, still, had no corruption before - was there an other method?
Still, I need to mount/unmount separately than powering off.
As any other disk or data storage.
And I have one tat I can never eject without powering off the system. Why?

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2018-12-29 Thread Stefan Brüns
https://bugs.kde.org/show_bug.cgi?id=402660

--- Comment #8 from Stefan Brüns  ---
(In reply to David Edmundson from comment #5)
> @Nate
> 
> "
> . For drives connected through USB, the effect is that the USB device will
> be deconfigured followed by disabling the upstream hub port it is connected
> to."
> 
> Which won't park the head or anything it just kills the data stream.
> 
> Instead what we actually want is to send an ATA command:
> http://storaged.org/doc/udisks2-api/latest/gdbus-org.freedesktop.UDisks2.
> Drive.Ata.html
> 
> Setting PmStandby would solve this case here as we still have a data
> connection whilst probably doing a better job of handling the hard disk case.
> 
> Is there a reason to power off?

Why are you omitting the part immediately leading your quote?

---
Arranges for the drive to be safely removed and powered off. On the OS side
this includes ensuring that no process is using the drive, then requesting that
in-flight buffers and caches are committed to stable storage. The exact steps
for powering off the drive depends on the drive itself and the interconnect
used.
---

It is not the job of solid to reinvent proper device handling, but communicate
with the operating system and its helpers.

If the power down sequence is not implemented properly in UDisks2, it would be
a bug in UDisks2, or possibly in the kernel.

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

[frameworks-solid] [Bug 402660] Device notifier clears a device after unmount, but before unplug

2018-12-28 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=402660

Nate Graham  changed:

   What|Removed |Added

 Status|RESOLVED|REPORTED
Version|master  |5.53.0
   Assignee|plasma-b...@kde.org |lu...@kde.org
 CC||kdelibs-b...@kde.org
   Target Milestone|1.0 |---
 Resolution|INTENTIONAL |---
Product|plasmashell |frameworks-solid
  Component|Device Notifier |general

--- Comment #7 from Nate Graham  ---
These are great questions for Stefan Brüns, who implemented the feature in
question and is much more knowledgeable about the technical details of how
Solid interacts with hard disks.

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