[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-hardware-devel
Subject:    Re: [Kde-hardware-devel] Review Request 119087: Consider additional batteries for power management (
From:       "Emmanuel Pescosta" <emmanuelpescosta099 () gmail ! com>
Date:       2014-07-15 17:54:51
Message-ID: 20140715175451.32551.71550 () probe ! kde ! org
[Download RAW message or body]

--===============5448031754885594779==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119087/
-----------------------------------------------------------

(Updated July 15, 2014, 7:54 p.m.)


Review request for Solid.


Changes
-------

Added a new bug


Bugs: 325707, 329537 and 337414
    https://bugs.kde.org/show_bug.cgi?id=325707
    https://bugs.kde.org/show_bug.cgi?id=329537
    https://bugs.kde.org/show_bug.cgi?id=337414


Repository: powerdevil


Description
-------

(kde:powerdevil version of review 118801)

After resuming from suspend, all batteries are added
to powerdevil. When a battery, with charge lower or
equal than the critical charge percentage is added, the
critical battery timer will be started.

In the current version the critical battery timeout can
only be interrupted by plugging in AC.

But if the system has more than one battery, the global
charge percentage can be greater than the critical charge
percentage and so the system shouldn't suspend. To achive
this behaviour, we calculate the global charge percentage
whenever a new battery was added and if the critical
battery timer is running and the global charge is high
enough, we stop the timer.

Also we use the already calculated global charge percentage
for the battery charge percentage notification instead of
the charge of each individual battery.

With this patch, the user can not only interrupt the critical
timer by plugging in the AC but also by plugging in a new or
additional battery (if the battery has enough charge).


Diffs
-----

  daemon/powerdevilcore.h dc2ba7e 
  daemon/powerdevilcore.cpp 64791d6 

Diff: https://git.reviewboard.kde.org/r/119087/diff/


Testing
-------

Testing was done by Philipp Paris on his Thinkpad T440s (two
batteries).

Two batteries above critical section:
Resume after suspend works without the 30 sec timeout. (as current version)

One battery in critical section and the other above:
Resume after suspend works without the 30 sec timeout. (changed behaviour)

Both in critical section:
Resume after suspend without plugged in AC will go sleeping
in 30 sec. (as current version)


Thanks,

Emmanuel Pescosta


--===============5448031754885594779==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/119087/">https://git.reviewboard.kde.org/r/119087/</a>
  </td>
    </tr>
   </table>
   <br />





<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for Solid.</div>
<div>By Emmanuel Pescosta.</div>


<p style="color: grey;"><i>Updated July 15, 2014, 7:54 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Added a new bug</pre>  </td>
 </tr>
</table>





<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://bugs.kde.org/show_bug.cgi?id=325707">325707</a>, 

 <a href="https://bugs.kde.org/show_bug.cgi?id=329537">329537</a>, 

 <a href="https://bugs.kde.org/show_bug.cgi?id=337414">337414</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
powerdevil
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">(kde:powerdevil version of review 118801)</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">After resuming from suspend, all batteries are added<br style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" /> to \
powerdevil. When a battery, with charge lower or<br style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: normal;" /> equal than the \
critical charge percentage is added, the<br style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: normal;" /> critical battery \
timer will be started.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">In the current version the critical \
battery timeout can<br style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: normal;" /> only be interrupted by plugging in \
AC.</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">But if the system has more than one battery, the \
global<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> charge percentage can be greater than the critical \
charge<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> percentage and so the system shouldn't suspend. To \
achive<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> this behaviour, we calculate the global charge \
percentage<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> whenever a new battery was added and if the \
critical<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> battery timer is running and the global charge is \
high<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> enough, we stop the timer.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Also we use the already calculated global charge \
percentage<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> for the battery charge percentage notification \
instead of<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> the charge of each individual battery.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">With this patch, the user can not only interrupt the \
critical<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> timer by plugging in the AC but also by plugging in \
a new or<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> additional battery (if the battery has enough \
charge).</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Testing was done by Philipp Paris on his Thinkpad \
T440s (two<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> batteries).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Two batteries above critical section:<br \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;" /> Resume after suspend works without the 30 sec timeout. (as current \
version)</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">One battery in critical section and the other \
above:<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;" /> Resume after suspend works without the 30 sec \
timeout. (changed behaviour)</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">Both in critical section:<br \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;" /> Resume after suspend without plugged in AC will go sleeping<br \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;" /> in 30 sec. (as current version)</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>daemon/powerdevilcore.h <span style="color: grey">(dc2ba7e)</span></li>

 <li>daemon/powerdevilcore.cpp <span style="color: grey">(64791d6)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/119087/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>




  </div>
 </body>
</html>


--===============5448031754885594779==--



_______________________________________________
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic