mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-25 17:20:12 +01:00
Increase UP_DAEMON_SWAP_WATERLINE
Native Linux suspend-to-disk does not use compression, and needs 2 KB of page meta information for each MB of active memory. So bump the previous waterline of 80% of active memory to 100.2%. Add an extra .05% to prevent rounding errors. This should make the prediction whether hibernate is going to work very accurate. However, it might prevent hibernate for folks who use an alternative userspace solution like uswsusp which do support compression. http://lists.freedesktop.org/archives/devkit-devel/2010-July/000867.html
This commit is contained in:
parent
6118ac82ec
commit
fc7c6e003a
1 changed files with 4 additions and 1 deletions
|
|
@ -104,7 +104,10 @@ G_DEFINE_TYPE (UpDaemon, up_daemon, G_TYPE_OBJECT)
|
|||
#define UP_DAEMON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UP_TYPE_DAEMON, UpDaemonPrivate))
|
||||
|
||||
/* if using more memory compared to usable swap, disable hibernate */
|
||||
#define UP_DAEMON_SWAP_WATERLINE 80.0f /* % */
|
||||
/* Native Linux suspend-to-disk does not use compression, and needs 2 KB of
|
||||
* page meta information for each MB of active memory. Add an extra .05% to
|
||||
* prevent rounding errors. */
|
||||
#define UP_DAEMON_SWAP_WATERLINE 100.25f /* % */
|
||||
|
||||
/* refresh all the devices after this much time when on-battery has changed */
|
||||
#define UP_DAEMON_ON_BATTERY_REFRESH_DEVICES_DELAY 1 /* seconds */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue