Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] Looking for the command to disable screen blanking

Featured Replies

anyone know how to disable the console screen blanking out, I have already tried setterm --blank 0, cat /sys/module/kernel/parameters/consoleblank and its not 0, still saying 900.

 

The instructions I found were for 6.8.3 so something must have changes for 6.9.0

Edited by arch1mede

  • Author

OK so I finally found the solution for this

 

consoleblank=0

cat /sys/module/kernel/parameters/consoleblank should now reflect 0

  • arch1mede changed the title to [SOLVED] Looking for the command to disable screen blanking
57 minutes ago, arch1mede said:

consoleblank=0

cat /sys/module/kernel/parameters/consoleblank

 

That doesn't work from the command line. Do you mean that it has to be set as a kernel parameter?

 

  • 1 month later...

Came here looking for the answer, had to confirm it but yes. NOPE. Apparently this kernel parameter is ignored. Similarly, you should ignore this post and scroll down to my next one, with an answer which seemingly works.

 

 

 

 

------

 

https://www.kernel.org/doc/html/v4.14/admin-guide/kernel-parameters.html

 

I'm about to tell you how to edit your kernel parameters, which requires messing with your boot configuration. Don't do this unless you REALLY get it. Back up your files first anyway, because if you mess this up it won't boot. You've been warned.

 

Open up /boot/syslinux/syslinux.cfg with the knowledge that you're safe because you have a backup. I use nano over ssh, ie nano /boot/syslinux/syslinux.cfg or equivalent, you know the deal.

 

Find your boot parameters. Here's mine, YMMV.;

image.png.a325b8e71cdc6a65334f438b83acb348.png

 

You'll note I have security mitigations disabled, and that this has "no performance impact(tm)" on most hardware and that it's generally a stupid idea. Just as an example.

What you want to do, is carefully add the entry consoleblank=0 anywhere after initrd=/bzroot with a space around it. No run-on words. Save, exit. In Nano that's Ctrl+X followed by Y and Enter.

 

image.thumb.png.11d768812e184d777ff66524dd534fc9.png

 

Reboot, and it shouldn't blank or break. If it did, thankfully you have that backup.

 

You did make that backup, right?

image.png

 

NOTES:

 

- I use PUTTY for Windows. There's nothing better if you Just Need SSH(TM)

- Since I keep seeing "Most users are okay hitting a key to bring the terminal up" -- WHAT IF IT CRASHED? What if you wanted to see the dieing gasp of a screen? That happened to me A LOT recently and having the console not blank would've been handy, so there ARE valid uses. Stop needing to justify everyone else's desires.

Edited by codefaux
WRONG SOLUTION

  • Community Expert

FYI you can easily edit the syslinux configuration by clicking on the flash drive in main (raw view must be selected on the top right):

 

imagem.thumb.png.b280182f3c94d67efbd4b8daa0523481.png 

  • Community Expert

BTW, adding that parameter is not working for me:

 

root@Tower15:~# cat /sys/module/kernel/parameters/consoleblank
900

 

1 hour ago, JorgeB said:

FYI you can easily edit the syslinux configuration by clicking on the flash drive in main (raw view must be selected on the top right):

 

Correct, I keep forgetting that because I honestly prefer the terminal. I'll try to remember to offer that in the future.

 

1 hour ago, JorgeB said:

not working

You are....not wrong. Huh. That's the first time I've seen a kernel parameter outright ignored in a while.

 

Okay, a different method, and I actually rebooted to test this one -- we add setterm -blank 0 to /boot/config/go and I'll let you all sort out how to get there and edit it yourselves.

image.png.75085546650b161414d188cdb5f1829c.png

You didn't forget that backup, right?

  • Community Expert
20 minutes ago, codefaux said:

we add setterm -blank 0 to /boot/config/go

This works.

  • 2 years later...

BTW, this is how apply the Setting via SSH (non permanent):

TERM=linux setterm -blank 0 -powerdown 0 -powersave off >/dev/tty0 </dev/tty0

 

This is an extended config:

setterm -blank 0 -powerdown 0 -powersave off

 

Edited by pixeldoc81
Update

  • 2 months later...
  • Community Expert

Thank you for this. Came across this a few days ago when I tried to kvm screen switched to the system to see dmesg and other event on screen.
 

root@BMM-Unraid:~# setterm -blank 0 -powerdown 0 -powersave off
setterm: terminal xterm-256color does not support --blank
setterm: cannot (un)set powersave mode: Inappropriate ioctl for device

Does this still work?
NVM ran wong thing as script.
*The Extended config goes in the config file located at /boot/go
This will apply the setting at boot.

confirm with cat command:
cat /sys/module/kernel/parameters/consoleblank

Otherwise use userscript plugin and make a script to run at startup of array. and run the SSH setting to apply.

On 4/19/2024 at 5:25 AM, pixeldoc81 said:

BTW, this is how apply the Setting via SSH:

TERM=linux setterm -blank 0 -powerdown 0 -powersave off >/dev/tty0 </dev/tty0

 

This is an extended config:

setterm -blank 0 -powerdown 0 -powersave off

 

Edited by bmartino1

I'm not sure what the question on the first line was, seems like it got deleted.

 

Your terminal is configured to behave as an xterm supporting 256 colors. xterm is an xorg terminal emulator, and does not support automatic blanking / blanking control via the routes a direct console terminal does, as inidicated by the "not supported" part. setterm is designed to comminicate behaviors to hardware terminals, not software ones (like xterm, screen, tmux, ssh, etc) and thus cannot set or unset powersave mode or blanking as indicated..

 

If you're using screen or tmux from a hardware terminal and they're using xterm-256color due to misconfiguration, the two are terminal emulator shells which cannot be controlled by setterm in any way, and they must adhere to the actual terminal's properties. IE, setterm before screen or tmux.

 

If screen or tmux are doing blanking, configure them directly, setterm does not impact their behavior.

 

If you're using xorg, setterm will not prevent xorg blanking, as setterm is meant for a hardware terminal connection, not an x session. That requires different commands which aren't applicable here.

 

If you're using ssh, it shouldn't -be- blanking unless one of the other layers is adding it, but just for the written record, setterm won't work over ssh either.

  • Community Expert

Looks like their will be a webUI setting in version 7 for this:
image.png.d6966835b3098e3dfc6c8f9a4888ff18.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.