Bug 94932 - [APL] igt drv_suspend fails
Summary: [APL] igt drv_suspend fails
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: highest blocker
Assignee: Imre Deak
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-14 12:59 UTC by cprigent
Modified: 2016-04-20 16:14 UTC (History)
1 user (show)

See Also:
i915 platform: BXT
i915 features: display/Other, power/suspend-resume


Attachments
log drv_suspend nightly (13.62 KB, text/plain)
2016-04-14 12:59 UTC, cprigent
no flags Details
nightly-kern.log (267.45 KB, text/plain)
2016-04-14 12:59 UTC, cprigent
no flags Details
log drv_suspend ideak (13.63 KB, text/plain)
2016-04-14 13:00 UTC, cprigent
no flags Details
ideak-kern.log (270.92 KB, text/plain)
2016-04-14 13:00 UTC, cprigent
no flags Details
drv_suspend_kernel_log (62.25 KB, text/plain)
2016-04-14 17:46 UTC, Elio
no flags Details
test_ouput (1.27 KB, text/plain)
2016-04-14 17:46 UTC, Elio
no flags Details

Description cprigent 2016-04-14 12:59:07 UTC
Created attachment 122932 [details]
log drv_suspend nightly

Setup:
======
Platform: Broxton P A0 Platform
CPU Name : Intel(R) @ 1.2 GHz (family: 6, model: 92, stepping: 8) – 4 cores
SoC : BROXTON-P A0
CRB :  Apollo Lake RVPC1 Fab1 

Software:
=========
BIOS (IFWI Version): APLK_IFWI_X64_R_2015_41_5_02 
KSC : 1.02
Linux distribution: Ubuntu 15.10 64 bits
Kernel: drm-intel-nightly 4.6.0-rc3 631ffd2 from http://cgit.freedesktop.org/drm-intel/
  commit 631ffd2f45bb43964f729e8661532fb115f5eeec
  Author: Jani Nikula <jani.nikula@intel.com>
  Date:   Wed Apr 13 16:00:48 2016 +0300
  drm-intel-nightly: 2016y-04m-13d-13h-00m-18s UTC integration manifest
libdrm-2.4.67-11 ea78c17 from git://anongit.freedesktop.org/mesa/drm
cairo 1.15.2 db8a7f1 from git://anongit.freedesktop.org/cairo
DMC 1.06 from: https://01.org/linuxgraphics/downloads/broxton-dmc-1.06
IGT 1.14 e609955 from https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/

Steps:
------
Execute igt test drv_suspend
sudo -s
cd <...>/intel-gpu-tools/tests
./drv_suspend

Actual results
----------------
Subtests are fail

Exepected resulst
-----------------
Subtests are pass

Info
-----
Reproduced with kernel 4.6.0-rc3 72c0a99 from https://github.com/ideak/linux/commits/bxt-rpm
Comment 1 cprigent 2016-04-14 12:59:34 UTC
Created attachment 122933 [details]
nightly-kern.log
Comment 2 cprigent 2016-04-14 13:00:03 UTC
Created attachment 122934 [details]
log drv_suspend ideak
Comment 3 cprigent 2016-04-14 13:00:44 UTC
Created attachment 122935 [details]
ideak-kern.log
Comment 4 Imre Deak 2016-04-14 13:11:07 UTC
(In reply to cprigent from comment #1)
> Created attachment 122933 [details]
> nightly-kern.log

It'(In reply to cprigent from comment #0)
> Created attachment 122932 [details]
> log drv_suspend nightly
> 
> Setup:
> ======
> Platform: Broxton P A0 Platform
> CPU Name : Intel(R) @ 1.2 GHz (family: 6, model: 92, stepping: 8) – 4 cores
> SoC : BROXTON-P A0
> CRB :  Apollo Lake RVPC1 Fab1 
> 
> Software:
> =========
> BIOS (IFWI Version): APLK_IFWI_X64_R_2015_41_5_02 
> KSC : 1.02
> Linux distribution: Ubuntu 15.10 64 bits
> Kernel: drm-intel-nightly 4.6.0-rc3 631ffd2 from
> http://cgit.freedesktop.org/drm-intel/
>   commit 631ffd2f45bb43964f729e8661532fb115f5eeec
>   Author: Jani Nikula <jani.nikula@intel.com>
>   Date:   Wed Apr 13 16:00:48 2016 +0300
>   drm-intel-nightly: 2016y-04m-13d-13h-00m-18s UTC integration manifest
> libdrm-2.4.67-11 ea78c17 from git://anongit.freedesktop.org/mesa/drm
> cairo 1.15.2 db8a7f1 from git://anongit.freedesktop.org/cairo
> DMC 1.06 from: https://01.org/linuxgraphics/downloads/broxton-dmc-1.06
> IGT 1.14 e609955 from https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/
> 
> Steps:
> ------
> Execute igt test drv_suspend
> sudo -s
> cd <...>/intel-gpu-tools/tests
> ./drv_suspend
> 
> Actual results
> ----------------
> Subtests are fail
> 
> Exepected resulst
> -----------------
> Subtests are pass
> 
> Info
> -----
> Reproduced with kernel 4.6.0-rc3 72c0a99 from
> https://github.com/ideak/linux/commits/bxt-rpm

Hi Christophe,

thanks for testing this.

The above configuration data has:
Kernel: drm-intel-nightly 4.6.0-rc3 631ffd2 from
  http://cgit.freedesktop.org/drm-intel/

I assume that's incorrect and this result really comes from the bxt-rpm branch. Another thing from  log drv_suspend ideak:
(drv_suspend:1063) igt-aux-CRITICAL: Failed assertion: system("rtcwake -s 30 -m mem") == 0

I think this means that your RTC clock is out of sync with your system clock. Could you make sure that these things are correct:

# ntpdate <ntpserver>
# date
# hwclock --systohc

and then rerun the test?
Comment 5 cprigent 2016-04-14 13:33:59 UTC
I tested both nightly and bxt-rpm branch. I attached kernel and tool logs for both cases.
You are right! I was also searching why rtcwake is not working, the date was the problem.
I launched it again, I will give new result.
Comment 6 Elio 2016-04-14 17:38:41 UTC
Facing same issue with following configuration:

 ++ Platform                            : BXT-P
 ++ Motherboard model                   : Broxton P
 ++ Motherboard type                    : NOTEBOOK Hand Held
 ++ Motherboard manufacturer            : Intel Corp.
 ++ CPU family                          : Other
 ++ CPU information                     : 06/5c
 ++ GPU Card                            : Intel Corporation Device 5a84 (rev 03) (prog-if 00 [VGA controller])
 ++ Memory ram                          : 8 GB
 ++ Maximum memory ram allowed          : 16 GB
 ++ Display resolution                  :
 ++ CPU's number                        : 4
 ++ Hard drive capacity                 : 120 GB

 ++ Kernel version                      : 4.6.0-rc3-nightly+
 ++ Linux distribution                  : Ubuntu 15.10
 ++ Architecture                        : 64-bit
 
 ++ xf86-video-intel version            : 2.99.917
 ++ Xorg-Xserver version                : 1.17.2
 ++ DRM version                         : 2.4.64
 
 ++ Cairo version                       : 1.14.2
 ++ Intel GPU Tools version             : Tag [intel-gpu-tools-1.14-133-gc89e8db] / Commit [c89e8db]
 ++ Kernel driver in use                : i915
 ++ Hardware acceleration               :
 ++ Bios revision                       : 131.10
 ++ KSC revision                        : 1.12


Seems that the problem start when the platforms tries 2 nd iteration of suspend on disk (S4).

Attaching kernel log and test output
Comment 7 Elio 2016-04-14 17:46:09 UTC
Created attachment 122943 [details]
drv_suspend_kernel_log
Comment 8 Elio 2016-04-14 17:46:36 UTC
Created attachment 122944 [details]
test_ouput
Comment 9 Imre Deak 2016-04-14 18:11:30 UTC
(In reply to Elio from comment #8)
> Created attachment 122944 [details]
> test_ouput

(In reply to Elio from comment #7)
> Created attachment 122943 [details]
> drv_suspend_kernel_log

Please also try the followings:

- The log ends with some filesystem corruption and bogus mount device errors, it would be good if you could get rid of those, by not trying to mount the corresponding devices, or disabling those devices (mmc) in your kernel config. I assume you boot from SSD.
- Boot with nomodeset and see if 'rtcwake -m disk -s 30' resumes properly.
- Boot both the -nightly and bxt-rpm branches into text mode 'passing 3 on the kernel command line' and rerun the test.

Please provide the full dmesg log starting from bootup.
Comment 10 cprigent 2016-04-15 16:32:59 UTC
Elio,
Please check last comment from Imre
Comment 11 Luis Botello 2016-04-19 18:03:57 UTC
This issue is not seen on an APL with the following configuration:

Hardware Configuration
===========================================
Platform: BXT - P (APL)
CPU : CPU family   Other
CPU information:   06/5c
Motherboard model  Apollo Lake
Motherboard type    NOTEBOOK Hand Held
Motherboard manufacturer Intel Corp.

Software Configuration
================================================
Linux distribution: Ubuntu 15.10 64 bits
Kernel: drm-intel-nightly 4.6.0-rc3_d9131d6 from http://cgit.freedesktop.org/drm-intel/
commit d9131d62d18ba94fb3ca019f1156c22b5f4ce23c
Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Date:   Fri Apr 15 14:54:26 2016 +0100
drm-intel-nightly: 2016y-04m-15d-13h-53m-44s UTC integration manifestdrm: tag libdrm-2.4.66-33-gf884af9
      libdrm 2.4.67-25 cc9a53f from git://git.freedesktop.org/git/mesa/drm
mesa 11.1.2 7bcd827 from git://git.freedesktop.org/git/mesa/mesa
cairo 1.15.2 db8a7f1 from git://git.freedesktop.org/git/cairo
xorg/xserver 1.18.0-274 8437955 from git://git.freedesktop.org/git/xorg/xserver
xf86-video-intel 2.99.917-634 81029be from git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
vaapi/libva 1.7.0-1 2339d10 from git://git.freedesktop.org/git/vaapi/libva
vaapi/intel-driver 1.7.0-8 2c1bec0 from git://git.freedesktop.org/git/vaapi/intel-driver
intel-gpu-tool 1.14 7bd2ac6 from http://anongit.freedesktop.org/git/xorg/app/intel-gpu-tools.git
rendercheck master 44032a7 from http://anongit.freedesktop.org/git/xorg/app/rendercheck.git

It seems like the issue was induced because of a miss-configuration in the system date and the HW date, once they are synced up, this test runs fine. I just want to let you know that the system was not able to auto-resume from S4, it could be a HW limitation, but when i resumed manually with a keystroke it worked fine.
Comment 12 Imre Deak 2016-04-19 18:25:57 UTC
(In reply to Luis Botello from comment #11)
> This issue is not seen on an APL with the following configuration:
> 
> Hardware Configuration
> ===========================================
> Platform: BXT - P (APL)
> CPU : CPU family   Other
> CPU information:   06/5c
> Motherboard model  Apollo Lake
> Motherboard type    NOTEBOOK Hand Held
> Motherboard manufacturer Intel Corp.
> 
> Software Configuration
> ================================================
> Linux distribution: Ubuntu 15.10 64 bits
> Kernel: drm-intel-nightly 4.6.0-rc3_d9131d6 from
> http://cgit.freedesktop.org/drm-intel/
> commit d9131d62d18ba94fb3ca019f1156c22b5f4ce23c
> Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Date:   Fri Apr 15 14:54:26 2016 +0100
> drm-intel-nightly: 2016y-04m-15d-13h-53m-44s UTC integration manifestdrm:
> tag libdrm-2.4.66-33-gf884af9
>       libdrm 2.4.67-25 cc9a53f from git://git.freedesktop.org/git/mesa/drm
> mesa 11.1.2 7bcd827 from git://git.freedesktop.org/git/mesa/mesa
> cairo 1.15.2 db8a7f1 from git://git.freedesktop.org/git/cairo
> xorg/xserver 1.18.0-274 8437955 from
> git://git.freedesktop.org/git/xorg/xserver
> xf86-video-intel 2.99.917-634 81029be from
> git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
> vaapi/libva 1.7.0-1 2339d10 from git://git.freedesktop.org/git/vaapi/libva
> vaapi/intel-driver 1.7.0-8 2c1bec0 from
> git://git.freedesktop.org/git/vaapi/intel-driver
> intel-gpu-tool 1.14 7bd2ac6 from
> http://anongit.freedesktop.org/git/xorg/app/intel-gpu-tools.git
> rendercheck master 44032a7 from
> http://anongit.freedesktop.org/git/xorg/app/rendercheck.git
> 
> It seems like the issue was induced because of a miss-configuration in the
> system date and the HW date, once they are synced up, this test runs fine. I
> just want to let you know that the system was not able to auto-resume from
> S4, it could be a HW limitation, but when i resumed manually with a
> keystroke it worked fine.

Ok. The reason for this working now could be that a few PM related fixes got merged since which for me fixed suspend/resume with multiple display outputs.

One reason why autoresume doesn't work is that suspend-to-disk on BXT takes a long time atm, due to broken system clock support. drv_suspend schedules the autoresume 30 sec in the future, so if hibernation takes longer than that then you have to resume manually. That's a separate issue though, so if the test passes otherwise I suggest closing this bug.
Comment 13 Imre Deak 2016-04-19 20:34:08 UTC
Closing this based on comment 12.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.