<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>916</bug_id>
          
          <creation_ts>2011-03-21 09:40:26 +0000</creation_ts>
          <short_desc>beagleboard: apmd complains about lack of APM support in kernel</short_desc>
          <delta_ts>2011-09-09 01:52:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-runtime</component>
          <version>1.0</version>
          <rep_platform>Beagleboard</rep_platform>
          <op_sys>arm</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>Patch submitted to list (24-Aug- 2011)</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>dvhart</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>liming.wang</cc>
    
    <cc>yi.zhao</cc>
    
    <cc>yp.kernel.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>12874</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2011-03-21 09:40:26 +0000</bug_when>
    <thetext>With a beagleboard image created from bernard + meta-demo (dvhart/bbxm branch) I noticed that during startup apmd reports:

------------
Starting advanced power management daemon: No APM support in kernel
(failed.)
------------

Kernel version is 2.6.37.3-yocto-standard+.

bernard revision used to build was 82af8b9fb6d6d1439943fd15b8a75c0e663e4a45 (although it was not a from-scratch build).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12881</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2011-03-21 13:22:32 +0000</bug_when>
    <thetext>Tossing this onto the beagleboard 1.1 pile.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14187</commentid>
    <comment_count>2</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-06-06 13:10:21 +0000</bug_when>
    <thetext>I think the solution here is to remove apmd. I could be wrong - but this seems to be common even on the Angstrom distribution, while &quot;echo mem &gt; /sys/power/state&quot; does start the suspend process (which currently fails, but...). I&apos;m not sure what the requirements are for apmd to work and when one should expect to use apmd rather than the sys interface.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14196</commentid>
    <comment_count>3</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-06-06 15:57:12 +0000</bug_when>
    <thetext>From what I can gather apmd is mostly obsoleted by acpid, which is mostly obsoleted by the various power management daemons of modern desktops. I don&apos;t know what we need to do with oe-core in general, but for the Yocto beagleboard image I&apos;d just suggest dropping apmd altogether.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15392</commentid>
    <comment_count>4</comment_count>
    <who name="Liming Wang">liming.wang</who>
    <bug_when>2011-08-11 00:09:04 +0000</bug_when>
    <thetext>I also suggest to drop this package.
apmd prints &quot; No APM support in kernel&quot; when it accesses &quot;/proc/apm&quot;. The file &quot;/proc/apm&quot; is created in drivers/char/apm-emulation.c and it contains such &quot;AC line status&quot; and &quot;Battery status&quot; information. But beagleboard doesn&apos;t have battery and so apmd can&apos;t provide useful information.
If we don&apos;t drop this package from beagleboard machine, we can add CONFIG_APM_EMULATION option to the kernel config to avoid this message.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15409</commentid>
    <comment_count>5</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2011-08-11 12:16:30 +0000</bug_when>
    <thetext>I went ahead and submitted the change to remove this from the board.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15442</commentid>
    <comment_count>6</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2011-08-12 06:49:49 +0000</bug_when>
    <thetext>Logging the email discussions on this change.

&gt;&gt; On arm it used to be the case that this was the only way to expose user
&gt;&gt; &gt; &gt; interface to suspend/resume the machine. Its not so much about their
&gt;&gt; &gt; &gt; being hardware present for it as the whole kernel side was emulation of
&gt;&gt; &gt; &gt; the user space notification part.
&gt;&gt; &gt; &gt;
&gt;&gt; &gt; &gt; Has something changed in recent kernels in this area?
&gt; &gt; 
&gt; &gt; I won&apos;t claim to be an expert here .. but I haven&apos;t used apmd
&gt; &gt; on many machines in quite a while. Assuming suspend_ops is
&gt; &gt; implemented, it is typically just something ike this:
&gt; &gt; 
&gt; &gt;   echo mem &gt; /sys/power/state
&gt; &gt; 
&gt; &gt;     or
&gt; &gt; 
&gt; &gt;   echo standby &gt; /sys/power/state
&gt; &gt; 
&gt; &gt; With a wakeup via the rtc, or whatever the board offers. I&apos;m
&gt; &gt; cc&apos;ing Liming on this, since he&apos;s been poking at the board recently
&gt; &gt; and may have more hands on information to share.
&gt; &gt; 
&gt; &gt; If we ARE removing this capability, then we&apos;ll take the other option
&gt; &gt; that we had for this case and enable the emulation.
I have a suspicion that certain parts of the sato code do
assume /dev/apm_bios device emulation is present to get userspace
notification of suspend/resume events which the above doesn&apos;t provide
last I checked.

Likely this isn&apos;t an issue and I think that code in sato (matchbox panel
app iirc) is toggled by the MACHINE_FEATURES but its certainly worth
keeping in mind...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15443</commentid>
    <comment_count>7</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2011-08-12 06:51:08 +0000</bug_when>
    <thetext>Liming: can we look into Richard&apos;s concerns and see what does/doesn&apos;t work with the change removed. It could be better to just add the emulation support. I&apos;m thinking that we should just do this versus dropping APM.

Also. Check the other meta layers for the beagleboard, there&apos;s no sense
reinventing anything here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15746</commentid>
    <comment_count>8</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-08-24 23:53:20 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f5cddf955d7f8a2bf3a3fadf26219a4ddcdf6279</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16114</commentid>
    <comment_count>9</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2011-09-09 01:52:58 +0000</bug_when>
    <thetext>Verified with 20110908 build. 

Tree/Branch: stage/master_under_test
Poky Commit:5fa508a717da07ef7352e4ac385ac276156aedec

The apm daemon can start without errors.

############
root@beagleboard:~# ps aux|grep apmd
root        35  0.0  0.0      0     0 ?        S    15:57   0:00 [kapmd]
root     17889  0.0  0.1   1656   368 ?        Ss   16:46   0:00 /usr/sbin/apmd -P /etc/apm/apmd_proxy --proxy-timeout 30
root     17902  0.0  0.2   2180   532 ttyO2    S+   16:48   0:00 grep apmd
##############</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>