DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd November 2010
MihaiM MihaiM is offline
New User
 
Join Date: Nov 2010
Posts: 3
Default CPU power saving done correctly

Hey! I installed OpenBSD 4.8 on my laptop (Asus K50AB) and among the things I'm interested in is this power saving feature. I did not manage to make it work but before reporting to the devs, I'd like to know if I've done everything correctly, because I have no idea whether my hardware is not supported (yet) and it should not work or I missed something from the documentation (and web discussions).

So, I understand that all I need to do is to configure the apmd_flags option in rc.conf, which I set to "-C" (economic). Other than that, I disabled the daemon and tried to lower hw.setperf manually. Nothing worked (checked the cpu frequency with $ apm), as far as I understand, I should have seen an apm* device in dmesg.

My questions are:
- based on this information, is my hardware power-saving unsupported by the system?
- could I try something else that might work? (like enabling some option at boot time, building a custom configured kernel - with something like "asus acpi", changing a certain sysconfig option or enabling something like hal)

Notes:
- if this tells you something, I used to set this option on FreeBSD, months ago, for CPU frequency scaling to work: hint.acpi_throttle.0.disabled="1". It worked without touching it in one version but not in a newer one (I forgot the numbers, I think 8.0 release was working and stable was broken, needing that tweak).
- I did not yet tried to check for the availability of the following option in config, which I just found while I'm not on obsd: acpiasus. I have the feeling that this is not the trick, though.
Reply With Quote
  #2   (View Single Post)  
Old 23rd November 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

The userland apmd(8) daemon uses the /dev/apm, /dev/apmctl devices to communicate power management events even if the kernel is using acpi(4) instead of legacy apm(4) (..most newer systems lack this now, it was a "specification" implemented by the BIOS).

It's just an instance of API reuse, this also allowed for the apmd(8)/apm(8) tools to be used on platforms like the ARM-based "Sharp Zaurus".

If manually setting the hw.setperf sysctl doesn't affect CPU speed, or simply doesn't exist, frequency scaling is not yet supported on your system.

For suspend functionality, you can use the apm/zzz(8) utility to attempt it.. or toggle machdep.lidsuspend and try simply closing/opening the lid.

Posting a dmesg along with sysctl output might help more, but there isn't much more we can do.
Reply With Quote
  #3   (View Single Post)  
Old 23rd November 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by BSDfan666 View Post
Posting a dmesg along with sysctl output might help more, but there isn't much more we can do.
Adding to BSDfan666's comments, a number of suspend/resume fixes were checked after 4.8 was tagged in CVS. Installing a snapshot of -current might be useful, but given that we haven't seen dmesg(8) output for this specific system, anything we say is simply conjecture.
Reply With Quote
  #4   (View Single Post)  
Old 24th November 2010
MihaiM MihaiM is offline
New User
 
Join Date: Nov 2010
Posts: 3
Default

Thanks for clarifying this to me, guys! Certainly, here you have the dmesg+sensors, for the sake of information:
Code:
OpenBSD 4.8 (GENERIC.MP) #335: Mon Aug 16 09:09:20 MDT 2010
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3488088064 (3326MB)
avail mem = 3381420032 (3224MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf06e0 (47 entries)
bios0: vendor American Megatrends Inc. version "220" date 11/13/2009
bios0: ASUSTeK Computer INC. K50AB
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG SRAT MSCT OEMX ECDT OEMB HPET SSDT
acpi0: wakeup devices PCE2(S4) PCE3(S4) PCE4(S4) PCE5(S4) GLAN(S4) PCE6(S4) PCE9(S4) PCEA(S4) PCEB(S4) PCEC(S4) SBAZ(S4) P0PC(S4) UHC1(S4) UHC2(S4) UHC3(S4) USB4(S4) UHC5(S4) UHC6(S4) UHC7(S4) PCE7(S4) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Turion(tm) X2 Ultra Dual-Core Mobile ZM-84, 2300.19 MHz
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,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB 64b/line 16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: apic clock running at 199MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Turion(tm) X2 Ultra Dual-Core Mobile ZM-84, 2299.15 MHz
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,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB 64b/line 16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 21, 24 pins
acpiec0 at acpi0: Failed to register address space
acpihpet0 at acpi0: 14318180 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 1 (PCE2)
acpiprt3 at acpi0: bus -1 (PCE3)
acpiprt4 at acpi0: bus -1 (PCE4)
acpiprt5 at acpi0: bus 2 (PCE5)
acpiprt6 at acpi0: bus 3 (PCE6)
acpiprt7 at acpi0: bus -1 (PCE7)
acpiec at acpi0 not configured
acpicpu0 at acpi0: PSS
acpicpu1 at acpi0: PSS
acpitz0 at acpi0: critical temperature 120 degC
acpibat0 at acpi0: BAT0 model "K50AB" serial   type LION oem "ASUS"
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: PWRB
acpivideo0 at acpi0: VGA_
acpivideo1 at acpi0: VGA_
acpivout0 at acpivideo1: CRTD
acpivout1 at acpivideo1: LCDD
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD RS780 Host" rev 0x00
ppb0 at pci0 dev 2 function 0 "AMD RS780 PCIE" rev 0x00: apic 2 int 18 (irq 10)
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Mobility Radeon HD 4500" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 2 int 18 (irq 10)
drm0 at radeondrm0
ppb1 at pci0 dev 5 function 0 "AMD RS780 PCIE" rev 0x00: apic 2 int 17 (irq 11)
pci2 at ppb1 bus 2
re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x01: RTL8168 2 (0x3800), apic 2 int 17 (irq 11), address 00:26:18:47:3c:8a
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ppb2 at pci0 dev 6 function 0 "AMD RS780 PCIE" rev 0x00: apic 2 int 18 (irq 10)
pci3 at ppb2 bus 3
athn0 at pci3 dev 0 function 0 "Atheros AR9285" rev 0x01: apic 2 int 18 (irq 10), address 00:25:d3:07:f3:aa
athn0: AR9285 rev 2 (1T1R), ROM rev 13
ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x00: apic 2 int 22 (irq 15), AHCI 1.1
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: <ATA, Hitachi HTS54322, FBEO> SCSI3 0/direct fixed
sd0: 238475MB, 512 bytes/sec, 488397168 sec total
cd0 at scsibus0 targ 1 lun 0: <Slimtype, DVD A DS8A3S, HA24> ATAPI 5/cdrom removable
ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 16 (irq 14), version 1.0, legacy support
ohci1 at pci0 dev 18 function 1 "ATI SB700 USB" rev 0x00: apic 2 int 16 (irq 14), version 1.0, legacy support
ehci0 at pci0 dev 18 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17 (irq 11)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "ATI EHCI root hub" rev 2.00/1.00 addr 1
ohci2 at pci0 dev 19 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 18 (irq 10), version 1.0, legacy support
ohci3 at pci0 dev 19 function 1 "ATI SB700 USB" rev 0x00: apic 2 int 18 (irq 10), version 1.0, legacy support
ehci1 at pci0 dev 19 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 19 (irq 7)
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "ATI EHCI root hub" rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 "ATI SBx00 SMBus" rev 0x3a: SMI
iic0 at piixpm0
spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-6400CL5 SO-DIMM
spdmem1 at iic0 addr 0x51: 2GB DDR2 SDRAM non-parity PC2-6400CL5 SO-DIMM
azalia0 at pci0 dev 20 function 2 "ATI SBx00 HD Audio" rev 0x00: apic 2 int 16 (irq 14)
azalia0: codecs: VIA/0x0397
audio0 at azalia0
pcib0 at pci0 dev 20 function 3 "ATI SB700 ISA" rev 0x00
ppb3 at pci0 dev 20 function 4 "ATI SB600 PCI" rev 0x00
pci4 at ppb3 bus 4
ohci4 at pci0 dev 20 function 5 "ATI SB700 USB" rev 0x00: apic 2 int 18 (irq 10), version 1.0, legacy support
pchb1 at pci0 dev 24 function 0 "AMD AMD64 11h HyperTransport" rev 0x40
pchb2 at pci0 dev 24 function 1 "AMD AMD64 11h Address Map" rev 0x00
pchb3 at pci0 dev 24 function 2 "AMD AMD64 11h DRAM Cfg" rev 0x00
km0 at pci0 dev 24 function 3 "AMD AMD64 11h Misc Cfg" rev 0x00
pchb4 at pci0 dev 24 function 4 "AMD AMD64 11h Link Cfg" rev 0x00
usb2 at ohci0: USB revision 1.0
uhub2 at usb2 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb3 at ohci1: USB revision 1.0
uhub3 at usb3 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb4 at ohci2: USB revision 1.0
uhub4 at usb4 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb5 at ohci3: USB revision 1.0
uhub5 at usb5 "ATI OHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
usb6 at ohci4: USB revision 1.0
uhub6 at usb6 "ATI OHCI root hub" rev 1.00/1.00 addr 1
mtrr: Pentium Pro MTRR support
uvideo0 at uhub1 port 3 configuration 1 interface 0 "Chicony Electronics Co., Ltd. CNF7129" rev 2.00/15.15 addr 2
uvideo0: video control not supported for this device.
video0 at uvideo0
ubt0 at uhub2 port 1 "Cambridge Silicon Radio Bluetooth" rev 2.00/31.64 addr 2
uhidev0 at uhub2 port 2 configuration 1 interface 0 "Microsoft Microsoft(R) Compact Optical Mouse" rev 1.10/0.01 addr 3
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
softraid0 at root
root on sd0a swap on sd0b dump on sd0b
hw.sensors.acpitz0.temp0=60.00 degC (zone temperature)
hw.sensors.acpibat0.volt0=14.03 VDC (voltage)
hw.sensors.acpibat0.volt1=14.00 VDC (current voltage)
hw.sensors.acpibat0.amphour0=4.20 Ah (last full capacity)
hw.sensors.acpibat0.amphour1=0.42 Ah (warning capacity)
hw.sensors.acpibat0.amphour2=0.21 Ah (low capacity)
hw.sensors.acpibat0.amphour3=32.77 Ah (remaining capacity), OK
hw.sensors.acpibat0.raw0=0 (battery full), OK
hw.sensors.acpibat0.raw1=1 (rate)
hw.sensors.acpiac0.indicator0=On (power supply)
hw.sensors.km0.temp0=75.50 degC
This is the first time installation info on my hardware, that I will submit to the developers - as far as I can tell, they can't know that CPU power saving is not working unless I specify. I awaited for an answer so that I can put into the subject whether this function works or not.
---

I'm more interested into the CPU scaling stuff, rather than other ACPI magic, because of the power consumption I basically can't use my laptop on OpenBSD. But thanks for the suggestion, I definitely will try -current.

@BSDfan666: I don't currently have the sysctl output saved around, if you really think it's further relevant or wish to study it, I'll post it, the next time I get on OpenBSD.

Thank you!
Reply With Quote
  #5   (View Single Post)  
Old 24th November 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Yes, sending a bug report might be a good idea.. I believe that the K10 and newer series of processors aren't supported by the frequency scaling code, this information is grokked from the ACPI tables.
Reply With Quote
  #6   (View Single Post)  
Old 24th November 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by MihaiM View Post
This is the first time installation info on my hardware, that I will submit to the developers...
If you do ultimately send in a problem report, take the time to seriously understand what the developers need as for information. This is covered on the following page:

http://www.openbsd.org/report.html

Likewise, the developers are more interested in the behavior of -current as the HEAD of CVS is the source base which will become OpenBSD 4.9.
Reply With Quote
  #7   (View Single Post)  
Old 24th November 2010
MihaiM MihaiM is offline
New User
 
Join Date: Nov 2010
Posts: 3
Default

Awesome, thanks for the link, it takes a while until someone knows what is where.
Makes sense and noted.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving automatically downloaded binary packages IdOp NetBSD Package System (pkgsrc) 6 23rd November 2009 06:00 PM
startx not starting correctly - XOrg 7.4_2 Mantazz FreeBSD Ports and Packages 1 8th July 2009 04:17 PM
VNC not viewing correctly disappearedng FreeBSD General 6 30th August 2008 05:03 PM
Firefox profile not saving tonywob FreeBSD General 4 20th May 2008 12:20 PM


All times are GMT. The time now is 02:31 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick