Configure linux laptop to switch off screen but otherwise remain running when lid closed
Hi i'm trying to set up an old laptop as a 'server' for testing purposes.
As such, I don't want the screen on all day, however i do want the cpu running 24x7.
Can the 'lid close' switch be configured somehow to simply turn off the screen but otherwise the laptop is running as normal?
FYI: I'm running coreos, but i'm willing to switch to another docker container OS if it makes life easier.
linux systemd laptop
migrated from serverfault.com Dec 8 '15 at 1:24
This question came from our site for system and network administrators.
add a comment |
Hi i'm trying to set up an old laptop as a 'server' for testing purposes.
As such, I don't want the screen on all day, however i do want the cpu running 24x7.
Can the 'lid close' switch be configured somehow to simply turn off the screen but otherwise the laptop is running as normal?
FYI: I'm running coreos, but i'm willing to switch to another docker container OS if it makes life easier.
linux systemd laptop
migrated from serverfault.com Dec 8 '15 at 1:24
This question came from our site for system and network administrators.
I looked in freedesktop.org/software/systemd/man/logind.conf.html and it doesn't appear that there's the option that I want in the HandleLidSwitch possibilities.
– Chris
Dec 6 '15 at 10:33
Might be something possible by running scripts on lid switch events: ubuntuforums.org/…
– Chris
Dec 6 '15 at 10:37
add a comment |
Hi i'm trying to set up an old laptop as a 'server' for testing purposes.
As such, I don't want the screen on all day, however i do want the cpu running 24x7.
Can the 'lid close' switch be configured somehow to simply turn off the screen but otherwise the laptop is running as normal?
FYI: I'm running coreos, but i'm willing to switch to another docker container OS if it makes life easier.
linux systemd laptop
Hi i'm trying to set up an old laptop as a 'server' for testing purposes.
As such, I don't want the screen on all day, however i do want the cpu running 24x7.
Can the 'lid close' switch be configured somehow to simply turn off the screen but otherwise the laptop is running as normal?
FYI: I'm running coreos, but i'm willing to switch to another docker container OS if it makes life easier.
linux systemd laptop
linux systemd laptop
asked Dec 6 '15 at 10:28
ChrisChris
17617
17617
migrated from serverfault.com Dec 8 '15 at 1:24
This question came from our site for system and network administrators.
migrated from serverfault.com Dec 8 '15 at 1:24
This question came from our site for system and network administrators.
I looked in freedesktop.org/software/systemd/man/logind.conf.html and it doesn't appear that there's the option that I want in the HandleLidSwitch possibilities.
– Chris
Dec 6 '15 at 10:33
Might be something possible by running scripts on lid switch events: ubuntuforums.org/…
– Chris
Dec 6 '15 at 10:37
add a comment |
I looked in freedesktop.org/software/systemd/man/logind.conf.html and it doesn't appear that there's the option that I want in the HandleLidSwitch possibilities.
– Chris
Dec 6 '15 at 10:33
Might be something possible by running scripts on lid switch events: ubuntuforums.org/…
– Chris
Dec 6 '15 at 10:37
I looked in freedesktop.org/software/systemd/man/logind.conf.html and it doesn't appear that there's the option that I want in the HandleLidSwitch possibilities.
– Chris
Dec 6 '15 at 10:33
I looked in freedesktop.org/software/systemd/man/logind.conf.html and it doesn't appear that there's the option that I want in the HandleLidSwitch possibilities.
– Chris
Dec 6 '15 at 10:33
Might be something possible by running scripts on lid switch events: ubuntuforums.org/…
– Chris
Dec 6 '15 at 10:37
Might be something possible by running scripts on lid switch events: ubuntuforums.org/…
– Chris
Dec 6 '15 at 10:37
add a comment |
4 Answers
4
active
oldest
votes
I'm not sure how you missed it in the docs, because when I looked it was plainly there.
Place this in logind.conf
:
HandleLidSwitch=ignore
2
Ah yes but I'd like the screen to still turn off
– Chris
Dec 6 '15 at 12:00
1
Did it not turn off?
– Michael Hampton
Dec 6 '15 at 12:08
You're right! Thanks so much. Sorry for wasting your time.
– Chris
Dec 6 '15 at 12:19
3
I've done this, but my screen is on while the lid is closed :(
– Hubro
Sep 18 '17 at 21:07
1
I've done this, too, but my screen is still on while the lid is closed.
– Limited Atonement
Jun 10 '18 at 0:46
add a comment |
According to the documentation at this url, the HandleLidSwitch
can be set to lock
which locks your session and normally causes the screen to turn off either immediately of a few seconds later. This works well on my Ubuntu-Gnome 17.10. The only downside is you'll have to input your password again when you reopen the lid.
Just add the following line in your /etc/systemd/logind.conf
HandleLidSwitch=lock
Note that there is also a HandleLidSwitchExternalPower
if you want different behavior when plugged.
The full set of possible values for HandleLidSwitch
and HandleLidSwitchExternalPower
is:ignore
, poweroff
, reboot
, halt
, kexec
, suspend
, hibernate
, hybrid-sleep
, suspend-then-hibernate
, and lock
Welcome to posting on U&L! A Core OS server doesn't run X (graphics), unless you're very determined to do so. So for the original asker there won't be any graphical session to lock. Since you bumped this, I've suggested an alternative answer :). If you're writing your answer because it solved a related but different problem which you had, it might be worth writing your problem as a question. You are allowed and indeed encouraged to specify your own answer when you write a question :). I'm not saying this post is a big problem, but if the thread did get too cluttered it might be off-topic
– sourcejedi
Jul 7 '18 at 18:10
(If you wanted to post a separate question, you could always include a link, saying "similar to this other question, but I have Ubuntu Gnome installed and using=ignore
leaves my screen on, is there some other approach that lets me trigger the normal screen lock?" or whatever).
– sourcejedi
Jul 7 '18 at 18:15
add a comment |
Several people have commented that they can stop their laptop from suspending when closed, but the screen stays on. Maybe this is due to differences in firmware? There is an alternative feature that might work.
At one point, the Linux kernel text console had a default setting that blanked itself after a period of inactivity. An equivalent to the screensaver in your favourite graphical environment :).
Some people like to set the blank time using the kernel boot option consoleblank=
, which takes a value in seconds. However, the documentation I find does not say this is sufficient to achieve full power saving, or any real level of power saving. Maybe it does what they want it to on their system! Or maybe it doesn't. The documentation is unhelpful on this point.
Remember the original function of a screensaver, was to avoid burning-in a permanent ghost image on your CRT display. It does not necessarily save power. When full power saving was introduced, it was used after a longer delay. Bringing the display back up and running could take a few seconds, which would be much more annoying to the user.
http://man7.org/linux/man-pages/man1/setterm.1.html
Apparently it is possible to enable console blanking at runtime, using setterm --consoleblank [1-60]
. And then setterm
has another option --powerdown [1-60]
, to eventually enable "powerdown mode" after a timeout.
If I'm reading it correctly, there's a sequence. First the console blank timeout applies. Then after one powerdown timeout, it applies "vsync suspend mode". Finally after a second powerdown timeout, it applies "powerdown mode". These timeouts are all specified in minutes, not seconds.
So I think you can use a command like this:
/bin/setterm -term linux -blank 10 -powerdown 5 </dev/tty1 >/dev/tty1
I'm not sure whether CoreOS lets you add arbitrary commands to the boot process (as in rc.local
on other distributions, for example). I imagine you can always use a privileged container :).
setterm --blank
says that blanking uses APM if available. Narrator voice: APM is not available on modern hardware. I don't know if blanking will use any modern power saving scheme.
"powerdown" mentions "VESA" display power saving. "VESA" power saving is still a thing. I don't know if "powerdown" is necessary or even sufficient to work for modern stuff.
setterm
does not say what the default "powerdown" settings are. If I had to guess, I would say it is not enabled by default.
add a comment |
The steps at this article worked great for me:
https://mensfeld.pl/2018/08/ubuntu-18-04-disable-screen-on-lid-close/
It's like a refrigerator light though; how are we going to test this? ;-)
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f248033%2fconfigure-linux-laptop-to-switch-off-screen-but-otherwise-remain-running-when-li%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
I'm not sure how you missed it in the docs, because when I looked it was plainly there.
Place this in logind.conf
:
HandleLidSwitch=ignore
2
Ah yes but I'd like the screen to still turn off
– Chris
Dec 6 '15 at 12:00
1
Did it not turn off?
– Michael Hampton
Dec 6 '15 at 12:08
You're right! Thanks so much. Sorry for wasting your time.
– Chris
Dec 6 '15 at 12:19
3
I've done this, but my screen is on while the lid is closed :(
– Hubro
Sep 18 '17 at 21:07
1
I've done this, too, but my screen is still on while the lid is closed.
– Limited Atonement
Jun 10 '18 at 0:46
add a comment |
I'm not sure how you missed it in the docs, because when I looked it was plainly there.
Place this in logind.conf
:
HandleLidSwitch=ignore
2
Ah yes but I'd like the screen to still turn off
– Chris
Dec 6 '15 at 12:00
1
Did it not turn off?
– Michael Hampton
Dec 6 '15 at 12:08
You're right! Thanks so much. Sorry for wasting your time.
– Chris
Dec 6 '15 at 12:19
3
I've done this, but my screen is on while the lid is closed :(
– Hubro
Sep 18 '17 at 21:07
1
I've done this, too, but my screen is still on while the lid is closed.
– Limited Atonement
Jun 10 '18 at 0:46
add a comment |
I'm not sure how you missed it in the docs, because when I looked it was plainly there.
Place this in logind.conf
:
HandleLidSwitch=ignore
I'm not sure how you missed it in the docs, because when I looked it was plainly there.
Place this in logind.conf
:
HandleLidSwitch=ignore
answered Dec 6 '15 at 11:08
Michael HamptonMichael Hampton
5,81911944
5,81911944
2
Ah yes but I'd like the screen to still turn off
– Chris
Dec 6 '15 at 12:00
1
Did it not turn off?
– Michael Hampton
Dec 6 '15 at 12:08
You're right! Thanks so much. Sorry for wasting your time.
– Chris
Dec 6 '15 at 12:19
3
I've done this, but my screen is on while the lid is closed :(
– Hubro
Sep 18 '17 at 21:07
1
I've done this, too, but my screen is still on while the lid is closed.
– Limited Atonement
Jun 10 '18 at 0:46
add a comment |
2
Ah yes but I'd like the screen to still turn off
– Chris
Dec 6 '15 at 12:00
1
Did it not turn off?
– Michael Hampton
Dec 6 '15 at 12:08
You're right! Thanks so much. Sorry for wasting your time.
– Chris
Dec 6 '15 at 12:19
3
I've done this, but my screen is on while the lid is closed :(
– Hubro
Sep 18 '17 at 21:07
1
I've done this, too, but my screen is still on while the lid is closed.
– Limited Atonement
Jun 10 '18 at 0:46
2
2
Ah yes but I'd like the screen to still turn off
– Chris
Dec 6 '15 at 12:00
Ah yes but I'd like the screen to still turn off
– Chris
Dec 6 '15 at 12:00
1
1
Did it not turn off?
– Michael Hampton
Dec 6 '15 at 12:08
Did it not turn off?
– Michael Hampton
Dec 6 '15 at 12:08
You're right! Thanks so much. Sorry for wasting your time.
– Chris
Dec 6 '15 at 12:19
You're right! Thanks so much. Sorry for wasting your time.
– Chris
Dec 6 '15 at 12:19
3
3
I've done this, but my screen is on while the lid is closed :(
– Hubro
Sep 18 '17 at 21:07
I've done this, but my screen is on while the lid is closed :(
– Hubro
Sep 18 '17 at 21:07
1
1
I've done this, too, but my screen is still on while the lid is closed.
– Limited Atonement
Jun 10 '18 at 0:46
I've done this, too, but my screen is still on while the lid is closed.
– Limited Atonement
Jun 10 '18 at 0:46
add a comment |
According to the documentation at this url, the HandleLidSwitch
can be set to lock
which locks your session and normally causes the screen to turn off either immediately of a few seconds later. This works well on my Ubuntu-Gnome 17.10. The only downside is you'll have to input your password again when you reopen the lid.
Just add the following line in your /etc/systemd/logind.conf
HandleLidSwitch=lock
Note that there is also a HandleLidSwitchExternalPower
if you want different behavior when plugged.
The full set of possible values for HandleLidSwitch
and HandleLidSwitchExternalPower
is:ignore
, poweroff
, reboot
, halt
, kexec
, suspend
, hibernate
, hybrid-sleep
, suspend-then-hibernate
, and lock
Welcome to posting on U&L! A Core OS server doesn't run X (graphics), unless you're very determined to do so. So for the original asker there won't be any graphical session to lock. Since you bumped this, I've suggested an alternative answer :). If you're writing your answer because it solved a related but different problem which you had, it might be worth writing your problem as a question. You are allowed and indeed encouraged to specify your own answer when you write a question :). I'm not saying this post is a big problem, but if the thread did get too cluttered it might be off-topic
– sourcejedi
Jul 7 '18 at 18:10
(If you wanted to post a separate question, you could always include a link, saying "similar to this other question, but I have Ubuntu Gnome installed and using=ignore
leaves my screen on, is there some other approach that lets me trigger the normal screen lock?" or whatever).
– sourcejedi
Jul 7 '18 at 18:15
add a comment |
According to the documentation at this url, the HandleLidSwitch
can be set to lock
which locks your session and normally causes the screen to turn off either immediately of a few seconds later. This works well on my Ubuntu-Gnome 17.10. The only downside is you'll have to input your password again when you reopen the lid.
Just add the following line in your /etc/systemd/logind.conf
HandleLidSwitch=lock
Note that there is also a HandleLidSwitchExternalPower
if you want different behavior when plugged.
The full set of possible values for HandleLidSwitch
and HandleLidSwitchExternalPower
is:ignore
, poweroff
, reboot
, halt
, kexec
, suspend
, hibernate
, hybrid-sleep
, suspend-then-hibernate
, and lock
Welcome to posting on U&L! A Core OS server doesn't run X (graphics), unless you're very determined to do so. So for the original asker there won't be any graphical session to lock. Since you bumped this, I've suggested an alternative answer :). If you're writing your answer because it solved a related but different problem which you had, it might be worth writing your problem as a question. You are allowed and indeed encouraged to specify your own answer when you write a question :). I'm not saying this post is a big problem, but if the thread did get too cluttered it might be off-topic
– sourcejedi
Jul 7 '18 at 18:10
(If you wanted to post a separate question, you could always include a link, saying "similar to this other question, but I have Ubuntu Gnome installed and using=ignore
leaves my screen on, is there some other approach that lets me trigger the normal screen lock?" or whatever).
– sourcejedi
Jul 7 '18 at 18:15
add a comment |
According to the documentation at this url, the HandleLidSwitch
can be set to lock
which locks your session and normally causes the screen to turn off either immediately of a few seconds later. This works well on my Ubuntu-Gnome 17.10. The only downside is you'll have to input your password again when you reopen the lid.
Just add the following line in your /etc/systemd/logind.conf
HandleLidSwitch=lock
Note that there is also a HandleLidSwitchExternalPower
if you want different behavior when plugged.
The full set of possible values for HandleLidSwitch
and HandleLidSwitchExternalPower
is:ignore
, poweroff
, reboot
, halt
, kexec
, suspend
, hibernate
, hybrid-sleep
, suspend-then-hibernate
, and lock
According to the documentation at this url, the HandleLidSwitch
can be set to lock
which locks your session and normally causes the screen to turn off either immediately of a few seconds later. This works well on my Ubuntu-Gnome 17.10. The only downside is you'll have to input your password again when you reopen the lid.
Just add the following line in your /etc/systemd/logind.conf
HandleLidSwitch=lock
Note that there is also a HandleLidSwitchExternalPower
if you want different behavior when plugged.
The full set of possible values for HandleLidSwitch
and HandleLidSwitchExternalPower
is:ignore
, poweroff
, reboot
, halt
, kexec
, suspend
, hibernate
, hybrid-sleep
, suspend-then-hibernate
, and lock
answered Jul 7 '18 at 12:44
AnthonyAnthony
1112
1112
Welcome to posting on U&L! A Core OS server doesn't run X (graphics), unless you're very determined to do so. So for the original asker there won't be any graphical session to lock. Since you bumped this, I've suggested an alternative answer :). If you're writing your answer because it solved a related but different problem which you had, it might be worth writing your problem as a question. You are allowed and indeed encouraged to specify your own answer when you write a question :). I'm not saying this post is a big problem, but if the thread did get too cluttered it might be off-topic
– sourcejedi
Jul 7 '18 at 18:10
(If you wanted to post a separate question, you could always include a link, saying "similar to this other question, but I have Ubuntu Gnome installed and using=ignore
leaves my screen on, is there some other approach that lets me trigger the normal screen lock?" or whatever).
– sourcejedi
Jul 7 '18 at 18:15
add a comment |
Welcome to posting on U&L! A Core OS server doesn't run X (graphics), unless you're very determined to do so. So for the original asker there won't be any graphical session to lock. Since you bumped this, I've suggested an alternative answer :). If you're writing your answer because it solved a related but different problem which you had, it might be worth writing your problem as a question. You are allowed and indeed encouraged to specify your own answer when you write a question :). I'm not saying this post is a big problem, but if the thread did get too cluttered it might be off-topic
– sourcejedi
Jul 7 '18 at 18:10
(If you wanted to post a separate question, you could always include a link, saying "similar to this other question, but I have Ubuntu Gnome installed and using=ignore
leaves my screen on, is there some other approach that lets me trigger the normal screen lock?" or whatever).
– sourcejedi
Jul 7 '18 at 18:15
Welcome to posting on U&L! A Core OS server doesn't run X (graphics), unless you're very determined to do so. So for the original asker there won't be any graphical session to lock. Since you bumped this, I've suggested an alternative answer :). If you're writing your answer because it solved a related but different problem which you had, it might be worth writing your problem as a question. You are allowed and indeed encouraged to specify your own answer when you write a question :). I'm not saying this post is a big problem, but if the thread did get too cluttered it might be off-topic
– sourcejedi
Jul 7 '18 at 18:10
Welcome to posting on U&L! A Core OS server doesn't run X (graphics), unless you're very determined to do so. So for the original asker there won't be any graphical session to lock. Since you bumped this, I've suggested an alternative answer :). If you're writing your answer because it solved a related but different problem which you had, it might be worth writing your problem as a question. You are allowed and indeed encouraged to specify your own answer when you write a question :). I'm not saying this post is a big problem, but if the thread did get too cluttered it might be off-topic
– sourcejedi
Jul 7 '18 at 18:10
(If you wanted to post a separate question, you could always include a link, saying "similar to this other question, but I have Ubuntu Gnome installed and using
=ignore
leaves my screen on, is there some other approach that lets me trigger the normal screen lock?" or whatever).– sourcejedi
Jul 7 '18 at 18:15
(If you wanted to post a separate question, you could always include a link, saying "similar to this other question, but I have Ubuntu Gnome installed and using
=ignore
leaves my screen on, is there some other approach that lets me trigger the normal screen lock?" or whatever).– sourcejedi
Jul 7 '18 at 18:15
add a comment |
Several people have commented that they can stop their laptop from suspending when closed, but the screen stays on. Maybe this is due to differences in firmware? There is an alternative feature that might work.
At one point, the Linux kernel text console had a default setting that blanked itself after a period of inactivity. An equivalent to the screensaver in your favourite graphical environment :).
Some people like to set the blank time using the kernel boot option consoleblank=
, which takes a value in seconds. However, the documentation I find does not say this is sufficient to achieve full power saving, or any real level of power saving. Maybe it does what they want it to on their system! Or maybe it doesn't. The documentation is unhelpful on this point.
Remember the original function of a screensaver, was to avoid burning-in a permanent ghost image on your CRT display. It does not necessarily save power. When full power saving was introduced, it was used after a longer delay. Bringing the display back up and running could take a few seconds, which would be much more annoying to the user.
http://man7.org/linux/man-pages/man1/setterm.1.html
Apparently it is possible to enable console blanking at runtime, using setterm --consoleblank [1-60]
. And then setterm
has another option --powerdown [1-60]
, to eventually enable "powerdown mode" after a timeout.
If I'm reading it correctly, there's a sequence. First the console blank timeout applies. Then after one powerdown timeout, it applies "vsync suspend mode". Finally after a second powerdown timeout, it applies "powerdown mode". These timeouts are all specified in minutes, not seconds.
So I think you can use a command like this:
/bin/setterm -term linux -blank 10 -powerdown 5 </dev/tty1 >/dev/tty1
I'm not sure whether CoreOS lets you add arbitrary commands to the boot process (as in rc.local
on other distributions, for example). I imagine you can always use a privileged container :).
setterm --blank
says that blanking uses APM if available. Narrator voice: APM is not available on modern hardware. I don't know if blanking will use any modern power saving scheme.
"powerdown" mentions "VESA" display power saving. "VESA" power saving is still a thing. I don't know if "powerdown" is necessary or even sufficient to work for modern stuff.
setterm
does not say what the default "powerdown" settings are. If I had to guess, I would say it is not enabled by default.
add a comment |
Several people have commented that they can stop their laptop from suspending when closed, but the screen stays on. Maybe this is due to differences in firmware? There is an alternative feature that might work.
At one point, the Linux kernel text console had a default setting that blanked itself after a period of inactivity. An equivalent to the screensaver in your favourite graphical environment :).
Some people like to set the blank time using the kernel boot option consoleblank=
, which takes a value in seconds. However, the documentation I find does not say this is sufficient to achieve full power saving, or any real level of power saving. Maybe it does what they want it to on their system! Or maybe it doesn't. The documentation is unhelpful on this point.
Remember the original function of a screensaver, was to avoid burning-in a permanent ghost image on your CRT display. It does not necessarily save power. When full power saving was introduced, it was used after a longer delay. Bringing the display back up and running could take a few seconds, which would be much more annoying to the user.
http://man7.org/linux/man-pages/man1/setterm.1.html
Apparently it is possible to enable console blanking at runtime, using setterm --consoleblank [1-60]
. And then setterm
has another option --powerdown [1-60]
, to eventually enable "powerdown mode" after a timeout.
If I'm reading it correctly, there's a sequence. First the console blank timeout applies. Then after one powerdown timeout, it applies "vsync suspend mode". Finally after a second powerdown timeout, it applies "powerdown mode". These timeouts are all specified in minutes, not seconds.
So I think you can use a command like this:
/bin/setterm -term linux -blank 10 -powerdown 5 </dev/tty1 >/dev/tty1
I'm not sure whether CoreOS lets you add arbitrary commands to the boot process (as in rc.local
on other distributions, for example). I imagine you can always use a privileged container :).
setterm --blank
says that blanking uses APM if available. Narrator voice: APM is not available on modern hardware. I don't know if blanking will use any modern power saving scheme.
"powerdown" mentions "VESA" display power saving. "VESA" power saving is still a thing. I don't know if "powerdown" is necessary or even sufficient to work for modern stuff.
setterm
does not say what the default "powerdown" settings are. If I had to guess, I would say it is not enabled by default.
add a comment |
Several people have commented that they can stop their laptop from suspending when closed, but the screen stays on. Maybe this is due to differences in firmware? There is an alternative feature that might work.
At one point, the Linux kernel text console had a default setting that blanked itself after a period of inactivity. An equivalent to the screensaver in your favourite graphical environment :).
Some people like to set the blank time using the kernel boot option consoleblank=
, which takes a value in seconds. However, the documentation I find does not say this is sufficient to achieve full power saving, or any real level of power saving. Maybe it does what they want it to on their system! Or maybe it doesn't. The documentation is unhelpful on this point.
Remember the original function of a screensaver, was to avoid burning-in a permanent ghost image on your CRT display. It does not necessarily save power. When full power saving was introduced, it was used after a longer delay. Bringing the display back up and running could take a few seconds, which would be much more annoying to the user.
http://man7.org/linux/man-pages/man1/setterm.1.html
Apparently it is possible to enable console blanking at runtime, using setterm --consoleblank [1-60]
. And then setterm
has another option --powerdown [1-60]
, to eventually enable "powerdown mode" after a timeout.
If I'm reading it correctly, there's a sequence. First the console blank timeout applies. Then after one powerdown timeout, it applies "vsync suspend mode". Finally after a second powerdown timeout, it applies "powerdown mode". These timeouts are all specified in minutes, not seconds.
So I think you can use a command like this:
/bin/setterm -term linux -blank 10 -powerdown 5 </dev/tty1 >/dev/tty1
I'm not sure whether CoreOS lets you add arbitrary commands to the boot process (as in rc.local
on other distributions, for example). I imagine you can always use a privileged container :).
setterm --blank
says that blanking uses APM if available. Narrator voice: APM is not available on modern hardware. I don't know if blanking will use any modern power saving scheme.
"powerdown" mentions "VESA" display power saving. "VESA" power saving is still a thing. I don't know if "powerdown" is necessary or even sufficient to work for modern stuff.
setterm
does not say what the default "powerdown" settings are. If I had to guess, I would say it is not enabled by default.
Several people have commented that they can stop their laptop from suspending when closed, but the screen stays on. Maybe this is due to differences in firmware? There is an alternative feature that might work.
At one point, the Linux kernel text console had a default setting that blanked itself after a period of inactivity. An equivalent to the screensaver in your favourite graphical environment :).
Some people like to set the blank time using the kernel boot option consoleblank=
, which takes a value in seconds. However, the documentation I find does not say this is sufficient to achieve full power saving, or any real level of power saving. Maybe it does what they want it to on their system! Or maybe it doesn't. The documentation is unhelpful on this point.
Remember the original function of a screensaver, was to avoid burning-in a permanent ghost image on your CRT display. It does not necessarily save power. When full power saving was introduced, it was used after a longer delay. Bringing the display back up and running could take a few seconds, which would be much more annoying to the user.
http://man7.org/linux/man-pages/man1/setterm.1.html
Apparently it is possible to enable console blanking at runtime, using setterm --consoleblank [1-60]
. And then setterm
has another option --powerdown [1-60]
, to eventually enable "powerdown mode" after a timeout.
If I'm reading it correctly, there's a sequence. First the console blank timeout applies. Then after one powerdown timeout, it applies "vsync suspend mode". Finally after a second powerdown timeout, it applies "powerdown mode". These timeouts are all specified in minutes, not seconds.
So I think you can use a command like this:
/bin/setterm -term linux -blank 10 -powerdown 5 </dev/tty1 >/dev/tty1
I'm not sure whether CoreOS lets you add arbitrary commands to the boot process (as in rc.local
on other distributions, for example). I imagine you can always use a privileged container :).
setterm --blank
says that blanking uses APM if available. Narrator voice: APM is not available on modern hardware. I don't know if blanking will use any modern power saving scheme.
"powerdown" mentions "VESA" display power saving. "VESA" power saving is still a thing. I don't know if "powerdown" is necessary or even sufficient to work for modern stuff.
setterm
does not say what the default "powerdown" settings are. If I had to guess, I would say it is not enabled by default.
edited Nov 12 '18 at 16:38
answered Jul 7 '18 at 17:50
sourcejedisourcejedi
24.5k440107
24.5k440107
add a comment |
add a comment |
The steps at this article worked great for me:
https://mensfeld.pl/2018/08/ubuntu-18-04-disable-screen-on-lid-close/
It's like a refrigerator light though; how are we going to test this? ;-)
New contributor
add a comment |
The steps at this article worked great for me:
https://mensfeld.pl/2018/08/ubuntu-18-04-disable-screen-on-lid-close/
It's like a refrigerator light though; how are we going to test this? ;-)
New contributor
add a comment |
The steps at this article worked great for me:
https://mensfeld.pl/2018/08/ubuntu-18-04-disable-screen-on-lid-close/
It's like a refrigerator light though; how are we going to test this? ;-)
New contributor
The steps at this article worked great for me:
https://mensfeld.pl/2018/08/ubuntu-18-04-disable-screen-on-lid-close/
It's like a refrigerator light though; how are we going to test this? ;-)
New contributor
New contributor
answered 6 mins ago
Randy HoodRandy Hood
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f248033%2fconfigure-linux-laptop-to-switch-off-screen-but-otherwise-remain-running-when-li%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I looked in freedesktop.org/software/systemd/man/logind.conf.html and it doesn't appear that there's the option that I want in the HandleLidSwitch possibilities.
– Chris
Dec 6 '15 at 10:33
Might be something possible by running scripts on lid switch events: ubuntuforums.org/…
– Chris
Dec 6 '15 at 10:37