Re: pcengines apu{1,4} can't adjust CPU frequency automatically anymore

2022-11-27 Thread Jan Stary
apm -A on AC power runs at max, for some time now.

Jan

On Nov 28 06:37:02, l...@ecentrum.hu wrote:
> Hi all,
> 
> I don't know since when, unfortunately, but it seems auto-adjusting CPU 
> frequency doesn't work anymore on my APU1 and an APU4 PCEngines boards (I 
> only have these versions at hand atm).
> They're both running an updated fw at v4.17.0.2.
> 
> IIRC `apmd -A' + `sysctl hw.perfpolicy=auto' did the trick earlier, but I'll 
> be honest, I haven't checked this since forever.
> 
> APU1 has two and the APU4 has three frequencies to set:
> cpu0: 1000 MHz: speeds: 1000 800 MHz
> cpu0: 998 MHz: speeds: 1000 800 600 MHz
> 
> I can manually adjust this with hw.setperf when hw.perfpolicy is 'manual', so 
> setting the frequency actually works, it's just that it can't seems to 
> "detect" load/change when it's set to 'auto'.
> 
> 
> Daniel
> 
> 
> 
> ==> APU1:
> OpenBSD 7.2 (GENERIC.MP) #2: Thu Nov 24 23:54:39 MST 2022
> 
> r...@syspatch-72-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 2112143360 (2014MB)
> avail mem = 2030804992 (1936MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x7ee4e040 (9 entries)
> bios0: vendor coreboot version "v4.17.0.2" date 07/28/2022
> bios0: PC Engines apu1
> acpi0 at bios0: ACPI 6.0
> acpi0: sleep states S0 S1 S3 S4 S5
> acpi0: tables DSDT FACP SSDT MCFG TPM2 APIC HEST SSDT SSDT HPET
> acpi0: wakeup devices AGPB(S4) HDMI(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) 
> PE20(S4) PE21(S4) PE22(S4) PE23(S4) UOH1(S3) UOH2(S3) UOH3(S3) UOH4(S3) 
> UOH5(S3) UOH6(S3) [...]
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xf800, bus 0-63
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD G-T40E Processor, 1000.08 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
> 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.01 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
> acpihpet0 at acpi0: 14318180 Hz
> 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 -1 (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)
> acpicpu0 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
> acpicpu1 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
> acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
> "PRP0001" at acpi0 not configured
> "PRP0001" at acpi0 not configured
> "PRP0001" at acpi0 not configured
> "PRP0001" at acpi0 not configured
> "PRP0001" at acpi0 not configured
> "PRP0001" at acpi0 not configured
> "PRP0001" at acpi0 not configured
> acpicmos0 at acpi0
> "BOOT" at acpi0 not configured
> acpitz0 at acpi0: critical temperature is 110 degC
> 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
> 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
> 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
> 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
> ahci0: port 0: 3.0Gb/s
> scsibus1 at ahci0: 32 targets
> sd0 at scsibus1 targ 0 lun 0:  
> naa.50026b725701bf6a
> sd0: 28626MB, 

Re: [misc] pcengines apu{1,4} can't adjust CPU frequency automatically anymore

2022-11-27 Thread Vlad Meșco
Le 28 novembre 2022 08:37:02 GMT+02:00, "Lévai, Dániel"  a 
écrit :
>Hi all,
>
>I don't know since when, unfortunately, but it seems auto-adjusting CPU 
>frequency doesn't work anymore on my APU1 and an APU4 PCEngines boards (I only 
>have these versions at hand atm).
>They're both running an updated fw at v4.17.0.2.
>
>IIRC `apmd -A' + `sysctl hw.perfpolicy=auto' did the trick earlier, but I'll 
>be honest, I haven't checked this since forever.
>
>APU1 has two and the APU4 has three frequencies to set:
>cpu0: 1000 MHz: speeds: 1000 800 MHz
>cpu0: 998 MHz: speeds: 1000 800 600 MHz
>
>I can manually adjust this with hw.setperf when hw.perfpolicy is 'manual', so 
>setting the frequency actually works, it's just that it can't seems to 
>"detect" load/change when it's set to 'auto'.
>
>
>Daniel
>
>
>
>==> APU1:
>OpenBSD 7.2 (GENERIC.MP) #2: Thu Nov 24 23:54:39 MST 2022
>
> r...@syspatch-72-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>real mem = 2112143360 (2014MB)
>avail mem = 2030804992 (1936MB)
>random: good seed from bootblocks
>mpath0 at root
>scsibus0 at mpath0: 256 targets
>mainbus0 at root
>bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x7ee4e040 (9 entries)
>bios0: vendor coreboot version "v4.17.0.2" date 07/28/2022
>bios0: PC Engines apu1
>acpi0 at bios0: ACPI 6.0
>acpi0: sleep states S0 S1 S3 S4 S5
>acpi0: tables DSDT FACP SSDT MCFG TPM2 APIC HEST SSDT SSDT HPET
>acpi0: wakeup devices AGPB(S4) HDMI(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) 
>PE20(S4) PE21(S4) PE22(S4) PE23(S4) UOH1(S3) UOH2(S3) UOH3(S3) UOH4(S3) 
>UOH5(S3) UOH6(S3) [...]
>acpitimer0 at acpi0: 3579545 Hz, 32 bits
>acpimcfg0 at acpi0
>acpimcfg0: addr 0xf800, bus 0-63
>acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
>cpu0 at mainbus0: apid 0 (boot processor)
>cpu0: AMD G-T40E Processor, 1000.08 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
>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.01 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
>acpihpet0 at acpi0: 14318180 Hz
>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 -1 (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)
>acpicpu0 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
>acpicpu1 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
>acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
>"PRP0001" at acpi0 not configured
>"PRP0001" at acpi0 not configured
>"PRP0001" at acpi0 not configured
>"PRP0001" at acpi0 not configured
>"PRP0001" at acpi0 not configured
>"PRP0001" at acpi0 not configured
>"PRP0001" at acpi0 not configured
>acpicmos0 at acpi0
>"BOOT" at acpi0 not configured
>acpitz0 at acpi0: critical temperature is 110 degC
>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
>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
>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
>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
>ahci0: port 0: 3.0Gb/s
>scsibus1 at ahci0: 32 targets
>sd0 at scsibus1 targ 0 lun 0:  
>naa.50026b725701bf6a
>sd0: 28626MB, 512 bytes/sector, 58626288 sectors, thin
>ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 18, 
>version 1.0, legacy support

pcengines apu{1,4} can't adjust CPU frequency automatically anymore

2022-11-27 Thread Lévai , Dániel
Hi all,

I don't know since when, unfortunately, but it seems auto-adjusting CPU 
frequency doesn't work anymore on my APU1 and an APU4 PCEngines boards (I only 
have these versions at hand atm).
They're both running an updated fw at v4.17.0.2.

IIRC `apmd -A' + `sysctl hw.perfpolicy=auto' did the trick earlier, but I'll be 
honest, I haven't checked this since forever.

APU1 has two and the APU4 has three frequencies to set:
cpu0: 1000 MHz: speeds: 1000 800 MHz
cpu0: 998 MHz: speeds: 1000 800 600 MHz

I can manually adjust this with hw.setperf when hw.perfpolicy is 'manual', so 
setting the frequency actually works, it's just that it can't seems to "detect" 
load/change when it's set to 'auto'.


Daniel



==> APU1:
OpenBSD 7.2 (GENERIC.MP) #2: Thu Nov 24 23:54:39 MST 2022

r...@syspatch-72-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2112143360 (2014MB)
avail mem = 2030804992 (1936MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x7ee4e040 (9 entries)
bios0: vendor coreboot version "v4.17.0.2" date 07/28/2022
bios0: PC Engines apu1
acpi0 at bios0: ACPI 6.0
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP SSDT MCFG TPM2 APIC HEST SSDT SSDT HPET
acpi0: wakeup devices AGPB(S4) HDMI(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) 
PE20(S4) PE21(S4) PE22(S4) PE23(S4) UOH1(S3) UOH2(S3) UOH3(S3) UOH4(S3) 
UOH5(S3) UOH6(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimcfg0 at acpi0
acpimcfg0: addr 0xf800, bus 0-63
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD G-T40E Processor, 1000.08 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
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.01 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
acpihpet0 at acpi0: 14318180 Hz
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 -1 (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)
acpicpu0 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
acpicpu1 at acpi0: C2(0@100 io@0x841), C1(@1 halt!), PSS
acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
"PRP0001" at acpi0 not configured
"PRP0001" at acpi0 not configured
"PRP0001" at acpi0 not configured
"PRP0001" at acpi0 not configured
"PRP0001" at acpi0 not configured
"PRP0001" at acpi0 not configured
"PRP0001" at acpi0 not configured
acpicmos0 at acpi0
"BOOT" at acpi0 not configured
acpitz0 at acpi0: critical temperature is 110 degC
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
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
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
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
ahci0: port 0: 3.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0:  naa.50026b725701bf6a
sd0: 28626MB, 512 bytes/sector, 58626288 sectors, thin
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

Re: Query on installing Solaris 9 into an OBSD LDOM

2022-11-27 Thread Bodie




On 28.11.2022 05:50, Kevin Williams wrote:

Greetings.

Has anyone tried to install Solaris 9 into an OBSD LDOM running on a 
TS2000?


(I found some information on the mailing list pertaining to different
machines and Solaris versions.)

Sincerely,
N.


We need more information to better assist you.

By LDOM, do you mean you want to use Oracle VM Server for Sparc? Does
that even run on OpenBSD?


He obviously talks about OpenBSD technology ldomd(8) ;-)



Or are you using OpenBSD’s native vmm?

Are you using the Sparc or Intel version of Solaris 9?

Which architecture does the host machine use?

Would you please post a full dmesg of the host machine?




Re: Query on installing Solaris 9 into an OBSD LDOM

2022-11-27 Thread Kevin Williams


> Greetings.
> 
> Has anyone tried to install Solaris 9 into an OBSD LDOM running on a TS2000?
> 
> (I found some information on the mailing list pertaining to different 
> machines and Solaris versions.)
> 
> Sincerely,
> N.
> 
We need more information to better assist you.

By LDOM, do you mean you want to use Oracle VM Server for Sparc? Does that even 
run on OpenBSD?

Or are you using OpenBSD’s native vmm?

Are you using the Sparc or Intel version of Solaris 9?

Which architecture does the host machine use?

Would you please post a full dmesg of the host machine?


Query on installing Solaris 9 into an OBSD LDOM

2022-11-27 Thread Stuff Received

Greetings.

Has anyone tried to install Solaris 9 into an OBSD LDOM running on a TS2000?

(I found some information on the mailing list pertaining to different 
machines and Solaris versions.)


Sincerely,
N.



IPv6: ifconfig & rad messages fight disabling routes

2022-11-27 Thread Geoff Steckel

Short form:
  I'm using rad to update local machines with the IPv6 address prefix
currently assigned by Verizon. It runs on my firewall/external router.
The router advertisement destructively changes the route and interface
of an address on that machine.

dhcpcd gets /56 from Verizon fiber service.
manually ifconfig interface1 inet6 ::9/56
netstat -rn -f inet6 shows
  :: and ::9 routed via interface1
everything works.
rad message sent out from interface1:
  /56 valid 1000 preferred 1
netstat now shows
   routed via lo0
  ::9 is still on interface1
That address is now (mostly) unusable
Other addresses assigned to that interface work.

Is this expected?
Possible workarounds:
  blocking loopback of router advertisements (preferred)
  dhcp6 server for guest machines & fixed assignments
  for servers/test machine (inconvenient or worse)
  Monitor prefix for changes - hope that's not often

I have to assume the mechanism which processes RAs follows the
RFC and uses the link level address of the sender.
I hypothesize it sees lo0 as the sender
and Bad Things happen.

ding:236$ doas ifconfig cnmac0 inet6 2600:4040:::7 prefixlen 56
ding:237$ netstat -rn -f inet6

2600:4040::::/56 2600:4040::xxx::7  UCn    
0    0 - 4 cnmac0
2600:4040::::7 f0:9f:c2:cf:9e:e7  UHLl   
0    0 - 1 cnmac0

--- rad message

22:06:10.869060 fe80::f29f:c2ff:fecf:9ee7 > ff02::1: icmp6: router 
advertisement
  (chlim=64, pref=medium, router_ltime=1800, reachable_time=0, 
retrans_time=0)
  (prefix info: LA valid_ltime=7200, preferred_ltime=7200, 
prefix=2600:4040::xxx::/56)
  (prefix info: LA valid_ltime=2592000, preferred_ltime=604800, 
prefix=fde3:3eec:4f3c:29dc::/64)
  (rdnss: lifetime=2000s, addr=fde3:3eec:4f3c:29dc::7)(dnssl: 
opt_len=3) [icmp6 cksum ok] (len 128, hlim 255)


2600:4040::xxx::/56    ::1 UGR    0  718 32768    56 
lo0
2600:4040::xxx::7  f0:9f:c2:cf:9e:e7 UHLl   0   
16 - 1 cnmac0



There's a off-by-4 in RAD display in tcpdump. Will post that later.
I added the extra detail in that as well - will post if anyone things 
it's useful.

 geoff steckel



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread Bodie




On 27.11.2022 21:07, James Johnson wrote:

Thank you for this interesting perspective.

Combined with the previous advice, I am convinced. I will not try to
have the machine sleep, or even try to put the drives in spun down.
From what you guys are saying, it seems doing so would be
over-engineering.

What are your thoughts regarding reboots? Should I do a daily, weekly,
monthly reboot?



Now even more curious what it is running. If that would be something
mission critical you would not be asking these questions.

Which means you're learning along the way.

If it's not some environment monitor which needs to be physical locally
then for just running scripts you may be better served by free Docker
instance avoiding handling of physical computer (true getting different
source of possible problems, but smaller ones :-))




On 27 Nov 2022, at 20:00, Bodie  wrote:



On 27.11.2022 10:37, James Johnson wrote:

Hi all,
OpenBSD is amazing. But I need help in configuring it correctly as a
remote server, rarely used.
The main thing I am trying to do is to make it sleep every now and
then to protect resources. I am very flexible on how to do this, but
have been unable to do so.
Here's what I tried :
1) Make it sleep and wake up when woken up remotely
I investigated Wake On Lan, which I enabled via ifconfig. However,
this system is deployed remotely, and I have no access to other
computers on the LAN, so I am unable to make this work.
2) Make it sleep for a few hours and then wake up
After 3hours+ of research in man pages and the internet, I have not
seen any solution for that.
3) hard drives Spin down, CPU lower freq
I have been able to lower the CPU speed by running `apm -L`.
I haven't been able to spin down the hard drives.
How important is it to manually send a command to spin down the 
unused

harddrives? Will it be down by the system automatically?
I am trying to get info on the drives from the system but `atactl sd0
checkpower ` always shows `standby` even after I have just written on
the disk. I understand this does not work because my drives are SCSI
and not ATA.
I read the man page for scsi, and I see the command to spin down hard
drives : `scsi -f /dev/rsd2c -c "1b 0 0 0 0 0"`
However, I see no command to spin them back up. Is it automatic?
How can I request information on the spin state of the drive. I am
just a little worried about starting to send low levels instructions
to the hard drive, with little understanding of it. Is it safe to 
send

this command?
Thanks all !
PS : dmesg : I cannot share the full dmesg for security reasons, but
it is a fairly standard i386 machine, with 2 drives mounted as SCSI.


As already pointed out by others. Don't do that ;-) Unless you explain
why you need to do that (I'm sure it is possible without disclosing 
much)


I build systems running for eg. 12 years, amd64 architecture, SATA 
disks,

DDR RAM and so on. Serving number of virtual machines with constantly
higher number of utilizations and in dozens of them only 2 problems
during those years - battery for internal RAID run out :-)

Saw systems which were running for over 30 years and nothing wrong 
with

them.

Can't talk about electricity as those are basically underground cities
and there are different problems then if CPU is running 3 or 1GHz ;-)

Sounds like maybe some IoT solution, but then go for ARM or use 
virtual

machine in eg. OpenBSD Amsterdam or you really need compute power on
demand then go for free options in eg. Azure (12 months free basic 
Linux)

or Oracle Cloud Infrastructure or whatever else you find fit.

Either it is so important, need to be physically under your control 
and
then small differences in electricity does not matter or solutions 
above

are perfectly fine for your needs.

Just one hint. No matter if own machine or something rented you want 
that

machine to be worth the money that means to do something on it and not
have it shut down ;-)




Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread Tomasz Rola
On Sun, Nov 27, 2022 at 09:37:19AM +, James Johnson wrote:
> Hi all,
> 
> OpenBSD is amazing. But I need help in configuring it correctly as a
> remote server, rarely used. 
> 
> 
> The main thing I am trying to do is to make it sleep every now and
> then to protect resources. I am very flexible on how to do this, but
> have been unable to do so.
> Here's what I tried :
[...]

So to sum up your requirements, you want a self driving box which
waits, and once every month or six wakes up, does something, then goes
idle again.

I would avoid power down/up completely - boot takes time, and fsck
takes some more time. Also, AFAIK electronics wears down every time it
goes on-off.

Modern HDD are said to live to 5 on-off cycles, so assume 2
cold boots. But random things can happen, because on-off means power
spike. If you have no problem with eletricity, I would keep it going
all the time. I would however minimise writes. Work on temporary data
in ramdisk, write results to disk. Something like this.

BIOS battery goes down faster when computer is powered down. When it
is up, clock gets power from the wall and saves the battery. I assume
the modern CMOS battery will only keep the clock for about a year
without power and it will not recharge when you power up. After that
time (and before that time, too, but less necessary), every boot
should include query to time server and adjusting the hardware clock.

I would buy a decent PSU. Last time I wanted to know, Seasonic was the
maker of best ones a mortal could buy. Their last unit I bought came
with 10 years warranty. AND, according to description, it was built
with classic electronic art, analog parts, no digital. So if you are
so inclined, you can ask your electronic buddy to inspect it and
perhaps even replace some parts with better ones. Or repair it. If
microcontroller goes bunk, you are out of luck, I assume they somehow
protect their eproms.

If you plan to store some long term data on this box, I would avoid
SSD. They are fast but they also can go bunk and when they do, chance
of recovering data is close to nil (from what I have read).

I would consider putting the box in a plastic bag to protect from dust
and humidity. Dust will clog into radiators, make chips go hotter,
ventillators work harder. I have not tested this, however. I assume
thermal exchange with loose bag over the box should go ok, but you
need to test it very carefully, monitoring temps all the time - all
temps.

HTH

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.  **
** As the answer, master did "rm -rif" on the programmer's home**
** directory. And then the C programmer became enlightened...  **
** **
** Tomasz Rola  mailto:tomasz_r...@bigfoot.com **



Re: Does Lenovo X13s runs on -current? 2022q4

2022-11-27 Thread Mikolaj Kucharski
I tried again, without full disk encryption and it works. System booted
properly to a console login prompt.

On Sun, Nov 27, 2022 at 08:40:57PM +, Mikolaj Kucharski wrote:
> Hi,
> 
> I was able to go through installer on today's arm64 snapshot with full
> disk encryption setup. With some manual `sh MAKEDEV sd0 sd1` during the
> installer I managed to install, but then after first boot passphrase and
> boot> prompt I see
> 
> booting sr0a:/bsd: 9769...
> FACP CSRT DBG2 GTDT IORT APIC MCFG PPTT SPCR TPM2 MSDM BGRT
> 
> and then nothing happens. BOOTAA64 1.13. Above is retyped, so there
> could be typos.
> 
> I disabled secure boot, that is the only change in BIOS I did so far.
> 
> Any tips?
> 
> Please CC me in any replies.
> 

-- 
Regards,
 Mikolaj



Does Lenovo X13s runs on -current? 2022q4

2022-11-27 Thread Mikolaj Kucharski
Hi,

I was able to go through installer on today's arm64 snapshot with full
disk encryption setup. With some manual `sh MAKEDEV sd0 sd1` during the
installer I managed to install, but then after first boot passphrase and
boot> prompt I see

booting sr0a:/bsd: 9769...
FACP CSRT DBG2 GTDT IORT APIC MCFG PPTT SPCR TPM2 MSDM BGRT

and then nothing happens. BOOTAA64 1.13. Above is retyped, so there
could be typos.

I disabled secure boot, that is the only change in BIOS I did so far.

Any tips?

Please CC me in any replies.

-- 
Regards,
 Mikolaj



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson
Thank you for this interesting perspective. 

Combined with the previous advice, I am convinced. I will not try to have the 
machine sleep, or even try to put the drives in spun down. From what you guys 
are saying, it seems doing so would be over-engineering.

What are your thoughts regarding reboots? Should I do a daily, weekly, monthly 
reboot?


> On 27 Nov 2022, at 20:00, Bodie  wrote:
> 
> 
> 
> On 27.11.2022 10:37, James Johnson wrote:
>> Hi all,
>> OpenBSD is amazing. But I need help in configuring it correctly as a
>> remote server, rarely used.
>> The main thing I am trying to do is to make it sleep every now and
>> then to protect resources. I am very flexible on how to do this, but
>> have been unable to do so.
>> Here's what I tried :
>> 1) Make it sleep and wake up when woken up remotely
>> I investigated Wake On Lan, which I enabled via ifconfig. However,
>> this system is deployed remotely, and I have no access to other
>> computers on the LAN, so I am unable to make this work.
>> 2) Make it sleep for a few hours and then wake up
>> After 3hours+ of research in man pages and the internet, I have not
>> seen any solution for that.
>> 3) hard drives Spin down, CPU lower freq
>> I have been able to lower the CPU speed by running `apm -L`.
>> I haven't been able to spin down the hard drives.
>> How important is it to manually send a command to spin down the unused
>> harddrives? Will it be down by the system automatically?
>> I am trying to get info on the drives from the system but `atactl sd0
>> checkpower ` always shows `standby` even after I have just written on
>> the disk. I understand this does not work because my drives are SCSI
>> and not ATA.
>> I read the man page for scsi, and I see the command to spin down hard
>> drives : `scsi -f /dev/rsd2c -c "1b 0 0 0 0 0"`
>> However, I see no command to spin them back up. Is it automatic?
>> How can I request information on the spin state of the drive. I am
>> just a little worried about starting to send low levels instructions
>> to the hard drive, with little understanding of it. Is it safe to send
>> this command?
>> Thanks all !
>> PS : dmesg : I cannot share the full dmesg for security reasons, but
>> it is a fairly standard i386 machine, with 2 drives mounted as SCSI.
> 
> As already pointed out by others. Don't do that ;-) Unless you explain
> why you need to do that (I'm sure it is possible without disclosing much)
> 
> I build systems running for eg. 12 years, amd64 architecture, SATA disks,
> DDR RAM and so on. Serving number of virtual machines with constantly
> higher number of utilizations and in dozens of them only 2 problems
> during those years - battery for internal RAID run out :-)
> 
> Saw systems which were running for over 30 years and nothing wrong with
> them.
> 
> Can't talk about electricity as those are basically underground cities
> and there are different problems then if CPU is running 3 or 1GHz ;-)
> 
> Sounds like maybe some IoT solution, but then go for ARM or use virtual
> machine in eg. OpenBSD Amsterdam or you really need compute power on
> demand then go for free options in eg. Azure (12 months free basic Linux)
> or Oracle Cloud Infrastructure or whatever else you find fit.
> 
> Either it is so important, need to be physically under your control and
> then small differences in electricity does not matter or solutions above
> are perfectly fine for your needs.
> 
> Just one hint. No matter if own machine or something rented you want that
> machine to be worth the money that means to do something on it and not
> have it shut down ;-)



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread Bodie




On 27.11.2022 10:37, James Johnson wrote:

Hi all,

OpenBSD is amazing. But I need help in configuring it correctly as a
remote server, rarely used.


The main thing I am trying to do is to make it sleep every now and
then to protect resources. I am very flexible on how to do this, but
have been unable to do so.
Here's what I tried :

1) Make it sleep and wake up when woken up remotely
I investigated Wake On Lan, which I enabled via ifconfig. However,
this system is deployed remotely, and I have no access to other
computers on the LAN, so I am unable to make this work.

2) Make it sleep for a few hours and then wake up
After 3hours+ of research in man pages and the internet, I have not
seen any solution for that.

3) hard drives Spin down, CPU lower freq

I have been able to lower the CPU speed by running `apm -L`.
I haven't been able to spin down the hard drives.
How important is it to manually send a command to spin down the unused
harddrives? Will it be down by the system automatically?

I am trying to get info on the drives from the system but `atactl sd0
checkpower ` always shows `standby` even after I have just written on
the disk. I understand this does not work because my drives are SCSI
and not ATA.
I read the man page for scsi, and I see the command to spin down hard
drives : `scsi -f /dev/rsd2c -c "1b 0 0 0 0 0"`
However, I see no command to spin them back up. Is it automatic?
How can I request information on the spin state of the drive. I am
just a little worried about starting to send low levels instructions
to the hard drive, with little understanding of it. Is it safe to send
this command?

Thanks all !


PS : dmesg : I cannot share the full dmesg for security reasons, but
it is a fairly standard i386 machine, with 2 drives mounted as SCSI.


As already pointed out by others. Don't do that ;-) Unless you explain
why you need to do that (I'm sure it is possible without disclosing 
much)


I build systems running for eg. 12 years, amd64 architecture, SATA 
disks,

DDR RAM and so on. Serving number of virtual machines with constantly
higher number of utilizations and in dozens of them only 2 problems
during those years - battery for internal RAID run out :-)

Saw systems which were running for over 30 years and nothing wrong with
them.

Can't talk about electricity as those are basically underground cities
and there are different problems then if CPU is running 3 or 1GHz ;-)

Sounds like maybe some IoT solution, but then go for ARM or use virtual
machine in eg. OpenBSD Amsterdam or you really need compute power on
demand then go for free options in eg. Azure (12 months free basic 
Linux)

or Oracle Cloud Infrastructure or whatever else you find fit.

Either it is so important, need to be physically under your control and
then small differences in electricity does not matter or solutions above
are perfectly fine for your needs.

Just one hint. No matter if own machine or something rented you want 
that

machine to be worth the money that means to do something on it and not
have it shut down ;-)



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson
"Does it just need to wake up to run a script and then shut down again" -> yes, 
that's basically that. Of course, requirements might evolve.
"Why does it even have to be a separate machine?" -> There are benefits to 
this, including data safety (different location).

Thank you for your help, have a great day.



> On 27 Nov 2022, at 18:09, Jan Stary  wrote:
> 
>>> As for rotating metal disks, they have a lifetime;
>>> that's why replacing them with SSD might be your best bet.
>> 
>> In the case of an SDD, is there no consideration of turning them off,
>> if they are unused for some time?
> 
> No.
> 
>> In the case of HDD, are you saying that putting them in "spun down"
>> mode actually would not increase their lifetime?
> 
> It might, at least they recognize (in smarttools)
> the number of hours spent rorating.
> 
> But as I said, I don;t thnik it's even worth it.
> 
>>> Wait, so you know in advance for how many _months_
>>> the machine can sleep?
>> 
>> Yes...
> 
> So how often is the machine up (per year) and for how long?
> Does it just need to wake up to run a script and then shut down again?
> (Why does it even have to be a separate machine?)
> 



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread Stuart Henderson
On 2022-11-27, Jan Stary  wrote:
> that's why replacing them with SSD might be your best bet.

HDD is likely better for medium-term storage (especially if the device would
be powered down).

https://www.quora.com/How-long-can-SSD-store-data-without-power-Can-data-be-recovered-from-SSD

>> Yes, I do know in advance when the machine needs to run and when it can 
>> sleep.
>
> Then you can set a wakeup alarm in the BIOS (if it has one),
> and simply shutdown -p via cron, at the appropriate time.

Or get a remote power controller, set the machine to autostart on rexovery
after power loss, and shut the whole thing down until you need it.




RAID 1C: Writing Random Data During Installation

2022-11-27 Thread Puru Shartha
Namaste Misc,

ASSUMPTION
Consider two disks sd0 and sd1 assembled into sd2 with RAID 1C as the
discipline.

QUESTION
Which of the following is the correct way to write random data for the
RAID 1C discipline during installation?

1) # dd if=/dev/urandom bs=1m 2>dd.result | tee /dev/rsd0c > /dev/rsd1c
In other words, writing random data to the disk before initializing the
disk (fdisk), creating the partitions (disklabel) and assembling the
softraid device sd2 (bioctl).

2) # dd if=/dev/urandom of=/dev/rsd2c bs=1m
In other words, writing random data to the assembled disk sd2.

3) Both of the above.

CONTEXT
>From the Full Disk Encryption section of Disk FAQ [1]:
"
...
You may want to write random data to the drive first with something like
the following:

# dd if=/dev/urandom of=/dev/rsd0c bs=1m

This can be a very time-consuming process, depending on the speed of
your CPU and disk, as well as the size of the disk. If you don't write
random data to the whole device, it may be possible for an adversary to
deduce how much space is actually being used.
...
"

>From my limited understanding, this concept of writing random data
is applicable for the RAID 1C discipline as well.

However, the guidance on this is missing for RAID 1C discipline.

Hence the question.

Dhanyavaad,
Dharma Artha Kama Moksha

[1] - https://www.openbsd.org/faq/faq14.html#softraidFDE



Re: Documentation of wsconsctl keyboard.map format?

2022-11-27 Thread Vlad Meșco
On Fri, Nov 25, 2022 at 03:32:20AM +0100, Mike Fischer wrote:
> 
> > Am 24.11.2022 um 15:07 schrieb u...@disroot.org:
> > 
> > Hello!
> > 
> > I would like to find some supporting documentation too, if anything is 
> > available, but for certain other reasons 
> > (https://github.com/letoram/arcan/issues/263). Basically, this "desktop 
> > engine" has problems with figuring out my keyboard layouts, and I want to 
> > figure out why. This might've been more appropriate to post in ports@ but 
> > this thread catched my eye, so I'm here. It would be nice to be able to 
> > determine what keycodes correspond to what symbols in console, to figure 
> > out what goes wrong in the process of how Arcan determines my keyboard 
> > layout. Any help appreciated!
> 
> I’m not sure this will help with your issue but here is what I have been able 
> to figure out so far:
> 
> 
> One thing that helped me a bit (though I have not solved this issue yet) was 
> the definition of the keycodes in the USB HID standards. I found this link 
> where presumably the codes sent by USB keyboards are defined:
> https://gist.github.com/MightyPork/6da26e382a7ad91b5496ee55fdc73db2
> Or see https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf table 
> 12 on page 53 for something more official.
> You will still need to figure out which keycodes a specific keyboard will 
> send for certain keys, as there is some ambiguity with regard to the labeling 
> of keys, especially for non-us localizations. For example some of the Apple 
> keyboards have a  modifier key. I don’t see that mentioned in the USB 
> spec. Maybe the keyboard handles this internally but that is simply guessing 
> at the moment.
> 
> The usable entity names are somewhat defined (you need to chop off the prefix 
> of the names) in source code:
> /src/sys/dev/wscons/wsksymdef.h
> Additionally Vlad Meșco mentioned that arbitrary Unicode values can be 
> specified using e.g. unknown_50082 (for U+C3A2?) instead of a known entity. I 
> have not tested this yet.
> 
> The actual predefined keyboard maps are compiled into OpenBSD drivers:
> /src/sys/dev/pckbc/wskbdmap_mfii.c
> /src/sys/dev/usb/ukbdmap.c (which seems to be derived from wskbdmap_mfii.c)
> 
> 
> Note: All of the OpenBSD source files can be found at: 
> https://cvsweb.openbsd.org
> 
> 
> That doesn’t explain the syntax of keyboard.map though.
> 
> And I have analyzed the de keyboard.encoding somewhat and found it to be 
> quite different from the way macOS treats German Apple USB keyboards.
> 
> ...
> 
> But apparently the 4 columns in the keycode entries are:   
>  
> Note: On non-Apple keyboards  may be labeled as . Apple 
> labels both  and  as  and does not generally 
> differentiate between the two.
> 
> Adding the very obscure:
> wsconsctl keyboard.map+="keycode 226 = Cmd2 Mode_switch Multi_key"
> (modified from the example Vlad Meșco mentioned to match the  
> keycode from the USB spec) finally yielded the expected result:
> <7>: 7 (expected, ok)
> <7>: / (expected, ok)
> <7>: | (expected, ok)
> <7>: \ (expected, ok)
> <7>: | (expected, ok)
> <7>: \ (expected, ok)
> 
> I can use this but I don’t understand how it works. :-(
> 
> ...
> 
> More enlightened but still puzzled…
> Mike
> 

Hey Mike,

You can look at /usr/src/sbin/wsconsctl/map.parse.y (or browse
cvsweb.openbsd.org if you don't have sources locally). It is the yacc
file for the syntax of parsing keyboard.map statements. It's close to
BNF if you're unfamiliar with yacc, i.e. it formally describes the
grammar.

/* Parse a keyboard map. Statements are one of
 *
 * keysym sym1 = sym2   Assign the key containing `sym2' to
 *  the key containing `sym1'. This is a copy
 *  from the old to the new map. Therefore it
 *  is possible to exchange keys.
 *
 * keycode pos = sym ...assign the symbols to key `pos'.
 *  The first symbol may be a command.
 *  The following symbols are assigned
 *  to the normal and altgr groups.
 *  Missing symbols are generated automatically
 *  as either the upper case variant or the
 *  normal group.
 */

As mentioned earlier, the keysyms and commands and groups are listed in
/usr/src/sys/dev/wscons/wsksymdef.h . Around line 485 you get into
modifiers, function keys, and command keys.

For educational purposes, you can go check /usr/src/sbin/wsconsctl,
where e.g. util.c lists keyboard types. Another place is
/usr/include/dev/wscons/wsconsio.h which also lists what tokens
wsconsctl likes. The wscons driver is in /usr/src/sys/dev/wscons (also,
man 8 wskbd), and keyboard drivers are also thereabout (man -k kbd &&
man -k kbc). You can check `wsconsctl keyboard.type' to see what you
have, then check that driver for scancodes.

Scancodes are keyboard specific. E.g. for PC keyboard or USB keyboard,

Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread Luke A. Call
On 2022-11-27 12:33:18-0500, Nick Holland  wrote:
> Steady-state is easiest on hw.  Powering up and down is large power
> surges, and that's generally not good.  This is across the board --
> power supply, hard drives, main board, CPU, memory, etc.  The only
> part that I think gets a benefit from being turned off would be a CRT
> monitor, and maybe the HV in an older LCD monitor.

Some Corroboration of that:  a Ph.D. physicist at a major semiconductor
manufacturer told me that power cycles cause more wear damage to memory 
chips (at least) than heat does (assuming somewhat normal use I 
imagine).

--
Luke Call
lukecall.net



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread Jan Stary
> > As for rotating metal disks, they have a lifetime;
> > that's why replacing them with SSD might be your best bet.
> 
> In the case of an SDD, is there no consideration of turning them off,
> if they are unused for some time?

No.

> In the case of HDD, are you saying that putting them in "spun down"
> mode actually would not increase their lifetime?

It might, at least they recognize (in smarttools)
the number of hours spent rorating.

But as I said, I don;t thnik it's even worth it.

> > Wait, so you know in advance for how many _months_
> > the machine can sleep?
> 
> Yes...

So how often is the machine up (per year) and for how long?
Does it just need to wake up to run a script and then shut down again?
(Why does it even have to be a separate machine?)



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson



> On 27 Nov 2022, at 17:28, Jan Stary  wrote:
> 
> On Nov 27 17:10:11, mytraddr...@gmail.com wrote:
>> I am not intending to switch the machine.
> 
> Why?

It is just not an option for this specific project.

> 
>> In terms of resources, I am mainly concerned about hard drives
>> and cpu being worn down unnecessarily. I am not sure how much
>> of a concern this should be though.
> 
> The CPU is not being "worn down" by running.
> 
> As for rotating metal disks, they have a lifetime;
> that's why replacing them with SSD might be your best bet.

In the case of an SDD, is there no consideration of turning them off, if they 
are unused for some time?
In the case of HDD, are you saying that putting them in "spun down" mode 
actually would not increase their lifetime?

> 
> But even regular disks are dirt cheap now.
> I don't believe this concern is even worth the time spent on this.
> 
>> Yes, I do know in advance when the machine needs to run and when it can 
>> sleep.
> 
> Then you can set a wakeup alarm in the BIOS (if it has one),
> and simply shutdown -p via cron, at the appropriate time.

Ok, thanks for that. I will explore whether the bios has a wake alarm

> 
>> "How much resources would that save?" -> My thoughts was that
>> it would be better for hard drive longevity to have them spun down,
>> rather than them being up for months without any access needed.
> 
> Wait, so you know in advance for how many _months_
> the machine can sleep?

Yes...

> 
> 
>> 
>>> On 27 Nov 2022, at 15:50, Jan Stary  wrote:
>>> 
>>> On Nov 27 09:37:19, mytraddr...@gmail.com wrote:
 The main thing I am trying to do is to make it sleep
 every now and then to protect resources.
>>> 
>>> How much eletricity does the machine eat?
>>> (What other "resources" are you concerned about?)
>>> 
 1) Make it sleep and wake up when woken up remotely
 I investigated Wake On Lan, which I enabled via ifconfig. However, this 
 system is deployed remotely, and I have no access to other computers on 
 the LAN, so I am unable to make this work.
 
 2) Make it sleep for a few hours and then wake up
>>> 
>>> Do you know in advance at what hours the machine
>>> needs to run, and when it can sleep?
>>> 
 After 3hours+ of research in man pages and the internet,
 I have not seen any solution for that.
>>> 
>>> Some machines have a wake option in their BIOS.
>>> 
 3) hard drives Spin down, CPU lower freq
 I have been able to lower the CPU speed by running `apm -L`.
>>> 
>>> How much electricity have you saved by that?
>>> 
 I haven't been able to spin down the hard drives.
>>> 
>>> How much resources would that save?
>>> 
>>> I you are concerned about resources, wouldn't you be better off
>>> getting a low-power machine, with SSD disks?  There are machines
>>> out there that eat around 10W and get the job done (dependeing
>>> on the job of course); and SSD doesn't need to spin down.
>>> 
 I cannot share the full dmesg for security reasons
>>> 
>>> Bullshit.
>>> 
>> 
>> 



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread Nick Holland

On 11/27/22 12:10, James Johnson wrote:

Thanks for your response.

I am not intending to switch the machine. In terms of resources, I am
mainly concerned about hard drives and cpu being worn down
unnecessarily. I am not sure how much of a concern this should be
though.


The CPU isn't going to "wear out" due to being running, at least not in
a meaningful time scale.

HISTORICAL EVIDENCE hints that a spinning drive will last longer than
a frequently power cycled drive.

Steady-state is easiest on hw.  Powering up and down is large power
surges, and that's generally not good.  This is across the board --
power supply, hard drives, main board, CPU, memory, etc.  The only
part that I think gets a benefit from being turned off would be a CRT
monitor, and maybe the HV in an older LCD monitor.

That's based on historical experience with a lot of different machines.
How that relates to the hardware you have at hand, there's no way to
know, other than get 50 identical machines, power one half on-and-off
regularly and leave the other half on.


Yes, I do know in advance when the machine needs to run and when it
can sleep.

"Some machines have a wake option in their BIOS." -> thanks for the
pointer, I will look into that.


That might work for you, but I think your premise is flawed.
 

"How much electricity have you saved by that?" -> I don't know. The
main concern is not using the hardware unnecessarily, to hopefully
increase its lifetime. Though less electricity usage is a nice side
bonus.


I just did some measurements here before seeing these replies.  Short
version: single 4TB 3.5" 5400 RPM drive draws less than 7W when
running...and I doubt you get all that power "back" when you spin
down the drive.  CPUs mostly draw power when doing something, the
difference between an mostly idle CPU running at 1GHz vs. 3GHz is
fairly small.  And on a rack mount server, fans may draw more power
than an idle CPU.


"How much resources would that save?" -> My thoughts was that it
would be better for hard drive longevity to have them spun down,
rather than them being up for months without any access needed. I
don't know in practice if that matters for life expectancy of the
drive?


As someone who has seen a lot of hard drives power down working and
not spin back up at next power-on...I'm pretty sure your plan is
absolutely defeating your goal.  I'm pretty sure a whole lot of
other people are also screaming "NO!!!" at their computer right now.
I hold a lot of unpopular views based on my experience, but I'm pretty
sure "leave drives running for maximum life" is NOT one of them,
it's pretty mainstream.

From your elaboration on your goals, just leave it alone.  By trying
to make it a super-efficient system, you are going to increase your
downtime and failure in a number of ways.

Nick.







On 27 Nov 2022, at 15:50, Jan Stary  wrote:

On Nov 27 09:37:19, mytraddr...@gmail.com wrote:

The main thing I am trying to do is to make it sleep every now
and then to protect resources.


How much eletricity does the machine eat? (What other "resources"
are you concerned about?)


1) Make it sleep and wake up when woken up remotely I
investigated Wake On Lan, which I enabled via ifconfig. However,
this system is deployed remotely, and I have no access to other
computers on the LAN, so I am unable to make this work.

2) Make it sleep for a few hours and then wake up


Do you know in advance at what hours the machine needs to run, and
when it can sleep?


After 3hours+ of research in man pages and the internet, I have
not seen any solution for that.


Some machines have a wake option in their BIOS.


3) hard drives Spin down, CPU lower freq I have been able to
lower the CPU speed by running `apm -L`.


How much electricity have you saved by that?


I haven't been able to spin down the hard drives.


How much resources would that save?

I you are concerned about resources, wouldn't you be better off 
getting a low-power machine, with SSD disks?  There are machines 
out there that eat around 10W and get the job done (dependeing on

the job of course); and SSD doesn't need to spin down.


I cannot share the full dmesg for security reasons


Bullshit.







Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread Jan Stary
On Nov 27 17:10:11, mytraddr...@gmail.com wrote:
> I am not intending to switch the machine.

Why?

> In terms of resources, I am mainly concerned about hard drives
> and cpu being worn down unnecessarily. I am not sure how much
> of a concern this should be though.

The CPU is not being "worn down" by running.

As for rotating metal disks, they have a lifetime;
that's why replacing them with SSD might be your best bet.

But even regular disks are dirt cheap now.
I don't believe this concern is even worth the time spent on this.

> Yes, I do know in advance when the machine needs to run and when it can sleep.

Then you can set a wakeup alarm in the BIOS (if it has one),
and simply shutdown -p via cron, at the appropriate time.

> "How much resources would that save?" -> My thoughts was that
> it would be better for hard drive longevity to have them spun down,
> rather than them being up for months without any access needed.

Wait, so you know in advance for how many _months_
the machine can sleep?


> 
> > On 27 Nov 2022, at 15:50, Jan Stary  wrote:
> > 
> > On Nov 27 09:37:19, mytraddr...@gmail.com wrote:
> >> The main thing I am trying to do is to make it sleep
> >> every now and then to protect resources.
> > 
> > How much eletricity does the machine eat?
> > (What other "resources" are you concerned about?)
> > 
> >> 1) Make it sleep and wake up when woken up remotely
> >> I investigated Wake On Lan, which I enabled via ifconfig. However, this 
> >> system is deployed remotely, and I have no access to other computers on 
> >> the LAN, so I am unable to make this work.
> >> 
> >> 2) Make it sleep for a few hours and then wake up
> > 
> > Do you know in advance at what hours the machine
> > needs to run, and when it can sleep?
> > 
> >> After 3hours+ of research in man pages and the internet,
> >> I have not seen any solution for that.
> > 
> > Some machines have a wake option in their BIOS.
> > 
> >> 3) hard drives Spin down, CPU lower freq
> >> I have been able to lower the CPU speed by running `apm -L`.
> > 
> > How much electricity have you saved by that?
> > 
> >> I haven't been able to spin down the hard drives.
> > 
> > How much resources would that save?
> > 
> > I you are concerned about resources, wouldn't you be better off
> > getting a low-power machine, with SSD disks?  There are machines
> > out there that eat around 10W and get the job done (dependeing
> > on the job of course); and SSD doesn't need to spin down.
> > 
> >> I cannot share the full dmesg for security reasons
> > 
> > Bullshit.
> > 
> 
> 



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson
Thank you for the pointer, I will look into that.

> On 27 Nov 2022, at 14:13, T K  wrote:
> 
> "I have been able to lower the CPU speed by running `apm -L`."
> For automation purposes consider using obsdfreqd (pkg_add obsdfreqd) instead.
> 
> niedz., 27 lis 2022, 10:39 użytkownik James Johnson  > napisał:
> Hi all,
> 
> OpenBSD is amazing. But I need help in configuring it correctly as a remote 
> server, rarely used.
> 
> 
> The main thing I am trying to do is to make it sleep every now and then to 
> protect resources. I am very flexible on how to do this, but have been unable 
> to do so.
> Here's what I tried :
> 
> 1) Make it sleep and wake up when woken up remotely
> I investigated Wake On Lan, which I enabled via ifconfig. However, this 
> system is deployed remotely, and I have no access to other computers on the 
> LAN, so I am unable to make this work.
> 
> 2) Make it sleep for a few hours and then wake up
> After 3hours+ of research in man pages and the internet, I have not seen any 
> solution for that.
> 
> 3) hard drives Spin down, CPU lower freq
> 
> I have been able to lower the CPU speed by running `apm -L`.
> I haven't been able to spin down the hard drives.
> How important is it to manually send a command to spin down the unused 
> harddrives? Will it be down by the system automatically?
> 
> I am trying to get info on the drives from the system but `atactl sd0 
> checkpower ` always shows `standby` even after I have just written on the 
> disk. I understand this does not work because my drives are SCSI and not ATA.
> I read the man page for scsi, and I see the command to spin down hard drives 
> : `scsi -f /dev/rsd2c -c "1b 0 0 0 0 0"`
> However, I see no command to spin them back up. Is it automatic?
> How can I request information on the spin state of the drive. I am just a 
> little worried about starting to send low levels instructions to the hard 
> drive, with little understanding of it. Is it safe to send this command?
> 
> Thanks all !
> 
> 
> PS : dmesg : I cannot share the full dmesg for security reasons, but it is a 
> fairly standard i386 machine, with 2 drives mounted as SCSI.
> 
> 
> 



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson
Thanks for your response.

I am not intending to switch the machine. In terms of resources, I am mainly 
concerned about hard drives and cpu being worn down unnecessarily. I am not 
sure how much of a concern this should be though.

Yes, I do know in advance when the machine needs to run and when it can sleep.

"Some machines have a wake option in their BIOS." -> thanks for the pointer, I 
will look into that.

"How much electricity have you saved by that?" -> I don't know. The main 
concern is not using the hardware unnecessarily, to hopefully increase its 
lifetime. Though less electricity usage is a nice side bonus.

"How much resources would that save?" -> My thoughts was that it would be 
better for hard drive longevity to have them spun down, rather than them being 
up for months without any access needed. I don't know in practice if that 
matters for life expectancy of the drive?






> On 27 Nov 2022, at 15:50, Jan Stary  wrote:
> 
> On Nov 27 09:37:19, mytraddr...@gmail.com wrote:
>> The main thing I am trying to do is to make it sleep
>> every now and then to protect resources.
> 
> How much eletricity does the machine eat?
> (What other "resources" are you concerned about?)
> 
>> 1) Make it sleep and wake up when woken up remotely
>> I investigated Wake On Lan, which I enabled via ifconfig. However, this 
>> system is deployed remotely, and I have no access to other computers on the 
>> LAN, so I am unable to make this work.
>> 
>> 2) Make it sleep for a few hours and then wake up
> 
> Do you know in advance at what hours the machine
> needs to run, and when it can sleep?
> 
>> After 3hours+ of research in man pages and the internet,
>> I have not seen any solution for that.
> 
> Some machines have a wake option in their BIOS.
> 
>> 3) hard drives Spin down, CPU lower freq
>> I have been able to lower the CPU speed by running `apm -L`.
> 
> How much electricity have you saved by that?
> 
>> I haven't been able to spin down the hard drives.
> 
> How much resources would that save?
> 
> I you are concerned about resources, wouldn't you be better off
> getting a low-power machine, with SSD disks?  There are machines
> out there that eat around 10W and get the job done (dependeing
> on the job of course); and SSD doesn't need to spin down.
> 
>> I cannot share the full dmesg for security reasons
> 
> Bullshit.
> 



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread Jan Stary
On Nov 27 09:37:19, mytraddr...@gmail.com wrote:
> The main thing I am trying to do is to make it sleep
> every now and then to protect resources.

How much eletricity does the machine eat?
(What other "resources" are you concerned about?)

> 1) Make it sleep and wake up when woken up remotely
> I investigated Wake On Lan, which I enabled via ifconfig. However, this 
> system is deployed remotely, and I have no access to other computers on the 
> LAN, so I am unable to make this work.
> 
> 2) Make it sleep for a few hours and then wake up

Do you know in advance at what hours the machine
needs to run, and when it can sleep?

> After 3hours+ of research in man pages and the internet,
> I have not seen any solution for that.

Some machines have a wake option in their BIOS.

> 3) hard drives Spin down, CPU lower freq
> I have been able to lower the CPU speed by running `apm -L`.

How much electricity have you saved by that?

> I haven't been able to spin down the hard drives.

How much resources would that save?

I you are concerned about resources, wouldn't you be better off
getting a low-power machine, with SSD disks?  There are machines
out there that eat around 10W and get the job done (dependeing
on the job of course); and SSD doesn't need to spin down.

> I cannot share the full dmesg for security reasons

Bullshit.



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread T K
"I have been able to lower the CPU speed by running `apm -L`."
For automation purposes consider using obsdfreqd (pkg_add obsdfreqd)
instead.

niedz., 27 lis 2022, 10:39 użytkownik James Johnson 
napisał:

> Hi all,
>
> OpenBSD is amazing. But I need help in configuring it correctly as a
> remote server, rarely used.
>
>
> The main thing I am trying to do is to make it sleep every now and then to
> protect resources. I am very flexible on how to do this, but have been
> unable to do so.
> Here's what I tried :
>
> 1) Make it sleep and wake up when woken up remotely
> I investigated Wake On Lan, which I enabled via ifconfig. However, this
> system is deployed remotely, and I have no access to other computers on the
> LAN, so I am unable to make this work.
>
> 2) Make it sleep for a few hours and then wake up
> After 3hours+ of research in man pages and the internet, I have not seen
> any solution for that.
>
> 3) hard drives Spin down, CPU lower freq
>
> I have been able to lower the CPU speed by running `apm -L`.
> I haven't been able to spin down the hard drives.
> How important is it to manually send a command to spin down the unused
> harddrives? Will it be down by the system automatically?
>
> I am trying to get info on the drives from the system but `atactl sd0
> checkpower ` always shows `standby` even after I have just written on the
> disk. I understand this does not work because my drives are SCSI and not
> ATA.
> I read the man page for scsi, and I see the command to spin down hard
> drives : `scsi -f /dev/rsd2c -c "1b 0 0 0 0 0"`
> However, I see no command to spin them back up. Is it automatic?
> How can I request information on the spin state of the drive. I am just a
> little worried about starting to send low levels instructions to the hard
> drive, with little understanding of it. Is it safe to send this command?
>
> Thanks all !
>
>
> PS : dmesg : I cannot share the full dmesg for security reasons, but it is
> a fairly standard i386 machine, with 2 drives mounted as SCSI.
>
>
>
>


Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson
Hi all,

OpenBSD is amazing. But I need help in configuring it correctly as a remote 
server, rarely used.


The main thing I am trying to do is to make it sleep every now and then to 
protect resources. I am very flexible on how to do this, but have been unable 
to do so.
Here's what I tried :

1) Make it sleep and wake up when woken up remotely
I investigated Wake On Lan, which I enabled via ifconfig. However, this system 
is deployed remotely, and I have no access to other computers on the LAN, so I 
am unable to make this work.

2) Make it sleep for a few hours and then wake up
After 3hours+ of research in man pages and the internet, I have not seen any 
solution for that.

3) hard drives Spin down, CPU lower freq

I have been able to lower the CPU speed by running `apm -L`.
I haven't been able to spin down the hard drives.
How important is it to manually send a command to spin down the unused 
harddrives? Will it be down by the system automatically?

I am trying to get info on the drives from the system but `atactl sd0 
checkpower ` always shows `standby` even after I have just written on the disk. 
I understand this does not work because my drives are SCSI and not ATA.
I read the man page for scsi, and I see the command to spin down hard drives : 
`scsi -f /dev/rsd2c -c "1b 0 0 0 0 0"`
However, I see no command to spin them back up. Is it automatic?
How can I request information on the spin state of the drive. I am just a 
little worried about starting to send low levels instructions to the hard 
drive, with little understanding of it. Is it safe to send this command?

Thanks all !


PS : dmesg : I cannot share the full dmesg for security reasons, but it is a 
fairly standard i386 machine, with 2 drives mounted as SCSI.