GlowInTheDark
Posts: 667
Joined: Sat Nov 09, 2019 12:14 pm

How to disable the "You have removed it without ejecting it" message?

Mon Jun 29, 2020 4:51 pm

I am running the usual desktop, with Buster OS.

I insert a USB drive; it automounts.

From the Terminal (command line), I work with the contents of the drive, then use "umount" to unmount it.

Then I unplug the drive from the Pi and a message pops up onscreen telling me that I have removed it without ejecting it. Obviously, it doesn't know (or is pretending not to know) that it was "umount"d before it was removed. This is obviously not a big deal, b/c the message is just annoying, but it's annoying that the message stays there for quite a while (at least 30 seconds) and can't be closed or dismissed.

Is there any way to prevent this message from appearing (*) ?

(*) No smartaleck answers like: Don't remove the drive without ejecting it. The point is that umount'ing it from the command line is certainly sufficient. There is just a disconnect (and, IMHO, a bug) in the GUI stuff that it doesn't figure out that the thing has been umount'd.

P.S. Another way to fix this is to set whatever setting it is that just turns off auto-mounting completely. I knew what setting it was once, but have since forgotten what it is/how to do this. But the point is I like that it auto-mounts; I just want to do my own umount'ing.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

User avatar
Imperf3kt
Posts: 3620
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: How to disable the "You have removed it without ejecting it" message?

Mon Jun 29, 2020 10:52 pm

Are you giving it sufficient time to flush its cache before removing it from the Pi?
55:55:44:44:4C
52:4C:52:42:41

User avatar
kerry_s
Posts: 758
Joined: Thu Jan 30, 2020 7:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Mon Jun 29, 2020 10:57 pm

have you gone into the file manager & unchecked auto mount?

GlowInTheDark
Posts: 667
Joined: Sat Nov 09, 2019 12:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Mon Jun 29, 2020 11:02 pm

kerry_s wrote:
Mon Jun 29, 2020 10:57 pm
have you gone into the file manager & unchecked auto mount?
Please re-read the original text of the post. Thank you.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

User avatar
kerry_s
Posts: 758
Joined: Thu Jan 30, 2020 7:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Mon Jun 29, 2020 11:20 pm

never mind, i'm multi-tasking. my attention is on the other monitor.

GlowInTheDark
Posts: 667
Joined: Sat Nov 09, 2019 12:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Tue Jun 30, 2020 12:22 am

Anyway, as I said, it is (merely) annoying, but I do think it is, ultimately, a bug.

No doubt, they expect that you'll either do things entirely by GUI or entirely by command line, and get upset at my "hybrid" approach.

There's probably just some daemon that you need to kill to make it stop doing this. Some daemon that monitors for USB removals...
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

User avatar
kerry_s
Posts: 758
Joined: Thu Jan 30, 2020 7:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Tue Jun 30, 2020 12:51 am

yeah, it's in " pcmanfm --desktop " i remember using it on 1 of my budgie installs to get auto mount as well as desktop icons.

GlowInTheDark
Posts: 667
Joined: Sat Nov 09, 2019 12:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Tue Jun 30, 2020 1:27 am

kerry_s wrote:
Tue Jun 30, 2020 12:51 am
yeah, it's in " pcmanfm --desktop " i remember using it on 1 of my budgie installs to get auto mount as well as desktop icons.
I'm sorry. I don't understand what you are saying here.

What is the antecedent of "it's" ?
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

pidd
Posts: 527
Joined: Fri May 29, 2020 8:29 pm
Location: Birkenhead, Wirral, UK
Contact: Website

Re: How to disable the "You have removed it without ejecting it" message?

Tue Jun 30, 2020 3:31 am

GlowInTheDark wrote:
Tue Jun 30, 2020 1:27 am
What is the antecedent of "it's" ?
" it's " = " it is "

GlowInTheDark
Posts: 667
Joined: Sat Nov 09, 2019 12:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Tue Jun 30, 2020 6:14 am

pidd wrote:
Tue Jun 30, 2020 3:31 am
GlowInTheDark wrote:
Tue Jun 30, 2020 1:27 am
What is the antecedent of "it's" ?
" it's " = " it is "
From: https://www.dictionary.com/browse/antecedent
Grammar. a word, phrase, or clause, usually a substantive, that is replaced by a pronoun or other substitute later, or occasionally earlier, in the same or in another, usually subsequent, sentence. In Jane lost a glove and she can't find it, Jane is the antecedent of she and glove is the antecedent of it.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

User avatar
HawaiianPi
Posts: 5829
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: How to disable the "You have removed it without ejecting it" message?

Tue Jun 30, 2020 6:45 am

Auto-mounting is handled by the file manager (pcmanfm). You can change it in the file manager's preferences settings.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

GlowInTheDark
Posts: 667
Joined: Sat Nov 09, 2019 12:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Tue Jun 30, 2020 7:20 am

This has (almost) nothing to do with auto-mounting.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

bjtheone
Posts: 857
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: How to disable the "You have removed it without ejecting it" message?

Tue Jun 30, 2020 2:49 pm

Will try and check tonight as I am running with Mate and Caja rather than pcmanfm. Definitely have automounting working. Will see what happens if I manually umount a stick then pull it. Curious if I have the same bug.

bjtheone
Posts: 857
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: How to disable the "You have removed it without ejecting it" message?

Wed Jul 01, 2020 12:53 am

Running Raspbian Lite + Mate, file manager is Caja, USB data sticks automount. If I use the "eject safely ..." menu pulldown in Caja or issue a "umount" command from a terminal, when I then remove the data stick there is no annoying and incorrect message.

That points to it potentially being an interaction with pcmanfm.

GlowInTheDark
Posts: 667
Joined: Sat Nov 09, 2019 12:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Wed Jul 01, 2020 1:00 am

Running Raspbian Lite + Mate, file manager is Caja, USB data sticks automount. If I use the "eject safely ..." menu pulldown in Caja or issue a "umount" command from a terminal, when I then remove the data stick there is no annoying and incorrect message.
Just to be clear: If you use the "eject safely menu pulldown", then OF COURSE you don't get the annoying message, because that what you're "supposed to" (in the behavioral normative sense) to do.

The consistent theme in this thread is that it gets out of whack (in standard Raspbian Buster OS) if you insert the stick, have it get automounted, then do a manual "umount", followed by a physical removal.

That said, it does seem like it is something in the "pcmanfm" program that is doing it.

P.S. I've since discovered that the message can be "clicked" away, by clicking on it. Annoyingly, it stays up (forever) unless/until you do click it.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

bjtheone
Posts: 857
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: How to disable the "You have removed it without ejecting it" message?

Wed Jul 01, 2020 9:07 pm

I am aware that using the GUI option to unmount it should not trigger the issue since that is the full monty GUI "is the expected and correct behaviour". I was just trying to provide all the info. The relevant bit is that Mate and Caja play nicely with umount and don't throw up bogus error messages.

What I am not entirely sure of is what is doing the automount, in a Raspbian Lite + Mate installs, since it plays nicely with cli umount commands.

While I have mucked about with various bits I have not installed anything that should change the automounter.

User avatar
kerry_s
Posts: 758
Joined: Thu Jan 30, 2020 7:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Wed Jul 01, 2020 9:50 pm

What I am not entirely sure of is what is doing the automount, in a Raspbian Lite + Mate installs, since it plays nicely with cli umount commands.
it's not that it's playing nicely, it just doesn't have the notification.

GlowInTheDark
Posts: 667
Joined: Sat Nov 09, 2019 12:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Wed Jul 01, 2020 10:06 pm

kerry_s wrote:
Wed Jul 01, 2020 9:50 pm
What I am not entirely sure of is what is doing the automount, in a Raspbian Lite + Mate installs, since it plays nicely with cli umount commands.
it's not that it's playing nicely, it just doesn't have the notification.
Assuming I am understanding you correctly, it doesn't *NEED* notification. All it needs is just before displaying the (bogus) error message, it should check to see if the thing is, in fact, and at this very moment, mounted. If not, then don't display the (bogus) error message.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

User avatar
kerry_s
Posts: 758
Joined: Thu Jan 30, 2020 7:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Wed Jul 01, 2020 10:29 pm

GlowInTheDark wrote:
Wed Jul 01, 2020 10:06 pm
kerry_s wrote:
Wed Jul 01, 2020 9:50 pm
What I am not entirely sure of is what is doing the automount, in a Raspbian Lite + Mate installs, since it plays nicely with cli umount commands.
it's not that it's playing nicely, it just doesn't have the notification.
Assuming I am understanding you correctly, it doesn't *NEED* notification. All it needs is just before displaying the (bogus) error message, it should check to see if the thing is, in fact, and at this very moment, mounted. If not, then don't display the (bogus) error message.
your assuming it is a " bogus " error, what if it's not? what if the daemon has it in memory & did not flush? leading to a memory leak, zombie process, corruption....

anyways, your device, your risk, do as you please, a computer is a dumb device that runs software the way it was programmed to. :D

GlowInTheDark
Posts: 667
Joined: Sat Nov 09, 2019 12:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Wed Jul 01, 2020 10:34 pm

You're totally missing the point.


Go back and re-read. Thank you.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

User avatar
kerry_s
Posts: 758
Joined: Thu Jan 30, 2020 7:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Wed Jul 01, 2020 10:47 pm

GlowInTheDark wrote:
Wed Jul 01, 2020 10:34 pm
You're totally missing the point.


Go back and re-read. Thank you.
what point? umount is a kernel thing, automount is a software thing, it's a system subsystem issue, like pulling the chair out from someone whose sitting on it.

anyways i'm done, have at it.

GlowInTheDark
Posts: 667
Joined: Sat Nov 09, 2019 12:14 pm

Re: How to disable the "You have removed it without ejecting it" message?

Thu Jul 02, 2020 12:32 am

anyways i'm done, have at it.
Oh, well. It was a pleasure doing business with you.


NOT!
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

User avatar
Imperf3kt
Posts: 3620
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: How to disable the "You have removed it without ejecting it" message?

Thu Jul 02, 2020 1:14 am

Which brings us back to
Imperf3kt wrote:
Mon Jun 29, 2020 10:52 pm
Are you giving it sufficient time to flush its cache before removing it from the Pi?
How long do you give it after unmounting before you remove it?
55:55:44:44:4C
52:4C:52:42:41

DarkElvenAngel
Posts: 796
Joined: Tue Mar 20, 2018 9:53 pm

Re: How to disable the "You have removed it without ejecting it" message?

Thu Jul 02, 2020 2:02 am

Imperf3kt wrote:
Thu Jul 02, 2020 1:14 am
Which brings us back to
Imperf3kt wrote:
Mon Jun 29, 2020 10:52 pm
Are you giving it sufficient time to flush its cache before removing it from the Pi?
How long do you give it after unmounting before you remove it?
I've seen this too it's very easy to replicate. Put a USB stick in it mounts then do a sudo umount and a sync and you still get the message. After sync returns you know the drive is safe to pull. But the GUI will still spit up the error message.

Your not alone GlowInTheDark I have no idea how to stop the notification other than just use the GUI or ignore it.

User avatar
jojopi
Posts: 3261
Joined: Tue Oct 11, 2011 8:38 pm

Re: How to disable the "You have removed it without ejecting it" message?

Thu Jul 02, 2020 3:33 am

I may be seeing slightly different behaviour. The popup message stays until clicked (and interferes with focus somewhat).

It appears even if I safely eject in the GUI. Even if I unplug while the "It is now safe to remove the device" message is visible. Even if automount is disabled and the device has never been mounted. Even if the device has no partition table or reports a size of zero, or no medium present.

It is a particularly nice touch that in most of these cases it is smart enough not to show the eject icon ("menu"?), but still remembers to complain when the device is removed. The eject icon also disappears very smartly following a CLI umount.

Source code here: https://github.com/raspberrypi-ui/lxplu ... /ejecter.c

So, what you want to do is edit /etc/xdg/lxpanel/LXDE-pi/panels/panel and comment out this bit:

Code: Select all

Plugin {
  type=ejecter
  Config {
    AutoHide=1
  }
}

Return to “Raspberry Pi OS”