Gentoo Archives: gentoo-user

From: n952162 <n952162@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] power button to shutdown for openrc? [SOLVED]
Date: Sun, 17 Nov 2019 09:59:47
Message-Id: 61f81f1e-e082-e0db-329f-873ef1a67676@web.de
In Reply to: Re: [gentoo-user] power button to shutdown for openrc? [SOLVED] by n952162
1 And - although hitting the power button will clear up some situations,
2 if your hard disk is having trouble closing, shutdown() probably won't
3 be able to get around that and the shutdown will be like a power-loss
4 shutdown.
5
6
7 On 11/17/19 10:27, n952162 wrote:
8 >
9 > There's a million ways a system can hang.  Acpi is a mechanism for
10 > shipping kernel events to user space.  If user space isn't working,
11 > acpi won't work.   I think.
12 >
13 >
14 > On 11/17/19 09:44, Dale wrote:
15 >> n952162 wrote:
16 >>>
17 >>> okay, I've got ...
18 >>>
19 >>> acpid is, by default, not in the default openrc run list [:blush:]
20 >>>
21 >>> Solution:
22 >>>
23 >>>     sudo rc-update add acpid
24 >>>
25 >>>
26 >>> On 11/13/19 07:48, n952162 wrote:
27 >>>>
28 >>>> I've reinstalled gentoo from the gentoo repository and now my power
29 >>>> button doesn't do a shutdown anymore.  What do I have to do to have
30 >>>> it issue a shutdown?  This is an openrc system.
31 >>>>
32 >>>> I have this, but it doesn't work:
33 >>>>
34 >>>> $ cat  /etc/acpi/events/powerbtn
35 >>>> event=button[ /]power.*
36 >>>> action=/sbin/poweroff
37 >>>>
38 >>>> On a different gentoo system I have, I have just the one line, the
39 >>>> action line, in that file and the power-button works fine (whether
40 >>>> there's causation there or not, I have no idea :-) )
41 >>>>
42 >>>> I generally do /not/ press the power button while in my window
43 >>>> manager, but first when I've logged off. Since that wasn't working,
44 >>>> I tried inside my window manager ... I got a just a couple of lines
45 >>>> that looked like they came from shutdown(), but too few (couldn't
46 >>>> read them).
47 >>>>
48 >>>> Then, on startup, the filesystems needed fscking!!!
49 >>>>
50 >>>
51 >>
52 >>
53 >> I have a related question.  If for some reason my system is locked
54 >> up, keyboard isn't working or something like that.  If I have acpi in
55 >> working order, would hitting the power button be seen or would that
56 >> be the same as the keyboard and not be recognized?  Anyone have
57 >> experience on this or read about someone who has ran into this?
58 >>
59 >> Just curious but if the answer is yes, I may work on setting this up
60 >> and working.
61 >>
62 >> Thanks.
63 >>
64 >> Dale
65 >>
66 >> :-)  :-)
67 >

Replies

Subject Author
Re: [gentoo-user] power button to shutdown for openrc? [SOLVED] n952162 <n952162@×××.de>