Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

poweroff support on Hurd?

0 views
Skip to first unread message

Martin-Éric Racine

unread,
Dec 4, 2023, 5:40:04 AM12/4/23
to
(non-subscriber - please keep me in CC)

Another question related to Debian GNU/Hurd:

ACPI support. I noticed during bootup that an ACPI server is launched,
but issuing "exec sudo poweroff" merely halts the system; it doesn't
send an ACPI poweroff at the end of the shutdown process.

Is there any way to enable this or is ACPI poweroff merely not
supported by Hurd?

Thanks!
Martin-Éric

Samuel Thibault

unread,
Dec 4, 2023, 6:50:04 AM12/4/23
to
Hello,

Martin-Éric Racine, le lun. 04 déc. 2023 12:16:59 +0200, a ecrit:
> ACPI support. I noticed during bootup that an ACPI server is launched,
> but issuing "exec sudo poweroff" merely halts the system; it doesn't
> send an ACPI poweroff at the end of the shutdown process.
>
> Is there any way to enable this or is ACPI poweroff merely not
> supported by Hurd?

It *is* supported and works for me. There is nothing particular to do to
get it.

Is the acpi translator perhaps dying at some point?

Are you running hurd-i386 or hurd-amd64?

Samuel

Samuel Thibault

unread,
Dec 4, 2023, 7:20:04 AM12/4/23
to
Martin-Éric Racine, le lun. 04 déc. 2023 14:08:05 +0200, a ecrit:
> > Martin-Éric Racine, le lun. 04 déc. 2023 12:16:59 +0200, a ecrit:
> > > ACPI support. I noticed during bootup that an ACPI server is launched,
> > > but issuing "exec sudo poweroff" merely halts the system; it doesn't
> > > send an ACPI poweroff at the end of the shutdown process.
> > >
> > > Is there any way to enable this or is ACPI poweroff merely not
> > > supported by Hurd?
> >
> > It *is* supported and works for me. There is nothing particular to do to
> > get it.
>
> Interesting.
>
> > Is the acpi translator perhaps dying at some point?
>
> What keyword am I supposed to grep in syslog?

syslog probably doesn't notice that. But that probably shows up on the
mach console.

Samuel

Martin-Éric Racine

unread,
Dec 4, 2023, 7:30:05 AM12/4/23
to
Howdy!
On Mon, Dec 4, 2023 at 1:48 PM Samuel Thibault <sthi...@debian.org> wrote:
> Martin-Éric Racine, le lun. 04 déc. 2023 12:16:59 +0200, a ecrit:
> > ACPI support. I noticed during bootup that an ACPI server is launched,
> > but issuing "exec sudo poweroff" merely halts the system; it doesn't
> > send an ACPI poweroff at the end of the shutdown process.
> >
> > Is there any way to enable this or is ACPI poweroff merely not
> > supported by Hurd?
>
> It *is* supported and works for me. There is nothing particular to do to
> get it.

Interesting.

> Is the acpi translator perhaps dying at some point?

What keyword am I supposed to grep in syslog?

> Are you running hurd-i386 or hurd-amd64?

hurd-i386.

Martin-Éric

Samuel Thibault

unread,
Dec 4, 2023, 7:50:04 AM12/4/23
to
Martin-Éric Racine, le lun. 04 déc. 2023 14:30:55 +0200, a ecrit:
> As for the console, it doesn't show much since it's too busy clearing
> the screen while changing the font

You can disable the hurd console in /etc/defaults/hurd-console.

> Speaking of the console, logging in via that doesn't set LANG or
> LANGUAGE, unless I missed something?

It does set it according to your Debian configuration.

Samuel

Martin-Éric Racine

unread,
Dec 4, 2023, 7:50:04 AM12/4/23
to
Speaking of which: bug #1057397.

As for the console, it doesn't show much since it's too busy clearing
the screen while changing the font

Speaking of the console, logging in via that doesn't set LANG or
LANGUAGE, unless I missed something?

Martin-Éric

Samuel Thibault

unread,
Dec 4, 2023, 8:10:04 AM12/4/23
to
Martin-Éric Racine, le lun. 04 déc. 2023 14:44:54 +0200, a ecrit:
> On Mon, Dec 4, 2023 at 2:40 PM Samuel Thibault <sthi...@debian.org> wrote:
> > Martin-Éric Racine, le lun. 04 déc. 2023 14:30:55 +0200, a ecrit:
> > > As for the console, it doesn't show much since it's too busy clearing
> > > the screen while changing the font
> >
> > You can disable the hurd console in /etc/defaults/hurd-console.
>
> Which then prevents loading the correct keyboard map.

Alternatively, you can put the gnumach console on the com0 serial port.

> > > Speaking of the console, logging in via that doesn't set LANG or
> > > LANGUAGE, unless I missed something?
> >
> > It does set it according to your Debian configuration.
>
> Nope. /etc/default/locale is correct, but 'locale' shows LANG and
> LANGUAGE unset, while everything else in LC_* has POSIX.

Ok, it does work through ssh but not on the Hurd console (and not via
inetutils-telnetd either). Contribution welcome to fix it.

Samuel

Martin-Éric Racine

unread,
Dec 4, 2023, 8:10:04 AM12/4/23
to
On Mon, Dec 4, 2023 at 2:40 PM Samuel Thibault <sthi...@debian.org> wrote:
>
> Martin-Éric Racine, le lun. 04 déc. 2023 14:30:55 +0200, a ecrit:
> > As for the console, it doesn't show much since it's too busy clearing
> > the screen while changing the font
>
> You can disable the hurd console in /etc/defaults/hurd-console.

Which then prevents loading the correct keyboard map.

> > Speaking of the console, logging in via that doesn't set LANG or
> > LANGUAGE, unless I missed something?
>
> It does set it according to your Debian configuration.

Nope. /etc/default/locale is correct, but 'locale' shows LANG and
LANGUAGE unset, while everything else in LC_* has POSIX.

Martin-Éric

Samuel Thibault

unread,
Dec 4, 2023, 10:10:05 AM12/4/23
to
Martin-Éric Racine, le lun. 04 déc. 2023 14:30:55 +0200, a ecrit:
> On Mon, Dec 4, 2023 at 2:14 PM Samuel Thibault <sthi...@debian.org> wrote:
> >
> > Martin-Éric Racine, le lun. 04 déc. 2023 14:08:05 +0200, a ecrit:
> > > > Martin-Éric Racine, le lun. 04 déc. 2023 12:16:59 +0200, a ecrit:
> > > > > ACPI support. I noticed during bootup that an ACPI server is launched,
> > > > > but issuing "exec sudo poweroff" merely halts the system; it doesn't
> > > > > send an ACPI poweroff at the end of the shutdown process.
> > > > >
> > > > > Is there any way to enable this or is ACPI poweroff merely not
> > > > > supported by Hurd?
> > > >
> > > > It *is* supported and works for me. There is nothing particular to do to
> > > > get it.
> > >
> > > Interesting.
> > >
> > > > Is the acpi translator perhaps dying at some point?
> > >
> > > What keyword am I supposed to grep in syslog?
> >
> > syslog probably doesn't notice that. But that probably shows up on the
> > mach console.
>
> Speaking of which: bug #1057397.

(inetutils-syslogd should be working fine)

Martin-Éric Racine

unread,
Dec 4, 2023, 10:40:04 AM12/4/23
to
Possibly, but it's not what comes with the default install; rsyslogd is.

Martin-Éric

Martin-Éric Racine

unread,
Dec 5, 2023, 4:10:04 AM12/5/23
to
As far as I can tell, pci-arbiter succesfully launches acpi on bootup
and terminates it during shutdown.

$ grep -i acpi /var/log/dmesg
biosmem: 00000000001ffd0000:00000000001fff0000, ACPI NVS
biosmem: 00000000001ffd0000:00000000001fff0000, ACPI NVS
module 0: pci-arbiter --host-priv-port=${host-port}
--device-master-port=${device-port} --next-task=${acpi-task}
$(pci-task=task-create) $(task-resume)
module 1: acpi --next-task=${disk-task} $(acpi-task=task-create)
task loaded: acpi --next-task=1

Somehow that doesn't result in a poweroff upon shutdown. The same host
is known to correctly poweroff when running the Linux kernel.

Martin-Éric

Samuel Thibault

unread,
Dec 6, 2023, 7:20:06 PM12/6/23
to
Martin-Éric Racine, le mar. 05 déc. 2023 10:48:57 +0200, a ecrit:
> On Mon, Dec 4, 2023 at 1:48 PM Samuel Thibault <sthi...@debian.org> wrote:
> > Martin-Éric Racine, le lun. 04 déc. 2023 12:16:59 +0200, a ecrit:
> > > ACPI support. I noticed during bootup that an ACPI server is launched,
> > > but issuing "exec sudo poweroff" merely halts the system; it doesn't
> > > send an ACPI poweroff at the end of the shutdown process.
> > >
> > > Is there any way to enable this or is ACPI poweroff merely not
> > > supported by Hurd?
> >
> > It *is* supported and works for me. There is nothing particular to do to
> > get it.
> >
> > Is the acpi translator perhaps dying at some point?
> >
> > Are you running hurd-i386 or hurd-amd64?
>
> As far as I can tell, pci-arbiter succesfully launches acpi on bootup
> and terminates it during shutdown.

Just to make sure, does

showtrans /servers/shutdown

tell you /hurd/shutdown? and

showtrans /servers/acpi

tell you /hurd/acpi? and /servers/acpi/tables/ contains some tables?

Samuel

Martin-Éric Racine

unread,
Dec 7, 2023, 1:40:03 AM12/7/23
to
[2023-12-07 08:14](HURD i386)perkelix@pxeth:~$ showtrans /servers/shutdown
/hurd/shutdown
[2023-12-07 08:14](HURD i386)perkelix@pxeth:~$ showtrans /servers/acpi
/hurd/acpi
[2023-12-07 08:14](HURD i386)perkelix@pxeth:~$ ls /servers/acpi/tables/
APIC FACP SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT
[2023-12-07 08:14](HURD i386)perkelix@pxeth:~$

Martin-Éric

Samuel Thibault

unread,
Dec 7, 2023, 4:30:04 AM12/7/23
to
Martin-Éric Racine, le jeu. 07 déc. 2023 08:16:34 +0200, a ecrit:
Ok, then I don't any immediate idea, this needs investigation on your
system.

Samuel

Martin-Éric Racine

unread,
Dec 7, 2023, 4:50:04 AM12/7/23
to
Possibly. The thing is, given how Hurd remains a sketchily documented
OS, I wouldn't remotely know where to look or using what tools.

Martin-Éric

Samuel Thibault

unread,
Dec 7, 2023, 5:00:05 AM12/7/23
to
Martin-Éric Racine, le jeu. 07 déc. 2023 11:31:44 +0200, a ecrit:
?? There are plenty of wiki pages, and the whole source code is just
there to be looked at. The shutdown translator is 160 lines long and
will tell you which RPC it's trying to do to shut down the machine. From
there you have everything.

Read the source, Luke.

This was said to people 20-30 years ago when the free software movement
deployed, this is just exactly the same now, for exactly the same
reasons.

> I wouldn't remotely know where to look or using what tools.

mach_print("foobar\n"); is a very powerful tool, for a start, to know
what is actually happening.

Samuel

Svante Signell

unread,
Dec 7, 2023, 7:10:03 AM12/7/23
to
On Thu, 2023-12-07 at 08:16 +0200, Martin-Éric Racine wrote:
>
> [2023-12-07 08:14](HURD i386)perkelix@pxeth:~$ showtrans /servers/shutdown
> /hurd/shutdown
> [2023-12-07 08:14](HURD i386)perkelix@pxeth:~$ showtrans /servers/acpi
> /hurd/acpi
> [2023-12-07 08:14](HURD i386)perkelix@pxeth:~$ ls /servers/acpi/tables/
> APIC  FACP  SSDT  SSDT  SSDT  SSDT  SSDT  SSDT  SSDT  SSDT  SSDT  SSDT
> [2023-12-07 08:14](HURD i386)perkelix@pxeth:~$

On one of my images:
ls /servers/acpi/tables/
APIC FACP HPET WAET

Wojciech (Voitek) Aniszewski

unread,
Dec 7, 2023, 9:40:04 AM12/7/23
to
I'm running baremetal on a T61 (32bit) laptop.
The poweroff (shutdown -h now) also doesn't work, hurd terminates but
system remains on.

Here's a situation on my system:

wojciech@saiph:~$ showtrans /servers/shutdown
/hurd/shutdown
wojciech@saiph:~$ showtrans /servers/acpi
/hurd/acpi
wojciech@saiph:~$ showtrans ls /servers/acpi/tables
APIC BOOT FACP MCFG SSDT SSDT SSDT TCPA
'ASF!' ECDT HPET SLIC SSDT SSDT SSDT

dunno what I'm looking at unfortunately, docs needed.

cheers
Voitek

[PS. picking up on what Samuel wrote in this thread, I'm willing to look
at the source when time permits,
as well as many aspects of Hurd; this is why I bought that laptop:).
ACPI would be cool to see the remaining
battery percentage... For now I got stuck in the trivial stuff
such as Xorg won't start etc., have to resolve that first.]

---
/^..^\
( (••) )
(|)_._(|)~
Wojciech (Voitek) ANISZEWSKI
OrcId : https://orcid.org/0000-0002-4248-1194
Scholar: https://tinyurl.com/y28b8gfp
RG : https://www.researchgate.net/profile/Wojciech_Aniszewski
Twitter: @echo_dancers3
GPG ID : AC66485E

Samuel Thibault

unread,
Dec 7, 2023, 6:00:05 PM12/7/23
to
Wojciech (Voitek) Aniszewski, le jeu. 07 déc. 2023 14:23:35 +0100, a ecrit:
> wojciech@saiph:~$ showtrans /servers/shutdown
> /hurd/shutdown
> wojciech@saiph:~$ showtrans /servers/acpi
> /hurd/acpi
> wojciech@saiph:~$ showtrans ls /servers/acpi/tables
> APIC BOOT FACP MCFG SSDT SSDT SSDT TCPA
> 'ASF!' ECDT HPET SLIC SSDT SSDT SSDT
>
> dunno what I'm looking at unfortunately,

To tell the real truth, I don't know what these tables are either.

> docs needed.

ACPI is documented, that's completely independent from the Hurd.

That being said, start from the start: the shutdown trigger is performed
by the shutdown translator, in shutdown/shutdown.c, which calls into the
acpi translator. Then it's a matter of following the function calls, put
mach_print() calls along the way, and check what is actually happening.

Samuel
0 new messages