Re: poweroff support on Hurd?

2023-12-07 Thread Samuel Thibault
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



Re: poweroff support on Hurd?

2023-12-07 Thread Wojciech (Voitek) Aniszewski

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/-0002-4248-1194
Scholar: https://tinyurl.com/y28b8gfp
RG : https://www.researchgate.net/profile/Wojciech_Aniszewski
Twitter: @echo_dancers3
GPG ID : AC66485E


Le 2023-12-07 13:03, Svante Signell a écrit :

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




Re: poweroff support on Hurd?

2023-12-07 Thread Svante Signell
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




Re: poweroff support on Hurd?

2023-12-07 Thread Samuel Thibault
Martin-Éric Racine, le jeu. 07 déc. 2023 11:31:44 +0200, a ecrit:
> On Thu, Dec 7, 2023 at 11:26 AM Samuel Thibault  wrote:
> >
> > Martin-Éric Racine, le jeu. 07 déc. 2023 08:16:34 +0200, a ecrit:
> > > On Thu, Dec 7, 2023 at 2:13 AM Samuel Thibault  
> > > wrote:
> > > > 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  
> > > > > 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?
> > >
> > > [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:~$
> >
> > Ok, then I don't any immediate idea, this needs investigation on your
> > system.
> 
> Possibly.  The thing is, given how Hurd remains a sketchily documented
> OS,

?? 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



Re: poweroff support on Hurd?

2023-12-07 Thread Martin-Éric Racine
On Thu, Dec 7, 2023 at 11:26 AM Samuel Thibault  wrote:
>
> Martin-Éric Racine, le jeu. 07 déc. 2023 08:16:34 +0200, a ecrit:
> > On Thu, Dec 7, 2023 at 2:13 AM Samuel Thibault  wrote:
> > > 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  
> > > > 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?
> >
> > [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:~$
>
> Ok, then I don't any immediate idea, this needs investigation on your
> system.

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



Re: poweroff support on Hurd?

2023-12-07 Thread Samuel Thibault
Martin-Éric Racine, le jeu. 07 déc. 2023 08:16:34 +0200, a ecrit:
> On Thu, Dec 7, 2023 at 2:13 AM Samuel Thibault  wrote:
> > 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  
> > > 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?
> 
> [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:~$

Ok, then I don't any immediate idea, this needs investigation on your
system.

Samuel