<?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>6746</bug_id>
          
          <creation_ts>2014-09-22 02:59:30 +0000</creation_ts>
          <short_desc>S3 issue - Yocto which is installed on SD card fails to execute shutdown/reboot command after S3 resume.</short_desc>
          <delta_ts>2015-08-25 23:55:43 +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-meta-minnow</component>
          <version>unspecified</version>
          <rep_platform>MinnowBoard Max</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.9</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David_Wei">david.wei</reporter>
          <assigned_to name="California Sullivan">california.l.sullivan</assigned_to>
          <cc>david.wei</cc>
    
    <cc>michael.p.krau</cc>
    
    <cc>shifeix.a.lu</cc>
    
    <cc>sjolley.yp.pm</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>45736</commentid>
    <comment_count>0</comment_count>
    <who name="David_Wei">david.wei</who>
    <bug_when>2014-09-22 02:59:30 +0000</bug_when>
    <thetext>Yocto which is installed on SD card fails to execute shutdown/reboot command after S3 resume.

root@intel-corei7-64:~# 
root@intel-corei7-64:~# shutdown -h now
[   58.226062] FAT-fs (mmcblk0): unable to read inode block for updating (i_pos 92036)


Broadcast message from root@intel-corei7-64 (ttyS0) (Tue Jul 22 20:51:56 2014
The system is going down for system halt NOW!

root@intel-corei7-64:~# [   64.696395] EXT3-fs error (device loop0): read_inode_bitmap: Cannot read inode bitmap - block_group = 9, inode_bitmap = 295002
[   64.709257] EXT3-fs (loop0): error in ext3_new_inode: IO failure
[   69.855022] Buffer I/O error on device loop0, logical block 133146
[   69.862373] lost page write due to I/O error on loop0
[   69.868094] Aborting journal on device loop0.
[   69.873254] __journal_remove_journal_head: freeing b_committed_data
[   69.892236] EXT3-fs (loop0): error: ext3_journal_start_sb: Detected aborted journal
[   69.900868] EXT3-fs (loop0): error: remounting filesystem read-only
[   69.934511] EXT3-fs (loop0): error: ext3_remount: Abort forced by user
[   94.795083] FAT-fs (mmcblk0): unable to read inode block for updating (i_pos 92036)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50865</commentid>
    <comment_count>1</comment_count>
    <who name="California Sullivan">california.l.sullivan</who>
    <bug_when>2015-05-07 17:38:30 +0000</bug_when>
    <thetext>I wasn&apos;t able to reproduce this. It takes some time to shutdown after a S3 resume, but it completes successfully. I tested on a dual core MinnowBoard Max with 0.77 firmware. I used a Yocto image on an SD card and repeated the test with a Yocto image on a flash drive, and I had the same results each time.

root@intel-corei7-64:~# shutdown -h now
[   72.985612] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[   73.032286] systemd-journald[98]: Received SIGTERM from PID 1 (systemd-shutdow).
[   73.069304] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[   73.096543] systemd-shutdown[1]: Unmounting file systems.
[   73.106173] systemd-shutdown[1]: Unmounting /sys/kernel/debug.
[   73.119049] systemd-shutdown[1]: Unmounting /dev/mqueue.
[   73.132948] systemd-shutdown[1]: Unmounting /dev/hugepages.
[   99.819192] systemd-shutdown[1]: All filesystems unmounted.
[   99.831388] systemd-shutdown[1]: Deactivating swaps.
[   99.843174] systemd-shutdown[1]: All swaps deactivated.
[   99.854839] systemd-shutdown[1]: Detaching loop devices.
[   99.871031] systemd-shutdown[1]: All loop devices detached.
[   99.882990] systemd-shutdown[1]: Detaching DM devices.
[   99.894874] systemd-shutdown[1]: All DM devices detached.
[   99.912184] systemd-shutdown[1]: Powering off.
[  100.949427] r8169 0000:02:00.0: System wakeup enabled by ACPI
[  100.972007] ACPI: Preparing to enter system sleep state S5
[  100.983146] reboot: Power down</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50875</commentid>
    <comment_count>2</comment_count>
    <who name="David_Wei">david.wei</who>
    <bug_when>2015-05-08 01:16:38 +0000</bug_when>
    <thetext>Which version of Yocto release are you using? Could you point me the exact download address so that I can have a try?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50883</commentid>
    <comment_count>3</comment_count>
    <who name="California Sullivan">california.l.sullivan</who>
    <bug_when>2015-05-08 20:51:10 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Which version of Yocto release are you using? Could you point me the exact
&gt; download address so that I can have a try?

I have now tested two different Yocto images. The first (which the output in the previous comment came from) was systemdev-image-intel-corei7-64.hddimg from here: http://eywa-builder.ostc.intel.com/systemdev/20150209-2/machines/intel-corei7-64/

The second is a freshly built core-image-minimal using the dizzy branch of poky and the dizzy branch of meta-intel with MACHINE set to intel-corei7-64.

Both images had the same successful results.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51280</commentid>
    <comment_count>4</comment_count>
    <who name="David_Wei">david.wei</who>
    <bug_when>2015-05-27 07:19:59 +0000</bug_when>
    <thetext>systemdev-image-intel-corei7-64.hddimg is fine. But both systemdev-image-xfce-intel-corei7-64.hddimg and systemdev-image-xfce-sdk-intel-corei7-64.hddimg fails to do S3 resume.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53172</commentid>
    <comment_count>5</comment_count>
    <who name="California Sullivan">california.l.sullivan</who>
    <bug_when>2015-08-18 00:06:32 +0000</bug_when>
    <thetext>The problem seems to be related to the graphics driver. I get:

[   70.551229] [drm:__vlv_force_wake_get] *ERROR* Timed out: waiting for media to ack.

This error message comes from drivers/gpu/drm/i915/intel_uncore.c in the 3.17 kernel.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53339</commentid>
    <comment_count>6</comment_count>
    <who name="California Sullivan">california.l.sullivan</who>
    <bug_when>2015-08-21 20:37:20 +0000</bug_when>
    <thetext>With 0.82 firmware I can no longer reproduce this issue.

Using systemdev-image-xfce-intel-corei7-64.hddimg, it reproduces every attempt on 0.80 firmware but never on 0.82 firmware.

Can somebody else confirm these results?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53343</commentid>
    <comment_count>7</comment_count>
    <who name="Lu_Shifei">shifeix.a.lu</who>
    <bug_when>2015-08-24 06:07:40 +0000</bug_when>
    <thetext>   I am using the 0.80 and 0.82 firmware on a dual core MinnowMax Board to test Yocto image,systemdev-image-xfce-intel-corei7-64.hddimg, which comes from: http://eywa-builder.ostc.intel.com/systemdev/20150819-1/machines/intel-corei7-64/,the test result are passed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53398</commentid>
    <comment_count>8</comment_count>
    <who name="California Sullivan">california.l.sullivan</who>
    <bug_when>2015-08-25 23:55:43 +0000</bug_when>
    <thetext>Ok.

This has been fixed with both firmware and kernel changes. Here are my observations.

Note that the 3.17.1 kernel was a known fail case and is what I linked in a previous comment (http://eywa-builder.ostc.intel.com/systemdev/20150209-2/machines/intel-corei7-64/ ) and the 3.19.5 kernel is what is on the images linked in Shifei&apos;s comment (http://eywa-builder.ostc.intel.com/systemdev/20150819-1/machines/intel-corei7-64/ ). All tests were ran on &quot;xfce&quot; versions, as they do not reproduce without graphics.

0.80 firmware, 3.17.1 kernel: often fails suspend/resume, always fails shutdown if suspend/resume succeeds.

0.81 firmware, 3.17.1 kernel: suspend/resume succeeds but with errors, shutdown succeeds cleanly.

0.82 firmware, 3.17.1 kernel: both suspend/resume and shutdown succeeds cleanly.

0.80 firmware, 3.19.5 kernel: both suspend/resume and shutdown succeeds cleanly.

0.81 firmware, 3.19.5 kernel: both suspend/resume and shutdown succeeds cleanly.

0.82 firmware, 3.19.5 kernel: both suspend/resume and shutdown succeeds cleanly.

Using git bisect I have identified that it was fixed in mainline kernel on commit 9c25210fd30991e68f93e2ec0857de2d967b5766 (backported to 3.19.5 as commit a07b73f4155a91cab883da8e436fcd649a1dff74, see https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=a07b73f4155a91cab883da8e436fcd649a1dff74 ).

However, I was unable to figure out how it was also fixed in firmware. Looking at the SVN log between 0.80 and 0.82 firmware I do not see any changes, nor do I see any differences in the md5sums of the GOP driver binaries.

I am comfortable closing this bug since it has been demonstrably fixed, but it would be nice to see what changed in firmware as well. Any pointers on where I can find the change(s) documented?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>