Bug 340582 - "Free Space Notifier" should also report full root
Summary: "Free Space Notifier" should also report full root
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.11.5
Platform: unspecified Linux
: HI wishlist
Target Milestone: 1.0
Assignee: David Edmundson
Keywords: usability
: 240863 369610 384394 (view as bug list)
Depends on:
Reported: 2014-11-02 19:53 UTC by Gregor Mi
Modified: 2020-05-18 11:23 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.20.0


Note You need to log in before you can comment on or make changes to this bug.
Description Gregor Mi 2014-11-02 19:53:33 UTC
Current situation:
the "Free space notifier" (systemsetting -> system admin -> startup & shutdown -> service manager -> startup services,
see also https://forum.kde.org/viewtopic.php?f=22&t=100802) only works for the home dir.

Make Free Space Notifier also report nearly full root dir because a full root can lead to failing of system package upgrades, crashing KDE and other things, see also https://bugs.kde.org/show_bug.cgi?id=240863

Initial discussion was on KDE Usability Project <kde-usability@kde.org> started with:
Subject: [KDE Usability] Show warning when disk space on root (/) is low
Date: Tue, 01 Jul 2014 20:39:51 +0200

Reproducible: Always
Comment 1 Ivo Anjo 2014-11-03 14:42:57 UTC
*** Bug 240863 has been marked as a duplicate of this bug. ***
Comment 2 Gregor Mi 2016-10-01 16:30:09 UTC
*** Bug 369610 has been marked as a duplicate of this bug. ***
Comment 3 Gregor Mi 2018-01-28 11:24:55 UTC
Recently, I ran into a full root partition problem (due to openSUSE's snapper tool). I changed the product of this ticket from "kde" to "plasmashell", because "Free Space Notifier" is listed in "Background Services" which is a System Settings Module.
Comment 4 Nate Graham 2018-09-27 19:25:40 UTC
*** Bug 384394 has been marked as a duplicate of this bug. ***
Comment 5 Kai Uwe Broulik 2020-05-15 09:21:13 UTC
Feel free to give it a test: https://phabricator.kde.org/D29770
Comment 6 Kai Uwe Broulik 2020-05-18 11:23:15 UTC
Git commit 97e843d3ead33fc8f376fe08040fa1f923b831e6 by Kai Uwe Broulik.
Committed on 18/05/2020 at 11:21.
Pushed by broulik into branch 'master'.

[Free Space Notifer] Use critical notification instead of tray icon and monitor Root, too

This refactors the free space notifier module to use a critical (i.e. persistent and always on top) notification for warning of low disk space.
The, albeit blinking, tray icon is easy to miss, especially when you're running a full screen terminal, which I typically do while compiling stuff.
It now also monitors the Root folder, if it's on a separate partition from the user's home. Furthermore, Filelight is offered to explore the drive (if installed).

The overall warning logic remains pretty much the same:

* Once the drive goes below the configured threshold a warning notification is shown, it stays on screen until dismissed by the user or
  when free space is above warning threshold again.
* The notification is emitted again when free space drops below half the previous threshold, for added sense of urgency should the drive
  be rapidly filled up
* The notification is also emitted again if free space remains below the threshold for more than one hour

(It will only emit again when it was closed, obviously, so you won't end up with a tonne of popups after a few hours ;)

I don't think this needs to be separately configurable for Home and Root, since the default threshold is like 200 MiB (it's not a configured
percentage), so the absolute free space it warns about will be the same, even if your Home is giant compared to Root.
FIXED-IN: 5.20.0

Differential Revision: https://phabricator.kde.org/D29770

M  +4    -1    freespacenotifier/CMakeLists.txt
M  +76   -168  freespacenotifier/freespacenotifier.cpp
M  +23   -18   freespacenotifier/freespacenotifier.h
M  +1    -0    freespacenotifier/freespacenotifier.notifyrc
M  +62   -0    freespacenotifier/module.cpp
M  +3    -1    freespacenotifier/module.h