Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable suspend if booting from removable storage
- Loading branch information
1 parent
5664795
commit 803bc00
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
.../sysutils/systemd/patches/systemd-11_disable-suspend-if-dev-.suspend_disabled-exist.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From a8ad8aadc39820594f89d43aa0f8d527b256aa99 Mon Sep 17 00:00:00 2001 | ||
From: Stefan Saraev <stefan@saraev.ca> | ||
Date: Sat, 22 Mar 2014 13:40:55 +0200 | ||
Subject: [PATCH] disable suspend if /dev/.suspend_disabled exist | ||
|
||
--- | ||
src/shared/sleep-config.c | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c | ||
index cf1cd40..f6ad307 100644 | ||
--- a/src/shared/sleep-config.c | ||
+++ b/src/shared/sleep-config.c | ||
@@ -256,6 +256,10 @@ int can_sleep(const char *verb) { | ||
streq(verb, "hibernate") || | ||
streq(verb, "hybrid-sleep")); | ||
|
||
+ // boo | ||
+ if (access("/dev/.suspend_disabled", F_OK) == 0) | ||
+ return false; | ||
+ | ||
r = parse_sleep_config(verb, &modes, &states); | ||
if (r < 0) | ||
return false; | ||
-- | ||
1.9.1 | ||
|
803bc00
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too fond of the 'good reasons' here as was explained for this change:
http://openelec.tv/forum/103-infared-remotes/70122-3-95-3-power-buttons-on-remote-stopped-working#102078
Can someone elaborate the reasons here? I'm a seasoned retired technical professional so I'm not looking for quick explanations, just things we might be able to talk about and solve here =) This suspend exclusion will cause more ?? mark threads in forums IMO. Thx,
-Greg
803bc00
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to have to agree with @LossAngeles , this removal should at the very least be explained properly. The terse, dismissive replies so far are not helping.
Workaround is here: http://openelec.tv/forum/64-installation/70788-shutdown-function-greyed-out
803bc00
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea. more spam.
it is explained. search github PRs. woarkaround is there too