com.canonical.certification::suspend/{index}_gl_support_after_suspend_{product_slug} fails if the desktop contains two GPUs and the output is from add-on graphic card

Bug #1908490 reported by jeremyszu
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Expired
High
Unassigned
OEM Priority Project
Triaged
Critical
jeremyszu

Bug Description

* Steps to reproduce:
checkbox-cli run com.canonical.certification::device com.canonical.certification::graphics_card com.canonical.certification::suspend/2_gl_support_after_suspend_Oland__Radeon_HD_8570___R7_240_340___Radeon_520_OEM__auto

* Description:
It could get the positive result when
1. systemctl suspend
2. /usr/lib/nux/unity_support_test -p 2>&1
```
OpenGL vendor string: X.Org
OpenGL renderer string: AMD OLAND (DRM 2.50.0, 5.6.0-1036-oem, LLVM 10.0.0)
OpenGL version string: 4.5 (Compatibility Profile) Mesa 20.0.8

Not software rendered: yes
Not blacklisted: yes
GLX fbconfig: yes
GLX texture from pixmap: yes
GL npot or rect textures: yes
GL vertex program: yes
GL fragment program: yes
GL vertex buffer object: yes
GL framebuffer object: yes
GL version is 1.4+: yes

Unity 3D supported: yes
```

But if I ran the command from "2_gl_support_after_suspend_Oland__Radeon_HD_8570___R7_240_340___Radeon_520_OEM__auto" the result will be
```
--------------[ Running job 6 / 6. Estimated time left: unknown ]---------------
[ Test OpenGL support for Oland [Radeon HD 8570 / R7 240/340 / Radeon 520 OEM] after suspend ]
ID: com.canonical.certification::suspend/2_gl_support_after_suspend_Oland__Radeon_HD_8570___R7_240_340___Radeon_520_OEM__auto
Category: com.canonical.plainbox::suspend
... 8< -------------------------------------------------------------------------
Setting up PRIME GPU offloading for AMD discrete GPU
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 630 (CML GT2)
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.0.8

Not software rendered: yes
Not blacklisted: yes
GLX fbconfig: yes
GLX texture from pixmap: no
GL npot or rect textures: yes
GL vertex program: yes
GL fragment program: yes
GL vertex buffer object: yes
GL framebuffer object: yes
GL version is 1.4+: yes

Unity 3D supported: no
------------------------------------------------------------------------- >8 ---
Outcome: job failed
```

BTW, it's a cert blocker issue. Set the importance to Critical.

jeremyszu (os369510)
tags: added: oem-priority originate-from-1908254 stella
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

when it fails, looks the render is no longer AMD but Intel.
Please try to also run the commands triggered by:

Setting up PRIME GPU offloading for AMD discrete GPU

IIRC they are defined in:

https://git.launchpad.net/plainbox-provider-checkbox/tree/bin/graphics_env.sh

Changed in plainbox-provider-checkbox:
importance: Critical → High
status: New → Incomplete
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

So do we test reverse prime? This is exactly what we are testing here.

jeremyszu (os369510)
summary: com.canonical.certification::suspend/{index}_gl_support_after_suspend_{product_slug}
+ fails if the system designs as reverse prime
jeremyszu (os369510)
summary: com.canonical.certification::suspend/{index}_gl_support_after_suspend_{product_slug}
- fails if the system designs as reverse prime
+ fails if the desktop contains two GPUs and the output is from add-on
+ graphic card
jeremyszu (os369510)
Changed in oem-priority:
assignee: nobody → jeremyszu (os369510)
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
jeremyszu (os369510) wrote :

@Sylvain,

In this case, the DUT is a desktop.
Which mean the system is not as the laptop to share the memory between iGPU and dGPU.
The DRI_PRIME=1 is still could be given to direct rendering to selected drm but not sure the performance and power consulting whether will better then iGPU because there may not have shared memory and DMA enabled on those buses.

Here are some suggestions:
1. Add a condition to specify this test case only if the DUT is a laptop/AIO. If there is no existing information in current checkbox then could consider to check `/sys/kernel/debug/vgaswitcheroo/switch`[2] is exist or not. To skip related test case if the file not exist there.
2. If you think the desktop is worth to test DRI_PRIME then it needs to consider if attach more than two GPUs case and which GPU is currently displaying.
3. BTW, if the GPUs are more than one[1] then continue but always use DRI_PRIME=1. It looks like the application will always force to render to specific drm. May need to refer $INDEX as well.

[1] https://git.launchpad.net/plainbox-provider-checkbox/tree/bin/graphics_env.sh#n16
[2] https://01.org/linuxgraphics/gfx-docs/drm/gpu/vga-switcheroo.html

Changed in oem-priority:
status: In Progress → Triaged
Revision history for this message
jeremyszu (os369510) wrote :

For case bug1924705 bug1924705 bug1924709 bug1924710,
it's a workstation without iGPU and connected to two nvidia graphics with nvlink.

checkbox launches "prime-select intel" and then

1. expect the display output from secondary graphic (no any monitor connected)
2. checkbox didn't check any gpu type. Instead, force switch to intel.

tags: added: originate-from-1924706 sutton
tags: added: originate-from-1924709
tags: added: originate-from-1924710
tags: added: originate-from-1924705
Revision history for this message
Maksim Beliaev (beliaev-maksim) wrote :

Bug was migrated to GitHub: https://github.com/canonical/checkbox/issues/79.
Bug is no more monitored here.

Changed in plainbox-provider-checkbox:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.