NetBSD Problem Report #58330
From www@netbsd.org Sun Jun 9 21:05:18 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 114781A9238
for <gnats-bugs@gnats.NetBSD.org>; Sun, 9 Jun 2024 21:05:18 +0000 (UTC)
Message-Id: <20240609210516.CA1AB1A923A@mollari.NetBSD.org>
Date: Sun, 9 Jun 2024 21:05:16 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: zzz should suspend machine
X-Send-Pr-Version: www-1.0
>Number: 58330
>Category: bin
>Synopsis: zzz should suspend machine
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 09 21:10:00 +0000 2024
>Last-Modified: Fri Mar 13 02:50:01 +0000 2026
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The NetBSD Suspension
>Environment:
>Description:
A long time ago, the zzz(8) command was the front end to triggering system suspend.
It was deleted a while ago with the rest of legacy APM support, but the man page confusingly persists: https://man.netbsd.org/zzz.8
Instead, the supported way to trigger suspend on ACPI-based systems is:
sysctl -w hw.acpi.sleep.state=3
This is quite a mouthful and hard to remember (and it also changed from machdep.acpi.sleep_state or something a few years ago).
We should restore the much more memorably-named zzz(8) as a one-liner shell script to do this.
>How-To-Repeat:
try to remember how to suspend a machine
>Fix:
Yes, please!
>Audit-Trail:
From: "David H. Gutteridge" <david@gutteridge.ca>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/58330: zzz should suspend machine
Date: Thu, 12 Mar 2026 22:48:31 -0400
Perhaps something like...
https://github.com/dhgutteridge/pkgsrc-local/blob/master/sysutils/zzz/zzz.s=
h
(I'm tired of worrying about email and GNATS mangling patches, so I
put it there.)
The first check being perhaps redundant, but gives a more user-friendly
sort of message. The second check since the zzz(8) man page gets
installed everywhere right now (presumably we don't want/need a separate
one for this script, heh).
Now, in PR bin/60049, uwe@ also mentions 'To go from "cannot" to "can"
all you need is to write a driver (a loadable kernel module) that talks
rather simple apm(4) ioctls.' Not sure if that's preferable here.
Regards,
Dave
(Contact us)
$NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.