[OpenIndiana-discuss] Power management in OI

2012-10-25 Thread Jim Klimov

Hello all,

  I'm trying to set up power management on my oi_151a5 laptop.
For one, I found a useful comment in this blog post:

http://prefetch.net/blog/index.php/2009/07/12/using-the-cpu-power-management-features-in-solaris/

...that cpupm (in /etc/power.conf) must include the poll-mode
keyword:

cpu-threshold  1s
cpupm  enable poll-mode

  At least, with this option set, I see reduced core speeds
with kstat -m cpu_info -i 0 -s current_clock_Hz and powertop
much more often than with just cpupm enable. Bumping the
threshold to 3s also helped the CPU stay in reduced states
much longer, because running GNOME seems to bite off about 3%
user-time and about 3% kernel-time on this laptop, which
causes the CPU to wake up often needlessly (IMHO).

  I am not sure HDD powersaving is viable, given there's 1
disk in the system and ZFS has something to flush every cycle,
but there were no reportable problems with setting it up with
http://constantin.glez.de/blog/2010/03/opensolaris-home-server-scripting-2-setting-power-management
(however, I did not hear spindown-spinup when I set a 1s timeout).

  Now, I'm having a problem with suspend: when I do the action,
the system falls out of X11 into text mode (empty screen with
the cursor bar) and freezes. The box must be hard-rebooted
afterwards. Logs include:


Sep  2 12:14:41 nbofh genunix: [ID 535284 kern.notice] System is being 
suspended
Sep  2 12:14:42 nbofh genunix: [ID 122848 kern.warning] WARNING: Unable 
to suspend device display@1.
Sep  2 12:14:43 nbofh genunix: [ID 537702 kern.warning] WARNING: Device 
is busy or does not support suspend/resume.
Sep  2 12:14:53 nbofh srn: [ID 980641 kern.warning] WARNING: srn_notify: 
clone 2 did not ack event a03
Sep  2 12:14:53 nbofh genunix: [ID 121466 kern.warning] WARNING: 
audiohd#0: Unable to restore value of control record-source
Sep  2 12:14:54 nbofh genunix: [ID 583038 kern.notice] System has been 
resumed.
Sep  2 12:22:52 nbofh genunix: [ID 576964 kern.notice] ^MOpenIndiana 
Build oi_151a5 64-bit (illumos 13740:836bfdf31fc4)
Sep  2 12:22:52 nbofh genunix: [ID 107366 kern.notice] SunOS Release 
5.11 - Copyright 1983-2010 Oracle and/or its affiliates.

...

So, apparently, some device - the display (generic VESA VGA on the
Radeon built into the AMD E2 CPU) or one of the audios (hdmi on the
radeon or separate realtek chip) fail to suspend/resume and may cause
the freeze.

On side notes: DPMI works ok to turn off the lights on the LCD screen.
Suspend-resume worked OK in Win7, though I couldn't get that to 
hibernate for no apparent reason.


Thanks for ideas,
//Jim Klimov


___
OpenIndiana-discuss mailing list
OpenIndiana-discuss@openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss


Re: [OpenIndiana-discuss] Power management in OI

2012-10-25 Thread Milan Jurik
Hi Jim,

On čt, 2012-10-25 at 17:06 +0400, Jim Klimov wrote:
 Hello all,
 
I'm trying to set up power management on my oi_151a5 laptop.
 For one, I found a useful comment in this blog post:
  
 http://prefetch.net/blog/index.php/2009/07/12/using-the-cpu-power-management-features-in-solaris/
 
 ...that cpupm (in /etc/power.conf) must include the poll-mode
 keyword:
 
 cpu-threshold  1s
 cpupm  enable poll-mode
 
At least, with this option set, I see reduced core speeds
 with kstat -m cpu_info -i 0 -s current_clock_Hz and powertop
 much more often than with just cpupm enable. Bumping the
 threshold to 3s also helped the CPU stay in reduced states
 much longer, because running GNOME seems to bite off about 3%
 user-time and about 3% kernel-time on this laptop, which
 causes the CPU to wake up often needlessly (IMHO).
 

yes, poll-mode can be more effective on some systems. But not always
what you see with kstat and powertop is what you have in real usage.
powertop and kstat are a bit heavy tools which have impact on the
reality (system does not decrease CPU speed if you are monitoring it).

I am not sure HDD powersaving is viable, given there's 1
 disk in the system and ZFS has something to flush every cycle,
 but there were no reportable problems with setting it up with
 http://constantin.glez.de/blog/2010/03/opensolaris-home-server-scripting-2-setting-power-management
 (however, I did not hear spindown-spinup when I set a 1s timeout).
 
Now, I'm having a problem with suspend: when I do the action,
 the system falls out of X11 into text mode (empty screen with
 the cursor bar) and freezes. The box must be hard-rebooted
 afterwards. Logs include:
 
 
 Sep  2 12:14:41 nbofh genunix: [ID 535284 kern.notice] System is being 
 suspended
 Sep  2 12:14:42 nbofh genunix: [ID 122848 kern.warning] WARNING: Unable 
 to suspend device display@1.
 Sep  2 12:14:43 nbofh genunix: [ID 537702 kern.warning] WARNING: Device 
 is busy or does not support suspend/resume.
 Sep  2 12:14:53 nbofh srn: [ID 980641 kern.warning] WARNING: srn_notify: 
 clone 2 did not ack event a03
 Sep  2 12:14:53 nbofh genunix: [ID 121466 kern.warning] WARNING: 
 audiohd#0: Unable to restore value of control record-source
 Sep  2 12:14:54 nbofh genunix: [ID 583038 kern.notice] System has been 
 resumed.
 Sep  2 12:22:52 nbofh genunix: [ID 576964 kern.notice] ^MOpenIndiana 
 Build oi_151a5 64-bit (illumos 13740:836bfdf31fc4)
 Sep  2 12:22:52 nbofh genunix: [ID 107366 kern.notice] SunOS Release 
 5.11 - Copyright 1983-2010 Oracle and/or its affiliates.
 ...
 
 So, apparently, some device - the display (generic VESA VGA on the
 Radeon built into the AMD E2 CPU) or one of the audios (hdmi on the
 radeon or separate realtek chip) fail to suspend/resume and may cause
 the freeze.
 

No surprise, the key problem is lack of support fo Radeon. System cannot
sleep without implementation of it. Without fixing this it makes no
sense to investigate it more. You need to look at system console,
usually serial port, to see what happend after resume. Also, you can try
to suspend and resume with disabled X server.

 On side notes: DPMI works ok to turn off the lights on the LCD screen.
 Suspend-resume worked OK in Win7, though I couldn't get that to 
 hibernate for no apparent reason.
 
 Thanks for ideas,
 //Jim Klimov

Best regards,

Milan


___
OpenIndiana-discuss mailing list
OpenIndiana-discuss@openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss