Re: apm doesn't know AC state on APU1C
On Wed, Apr 26, 2023 at 08:48:00PM +0200, Jan Stary wrote: > On Apr 26 11:38:40, dera...@openbsd.org wrote: > > Jan Stary wrote: > > > > > On Apr 26 14:57:22, stu.li...@spacehopper.org wrote: > > > > On 2023-04-26, Jan Stary wrote: > > > > > This is current/amd64 on an APU1C (dmesg below). > > > > > While 'sysctl hw' knows hw.power=1, apm doesn't know: > > > > > > > > > > Battery state: absent, 0% remaining, unknown life estimate > > > > > AC adapter state: not known > > > > > Performance adjustment mode: auto (1000 MHz) > > > > > > > > > > Yes, apmd -A is running. > > > > > > > > > > Not that this matters much, the machine will always be on AC; > > > > > but it still seems strange for apm to not know. > > > > > > > > I don't expect the machine has bothered with a way to pass that > > > > information through to the OS. > > > > > > Does sysctl hw.power know through a different way than apm? > > > > Does your APU1C have acpi? > > Yes (dmesg below). Is that how sysctl hw gets it, as opposed to apm? > > Jan > no acpiac(4). > > OpenBSD 7.3-current (GENERIC.MP) #0: Wed Apr 26 12:48:53 CEST 2023 > h...@stary.stare.cz:/usr/src/sys/arch/amd64/compile/GENERIC.MP > real mem = 2098511872 (2001MB) > avail mem = 2015346688 (1921MB) > random: good seed from bootblocks > mpath0 at root > scsibus0 at mpath0: 256 targets > mainbus0 at root > bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7e16d820 (7 entries) > bios0: vendor coreboot version "4.0" date 09/08/2014 > bios0: PC Engines APU > acpi0 at bios0: ACPI 4.0 > acpi0: sleep states S0 S1 S3 S4 S5 > acpi0: tables DSDT FACP SPCR HPET APIC HEST SSDT SSDT SSDT > acpi0: wakeup devices AGPB(S4) HDMI(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) > PE20(S4) PE21(S4) PE22(S4) PE23(S4) PIBR(S4) UOH1(S3) UOH2(S3) UOH3(S3) > UOH4(S3) UOH5(S3) [...] > acpitimer0 at acpi0: 3579545 Hz, 32 bits > acpihpet0 at acpi0: 14318180 Hz > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat > cpu0 at mainbus0: apid 0 (boot processor) > cpu0: AMD G-T40E Processor, 1000.02 MHz, 14-02-00 > cpu0: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC > cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 2-way I-cache > cpu0: 512KB 64b/line 16-way L2 cache > cpu0: smt 0, core 0, package 0 > mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges > cpu0: apic clock running at 200MHz > cpu0: mwait min=64, max=64, IBE > cpu1 at mainbus0: apid 1 (application processor) > cpu1: AMD G-T40E Processor, 1000.02 MHz, 14-02-00 > cpu1: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC > cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 2-way I-cache > cpu1: 512KB 64b/line 16-way L2 cache > cpu1: smt 0, core 1, package 0 > ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins > acpiprt0 at acpi0: bus 0 (PCI0) > acpiprt1 at acpi0: bus -1 (AGPB) > acpiprt2 at acpi0: bus -1 (HDMI) > acpiprt3 at acpi0: bus 1 (PBR4) > acpiprt4 at acpi0: bus 2 (PBR5) > acpiprt5 at acpi0: bus 3 (PBR6) > acpiprt6 at acpi0: bus -1 (PBR7) > acpiprt7 at acpi0: bus 5 (PE20) > acpiprt8 at acpi0: bus -1 (PE21) > acpiprt9 at acpi0: bus -1 (PE22) > acpiprt10 at acpi0: bus -1 (PE23) > acpiprt11 at acpi0: bus 4 (PIBR) > acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001 > acpicmos0 at acpi0 > acpibtn0 at acpi0: PWRB > acpicpu0 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS > acpicpu1 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS > cpu0: 1000 MHz: speeds: 1000 800 MHz > pci0 at mainbus0 bus 0 > pchb0 at pci0 dev 0 function 0 "AMD 14h Host" rev 0x00 > ppb0 at pci0 dev 4 function 0 "AMD 14h PCIE" rev 0x00: msi > pci1 at ppb0 bus 1 > re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E > (0x2c00), msi, address 00:0d:b9:3d:bb:fc > rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 4 > ppb1 at pci0 dev 5 function 0 "AMD 14h PCIE" rev 0x00: msi > pci2 at ppb1 bus 2 > re1 at pci2 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E > (0x2c00), msi, address 00:0d:b9:3d:bb:fd > rgephy1 at re1 phy 7: RTL8169S/8110S/8211 PHY, rev. 4 > ppb2 at pci0 dev 6 function 0 "AMD 14h PCIE" rev 0x00: msi > pci3 at ppb2 bus 3 > re2 at pci3 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E > (0x2c00), msi, address 00:0d:b9:3d:bb:fe > rgephy2 at re2 phy 7: RTL8169S/8110S/8211 PHY, rev. 4 > ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x40: apic 2 int 19, > AHCI 1.2 > scsibus1 at ahci0: 32 targets > ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 18, > version 1.0, legacy support > ehci0 at pci0 dev 18 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17 > usb0 at ehci0: USB revision 2.0 > uhub0 at usb0 configuration 1 interface 0 "ATI
Re: apm doesn't know AC state on APU1C
On Apr 26 11:38:40, dera...@openbsd.org wrote: > Jan Stary wrote: > > > On Apr 26 14:57:22, stu.li...@spacehopper.org wrote: > > > On 2023-04-26, Jan Stary wrote: > > > > This is current/amd64 on an APU1C (dmesg below). > > > > While 'sysctl hw' knows hw.power=1, apm doesn't know: > > > > > > > > Battery state: absent, 0% remaining, unknown life estimate > > > > AC adapter state: not known > > > > Performance adjustment mode: auto (1000 MHz) > > > > > > > > Yes, apmd -A is running. > > > > > > > > Not that this matters much, the machine will always be on AC; > > > > but it still seems strange for apm to not know. > > > > > > I don't expect the machine has bothered with a way to pass that > > > information through to the OS. > > > > Does sysctl hw.power know through a different way than apm? > > Does your APU1C have acpi? Yes (dmesg below). Is that how sysctl hw gets it, as opposed to apm? Jan OpenBSD 7.3-current (GENERIC.MP) #0: Wed Apr 26 12:48:53 CEST 2023 h...@stary.stare.cz:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 2098511872 (2001MB) avail mem = 2015346688 (1921MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7e16d820 (7 entries) bios0: vendor coreboot version "4.0" date 09/08/2014 bios0: PC Engines APU acpi0 at bios0: ACPI 4.0 acpi0: sleep states S0 S1 S3 S4 S5 acpi0: tables DSDT FACP SPCR HPET APIC HEST SSDT SSDT SSDT acpi0: wakeup devices AGPB(S4) HDMI(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PE20(S4) PE21(S4) PE22(S4) PE23(S4) PIBR(S4) UOH1(S3) UOH2(S3) UOH3(S3) UOH4(S3) UOH5(S3) [...] acpitimer0 at acpi0: 3579545 Hz, 32 bits acpihpet0 at acpi0: 14318180 Hz acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD G-T40E Processor, 1000.02 MHz, 14-02-00 cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 2-way I-cache cpu0: 512KB 64b/line 16-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 200MHz cpu0: mwait min=64, max=64, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: AMD G-T40E Processor, 1000.02 MHz, 14-02-00 cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 2-way I-cache cpu1: 512KB 64b/line 16-way L2 cache cpu1: smt 0, core 1, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 21, 24 pins acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (AGPB) acpiprt2 at acpi0: bus -1 (HDMI) acpiprt3 at acpi0: bus 1 (PBR4) acpiprt4 at acpi0: bus 2 (PBR5) acpiprt5 at acpi0: bus 3 (PBR6) acpiprt6 at acpi0: bus -1 (PBR7) acpiprt7 at acpi0: bus 5 (PE20) acpiprt8 at acpi0: bus -1 (PE21) acpiprt9 at acpi0: bus -1 (PE22) acpiprt10 at acpi0: bus -1 (PE23) acpiprt11 at acpi0: bus 4 (PIBR) acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001 acpicmos0 at acpi0 acpibtn0 at acpi0: PWRB acpicpu0 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS acpicpu1 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS cpu0: 1000 MHz: speeds: 1000 800 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "AMD 14h Host" rev 0x00 ppb0 at pci0 dev 4 function 0 "AMD 14h PCIE" rev 0x00: msi pci1 at ppb0 bus 1 re0 at pci1 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E (0x2c00), msi, address 00:0d:b9:3d:bb:fc rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 4 ppb1 at pci0 dev 5 function 0 "AMD 14h PCIE" rev 0x00: msi pci2 at ppb1 bus 2 re1 at pci2 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E (0x2c00), msi, address 00:0d:b9:3d:bb:fd rgephy1 at re1 phy 7: RTL8169S/8110S/8211 PHY, rev. 4 ppb2 at pci0 dev 6 function 0 "AMD 14h PCIE" rev 0x00: msi pci3 at ppb2 bus 3 re2 at pci3 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E (0x2c00), msi, address 00:0d:b9:3d:bb:fe rgephy2 at re2 phy 7: RTL8169S/8110S/8211 PHY, rev. 4 ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x40: apic 2 int 19, AHCI 1.2 scsibus1 at ahci0: 32 targets ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 18, version 1.0, legacy support ehci0 at pci0 dev 18 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 configuration 1 interface 0 "ATI EHCI root hub" rev 2.00/1.00 addr 1 ohci1 at pci0 dev 19 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 18, version 1.0, legacy support ehci1 at pci0 dev 19 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17 usb1 at ehci1: USB revision 2.0 uhub1 at usb1 configuration 1 interface
Re: apm doesn't know AC state on APU1C
Jan Stary wrote: > On Apr 26 14:57:22, stu.li...@spacehopper.org wrote: > > On 2023-04-26, Jan Stary wrote: > > > This is current/amd64 on an APU1C (dmesg below). > > > While 'sysctl hw' knows hw.power=1, apm doesn't know: > > > > > > Battery state: absent, 0% remaining, unknown life estimate > > > AC adapter state: not known > > > Performance adjustment mode: auto (1000 MHz) > > > > > > Yes, apmd -A is running. > > > > > > Not that this matters much, the machine will always be on AC; > > > but it still seems strange for apm to not know. > > > > I don't expect the machine has bothered with a way to pass that > > information through to the OS. > > Does sysctl hw.power know through a different way than apm? Does your APU1C have acpi?
Re: apm doesn't know AC state on APU1C
On Apr 26 14:57:22, stu.li...@spacehopper.org wrote: > On 2023-04-26, Jan Stary wrote: > > This is current/amd64 on an APU1C (dmesg below). > > While 'sysctl hw' knows hw.power=1, apm doesn't know: > > > > Battery state: absent, 0% remaining, unknown life estimate > > AC adapter state: not known > > Performance adjustment mode: auto (1000 MHz) > > > > Yes, apmd -A is running. > > > > Not that this matters much, the machine will always be on AC; > > but it still seems strange for apm to not know. > > I don't expect the machine has bothered with a way to pass that > information through to the OS. Does sysctl hw.power know through a different way than apm?
Re: apm doesn't know AC state on APU1C
On 2023-04-26, Jan Stary wrote: > This is current/amd64 on an APU1C (dmesg below). > While 'sysctl hw' knows hw.power=1, apm doesn't know: > > Battery state: absent, 0% remaining, unknown life estimate > AC adapter state: not known > Performance adjustment mode: auto (1000 MHz) > > Yes, apmd -A is running. > > Not that this matters much, the machine will always be on AC; > but it still seems strange for apm to not know. I don't expect the machine has bothered with a way to pass that information through to the OS. The AC adapter state in my normal servers and VMs is "not known" too. I don't think there is any problem.