Unable to run camera display and video test on a discrete AMD GPU

Bug #1505606 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Won't Fix
Medium
Unassigned

Bug Description

CID: 201404-14986 Dell Precision M2800

I can't start the camera display test on this laptop (the "still" test works just fine). It will fail with:

X Error of failed request: BadAlloc (insufficient resources for operation)
  Major opcode of failed request: 151 (XVideo)
  Minor opcode of failed request: 19 ()
  Serial number of failed request: 51
  Current serial number in output stream: 52

However, I can capture video with cheese on this system without any problem.

This system failed with the bar and static video test as well:

X Error of failed request: BadAlloc (insufficient resources for operation)
  Major opcode of failed request: 151 (XVideo)
  Minor opcode of failed request: 19 ()
  Serial number of failed request: 51
  Current serial number in output stream: 52
Attempting to initialize Gstreamer pipeline: videotestsrc ! ffmpegcolorspace ! autovideosink
Specified pipeline couldn't be processed.
Error when processing pipeline: no element "ffmpegcolorspace"

Sometimes the X server will crash, I guess there is something to do with video streaming. As video capture works with cheese, and we don't have any equivalent manual tests for the video test, I will blame on our tool first.

And these issues only happen on discrete AMD GPU with fglrx, can't be reproduced on the Intel GPU

canonical-certification-client 0.18+bzr3943+pkg54~ubuntu14.04.1
checkbox-gui 0.35+bzr3986+pkg19~ubuntu14.04.1
checkbox-ng 0.22+bzr4046+pkg33~ubuntu14.04.1
checkbox-ng-service 0.22+bzr4046+pkg33~ubuntu14.04.1
plainbox 0.24+bzr4047+pkg37~ubuntu14.04.1
plainbox-glmark2-es2-meta 0.18+bzr3943+pkg54~ubuntu14.04.1
plainbox-provider-certification-client 0.18+bzr3943+pkg54~ubuntu14.04.1
plainbox-provider-checkbox 0.23+bzr4046+pkg27~ubuntu14.04.1
plainbox-provider-resource-generic 0.21+bzr4046+pkg22~ubuntu14.04.1
plainbox-secure-policy 0.24+bzr4047+pkg37~ubuntu14.04.1
python3-checkbox-ng 0.22+bzr4046+pkg33~ubuntu14.04.1
python3-checkbox-support 0.22+bzr4046+pkg23~ubuntu14.04.1
python3-plainbox 0.24+bzr4047+pkg37~ubuntu14.04.1

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
description: updated
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

X server log:
[ 1831.071] (EE)
[ 1831.072] (EE) Backtrace:
[ 1831.072] (EE) 0: /usr/bin/X (xorg_backtrace+0x48) [0x7f95528bdf08]
[ 1831.072] (EE) 1: /usr/bin/X (0x7f955271d000+0x1a4f39) [0x7f95528c1f39]
[ 1831.072] (EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (0x7f955089d000+0x36d40) [0x7f95508d3d40]
[ 1831.072] (EE) 3: /usr/bin/X (0x7f955271d000+0xa9921) [0x7f95527c6921]
[ 1831.072] (EE) 4: /usr/bin/X (0x7f955271d000+0xaa7db) [0x7f95527c77db]
[ 1831.072] (EE) 5: /usr/bin/X (0x7f955271d000+0xf0d30) [0x7f955280dd30]
[ 1831.072] (EE) 6: /usr/bin/X (0x7f955271d000+0x5414e) [0x7f955277114e]
[ 1831.072] (EE) 7: /usr/bin/X (0x7f955271d000+0x57f9b) [0x7f9552774f9b]
[ 1831.072] (EE) 8: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf5) [0x7f95508beec5]
[ 1831.072] (EE) 9: /usr/bin/X (0x7f955271d000+0x4352e) [0x7f955276052e]
[ 1831.072] (EE)
[ 1831.072] (EE) Segmentation fault at address 0x20
[ 1831.072] (EE)
Fatal server error:
[ 1831.072] (EE) Caught signal 11 (Segmentation fault). Server aborting
[ 1831.072] (EE)
[ 1831.072] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[ 1831.072] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 1831.072] (EE)
[ 1831.072] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 1831.073] (II) fglrx(0): Backup framebuffer data.
[ 1831.128] (II) fglrx(0): Backup complete.
[ 1831.134] (EE) Server terminated with error (1). Closing log file.

summary: - Unable to run camera display test on a discrete AMD GPU
+ Unable to run camera display and video test on a discrete AMD GPU
description: updated
description: updated
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

I note this error:

Specified pipeline couldn't be processed.
Error when processing pipeline: no element "ffmpegcolorspace"

ffmpegcolorspace is only available with 0.10 base plugins, making me think that the gst version used is not predictable.

gst-inspect-0.10 ffmpegcolorspace --> SUCCESS
gst-inspect-1.0 ffmpegcolorspace --> FAIL

Since 0.10 is kept for legacy reasons, let's try to find a better/1.0 Gst element to build the rendering pipeline.

Po-Hsu Lin (cypressyew)
Changed in plainbox-provider-checkbox:
status: New → Confirmed
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

I just found this issue on another laptop, 201404-14986, an I+A laptop as well, and this issue can be reproduced when running with the AMD GPU.

@Sylvain,
From the command we use in the video test:
gst_pipeline_test -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink'

I think the second part of it act as a fallback option (if the gst_pipeline_test launches gst-0.10, this will happen when you remove all the gst-1.0 related packages)
The "ffmpegcolorspace" element related error message came up because the first part of the command failed, so it tried to run the second part.

After some trial and error, and tips from the GStreamer cheat sheet[1], I found the "autovideosink" plugin is causing this issue, I can't use it with gst-1.0 or gst-0.10, but if we replace it with ximagesink, everything works.

This also applies to the camera test, so this "ximagesink" stuff could be a possible patch.
I'm not sure if it a bug to the driver or to the plugin of GStreamer.

[1] http://wiki.oz9aec.net/index.php/Gstreamer_cheat_sheet

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

@Po-Hsu

Good catch, it's indeed probably a bug in one of the Gst elements. I would then add a third command to use ximagesink in addition to the first two pipelines. Migrating all pipelines to ximagesink is not a good idea if later we want to run this command on a MIR server, so adding a third pipeline should protect us from revisiting this command and hopefully make it work with I+A systems.

Thanks again for having found the right Gst sink to use ;)

Changed in plainbox-provider-checkbox:
assignee: nobody → Po-Hsu Lin (cypressyew)
milestone: none → 0.23
importance: Undecided → Medium
Po-Hsu Lin (cypressyew)
Changed in plainbox-provider-checkbox:
status: Confirmed → In Progress
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hi Sylvain,
I double checked with the latest driver (2:15.201) from AMD on 201404-14986, it looks like it does not have this problem in both video and camera tests.

However, it's not clear that if the GStreamer plugin is broken or not, but it's clear that this issue exist with fglrx version 2:15.200-ubuntu0.5

Should we continue our tweak for the sink? Or leave it there and mark this as a blocker to fglrx?

Changed in plainbox-provider-checkbox:
status: In Progress → Incomplete
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Interesting, ximagesink would mask a driver issue. And that's obviously something we should avoid.
Let's close this bug since the latest driver is ok now.

Changed in plainbox-provider-checkbox:
status: Incomplete → Won't Fix
assignee: Po-Hsu Lin (cypressyew) → nobody
milestone: 0.23 → none
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Thanks!
I filed bug 1509182 for fglrx to track this issue, unfortunately these two systems will be blocked.

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.