xref: /netbsd/usr.sbin/screenblank/screenblank.1 (revision 21aac92a)
1*21aac92aSsevan.\"	$NetBSD: screenblank.1,v 1.18 2019/04/08 20:18:14 sevan Exp $
2dcbb2c50Sthorpej.\"
3cd95ffb6Slukem.\" Copyright (c) 1996-2002 The NetBSD Foundation, Inc.
4dcbb2c50Sthorpej.\" All rights reserved.
5dcbb2c50Sthorpej.\"
6c479d69aSthorpej.\" This code is derived from software contributed to The NetBSD Foundation
7c479d69aSthorpej.\" by Jason R. Thorpe.
8c479d69aSthorpej.\"
9dcbb2c50Sthorpej.\" Redistribution and use in source and binary forms, with or without
10dcbb2c50Sthorpej.\" modification, are permitted provided that the following conditions
11dcbb2c50Sthorpej.\" are met:
12dcbb2c50Sthorpej.\" 1. Redistributions of source code must retain the above copyright
13dcbb2c50Sthorpej.\"    notice, this list of conditions and the following disclaimer.
14dcbb2c50Sthorpej.\" 2. Redistributions in binary form must reproduce the above copyright
15dcbb2c50Sthorpej.\"    notice, this list of conditions and the following disclaimer in the
16dcbb2c50Sthorpej.\"    documentation and/or other materials provided with the distribution.
17dcbb2c50Sthorpej.\"
18c479d69aSthorpej.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19c479d69aSthorpej.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20c479d69aSthorpej.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2187f4ccd4Sjtc.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2287f4ccd4Sjtc.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23c479d69aSthorpej.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24c479d69aSthorpej.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25c479d69aSthorpej.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26c479d69aSthorpej.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27c479d69aSthorpej.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28c479d69aSthorpej.\" POSSIBILITY OF SUCH DAMAGE.
29dcbb2c50Sthorpej.\"
30*21aac92aSsevan.Dd April 8, 2019
31dcbb2c50Sthorpej.Dt SCREENBLANK 1
32d1407362Sgarbled.Os
33dcbb2c50Sthorpej.Sh NAME
34dcbb2c50Sthorpej.Nm screenblank
357637a1f3Sis.Nd screen saver daemon for wscons and FBIO machines
36dcbb2c50Sthorpej.Sh SYNOPSIS
37dcbb2c50Sthorpej.Nm screenblank
38dcbb2c50Sthorpej.Op Fl k | Fl m
3925cdf6cfSlukem.Op Fl d Ar inactivity-timeout
4025cdf6cfSlukem.Op Fl e Ar wakeup-delay
41dcbb2c50Sthorpej.Op Fl f Ar framebuffer
4225cdf6cfSlukem.Op Fl i Ar input-device
43411b866dSwiz.Nm
44411b866dSwiz.Brq Fl b | Fl u
45dcbb2c50Sthorpej.Sh DESCRIPTION
46279552d3Slukem.Nm
47dcbb2c50Sthorpejdisables the framebuffer if the keyboard and mouse are idle for a period
48dcbb2c50Sthorpejof time, and re-enables the framebuffer when keyboard or mouse activity
49dcbb2c50Sthorpejresumes.
50dcbb2c50Sthorpej.Pp
51dcbb2c50SthorpejWhen killed with a SIGINT, SIGHUP, or SIGTERM,
52279552d3Slukem.Nm
53411b866dSwizwill re-enable the framebuffer.
54411b866dSwizThe pid can be found in the file
55dcbb2c50Sthorpej.Pa /var/run/screenblank.pid .
56dcbb2c50Sthorpej.Pp
57dcbb2c50SthorpejThe options are as follows:
58dcbb2c50Sthorpej.Bl -tag -width indent
59411b866dSwiz.It Fl b
60411b866dSwizOverriding the other options, simply try (once) to blank the
61411b866dSwizframebuffer, then exit.
6225cdf6cfSlukem.It Fl d Ar inactivity-timeout
63dcbb2c50SthorpejWait the number of seconds specified by
6425cdf6cfSlukem.Ar inactivity-timeout ,
65411b866dSwizexpressed in the format
66411b866dSwiz.Dq xxx.xxx ,
67411b866dSwizbefore disabling the framebuffer due to inactivity.
68411b866dSwizThe default is 600 seconds (10 minutes).
6925cdf6cfSlukem.It Fl e Ar wakeup-delay
70dcbb2c50SthorpejWait the number of seconds specified by
7125cdf6cfSlukem.Ar wakeup-delay ,
72411b866dSwizexpressed in the format
73411b866dSwiz.Dq xxx.xxx ,
74411b866dSwizbefore re-enabling the framebuffer once activity resumes.
75411b866dSwizThe default is .25 seconds.
76dcbb2c50Sthorpej.It Fl f Ar framebuffer
77dcbb2c50SthorpejUse the framebuffer device
78dcbb2c50Sthorpej.Ar framebuffer
79dcbb2c50Sthorpejinstead of the default
80dcbb2c50Sthorpej.Pa /dev/fb .
8125cdf6cfSlukem.It Fl i Ar input-device
8225cdf6cfSlukemAdd
8325cdf6cfSlukem.Ar input-device
8425cdf6cfSlukemto the list of devices to monitor for activity.
85411b866dSwiz.It Fl k
86411b866dSwizDo not check the keyboard for activity.
87411b866dSwiz.It Fl m
88411b866dSwizDo not check the mouse for activity.
89411b866dSwiz.It Fl u
90411b866dSwizOverriding the other options, simply try (once) to unblank the
91411b866dSwizframebuffer, then exit.
92dcbb2c50Sthorpej.El
93dcbb2c50Sthorpej.Pp
94dcbb2c50SthorpejNote that the
95dcbb2c50Sthorpej.Fl k
96dcbb2c50Sthorpejand
97dcbb2c50Sthorpej.Fl m
98dcbb2c50Sthorpejflags are mutually exclusive.
99dcbb2c50Sthorpej.Sh FILES
100dcbb2c50Sthorpej.Bl -tag -width "/var/run/screenblank.pid  "
101dcbb2c50Sthorpej.It /dev/kbd
102dcbb2c50SthorpejThe keyboard device.
103dcbb2c50Sthorpej.It /dev/mouse
104dcbb2c50SthorpejThe mouse device.
105dcbb2c50Sthorpej.It /dev/console
106dcbb2c50SthorpejThe console device.
107dcbb2c50Sthorpej.It /dev/fb
108dcbb2c50SthorpejThe default framebuffer.
109cd95ffb6Slukem.It /dev/wskbd
1107637a1f3SisThe keyboard for wscons machines.
111cd95ffb6Slukem.It /dev/wsmouse
1127637a1f3SisThe mouse device for wscons machines.
1137637a1f3Sis.It /dev/ttyE0
1147637a1f3SisThe console device for wscons machines.
115dcbb2c50Sthorpej.It /var/run/screenblank.pid
116dcbb2c50SthorpejFile containing the pid of
117990562bfSwiz.Nm .
118dcbb2c50Sthorpej.El
119d7e2fab2Sgutteridge.Sh CAVEATS
120d7e2fab2Sgutteridge.Nm
121d7e2fab2Sgutteridgechecks the access and modification times of the devices it is
122f2dc99fdSwizmonitoring to determine activity.
123f2dc99fdSwizIf the devices are on a file system mounted with the
124d7e2fab2Sgutteridge.Cm noatime
125d7e2fab2Sgutteridgeand/or
126d7e2fab2Sgutteridge.Cm nodevmtime
127d7e2fab2Sgutteridgeoptions, it will not function as expected.
128*21aac92aSsevanA possible workaround is to use a script as such:
129*21aac92aSsevan.Bd -literal -offset indent
130*21aac92aSsevan#!/bin/sh
131*21aac92aSsevan/usr/sbin/screenblank -d 0 -e 0 && read
132*21aac92aSsevan/usr/bin/pkill screenblank
133*21aac92aSsevan.Ed
134