Choppy and pixelated video on Macbook Air 5,1. Unable to run/view HD videos at all

Bug #1103236 reported by Charles Lease
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xserver-xorg-video-intel (Ubuntu)
Expired
Low
Unassigned

Bug Description

*** I reported this as a question on Ask Ubuntu and was told this is a bug. http://askubuntu.com/questions/245584/choppy-and-pixelated-video-on-macbook-air-5-1-unable-to-run-view-hd-videos-at-a ***

I'm currently running 13.04 and the video is extremely choppy and pixelated on any video program I run (vlc, mplayer, totem etc.), any flash or html5 videos, and HD videos won't play in a reasonable way at all (entire frames get skipped and video footage is completely distorted; I would say it's about 10 FPS on HD videos, really extremely bad quality). Also, I had this exact problem on 12.04 and 12.10 and was kind of hoping 13.04 would be better, but it is not. Video in Mac OSX works excellent, no lag or quality loss, works perfect in that OS. I would attach some sort of log file but I don't know how and would need directions to do so.

Specs - Macbook Air 5,1 ,8 gig ram , 256 ssd , Intel® Core™ i7-3667U CPU @ 2.00GHz × 4 , Intel® Ivybridge Mobile

  *-display
       description: VGA compatible controller
       product: 3rd Gen Core processor Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:46 memory:a0000000-a03fffff memory:90000000-9fffffff ioport:2000(size=64)

Revision history for this message
Charles Lease (mellowchuck-y) wrote :
bugbot (bugbot)
tags: added: kubuntu
tags: added: ubuntu
tags: added: i915 intel
tags: added: amd64 raring
Revision history for this message
Chris Wilson (ickle) wrote :

Please make sure you have the correct and uptodate packages installed and at least attach your Xorg.log (probably best to run apport to grab all the info).

Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Incomplete
Revision history for this message
Charles Lease (mellowchuck-y) wrote :

I'm running 13.04 with all packages up-to-date including proposed. Also had exact same problem in up-to-date 12.04 and 12.10.

I don't know how to do an apport on xorg.

Revision history for this message
Charles Lease (mellowchuck-y) wrote :
Revision history for this message
Charles Lease (mellowchuck-y) wrote :
Revision history for this message
Charles Lease (mellowchuck-y) wrote :
Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → New
Revision history for this message
Chris Wilson (ickle) wrote :

Hmm, in your logs the drmSetVersion() failed message occurs *several* times, not just once as could simply be explained. However, it does confirm that the right ddx driver is being loaded which is what I first thought the issue would be.

Can you please attach glxinfo?

Revision history for this message
Charles Lease (mellowchuck-y) wrote :

Here's the glxinfo output for you.

Revision history for this message
Chris Wilson (ickle) wrote :

And that is setup as one would expect. So, let's try to piece together what is going on when vlc runs.

Can please report what is using the cpu (i.e. watch top) whilst playing back a video? Then follow that up with the highlights from 'sudo perf top --sort=dso' and 'sudo perf top' (apt-get install linux-tools). Just cut and paste the first few lines of where the time is spent at a random point of time during playback.

Revision history for this message
Charles Lease (mellowchuck-y) wrote :

----Can please report what is using the cpu (i.e. watch top) whilst playing back a video?----
VLC is at the top, Compiz below, and xprop third.

----Then follow that up with the highlights from 'sudo perf top --sort=dso' and 'sudo perf top' (apt-get install linux-tools). Just cut and paste the first few lines of where the time is spent at a random point of time during playback.----

This is going to sound really stupid, but I don't know how to copy while this runs; I tried right clicking and I've tried shift+ctrl+c with no luck.

Revision history for this message
Chris Wilson (ickle) wrote :

Worst case scenario, just grab a screenshot ;-)
I should have also said, to make most sense out of those you need to have the dbg packages installed.

Ok, so VLC is at the top. That's good as it rules out a whole host of other worries. But we just need to peek inside VLC to see where the time is spent to make sure it is using hw accel (that's where perf top helps). How about if we compare with mplayer? Say mplayer -vo xv and mplayer -vo gl?

Do you have a sample video I can check to rule out garbage there? Do you see this issue with every video?

Revision history for this message
Charles Lease (mellowchuck-y) wrote :

Mplayer is at the top when the video is played directly and in both modes you provided( -vo xv and -vo gl) , just like with vlc. Mplayer -vo xv is a lot better quality than mplayer -vo gl though; probably the best it's performed so far.

Also as previously stated-- the issue occurs with every media player, youtube videos (html5 and flash). Any HD video on youtube is really bad quality in HD (especially 1080p) but in Mac OSX all players run with exceptional quality and without lag in all videos.

Revision history for this message
Chris Wilson (ickle) wrote :

Getting flash/youtube to work well is unfortunately wishlist territory since they have yet to enable hw acceleration.

In theory, gstreamer is meant to support the video decode engine inside your Ivybridge GPU using va-api. I believe VLC also has a va-api mode, but last I checked it was using an inferior GL engine. mplayer -vo xv uses the last amount of acceleration (the GPU is only used for colorspace conversion and rendering of the result), and amusingly it is the one that uses the least CPU on my system.

So my Sandybridge mba can manage playing the 2k Sintel mp4 with plenty to spare. Can you grab the 2k mp4 and the 1080p mkv versions of Sintel and use that to baseline performance of your system? For example, mplayer -benchmark -frames 500 -nosound $sintel

Revision history for this message
Charles Lease (mellowchuck-y) wrote :

----Getting flash/youtube to work well is unfortunately wishlist territory since they have yet to enable hw acceleration.----
I'm not sure I understand this; in Mac OSX youtube videos (both html5 and flash) run excellent, the problem is only in Ubuntu.

----So my Sandybridge mba can manage playing the 2k Sintel mp4 with plenty to spare. Can you grab the 2k mp4 and the 1080p mkv versions of Sintel and use that to baseline performance of your system? For example, mplayer -benchmark -frames 500 -nosound $sintel----

I'm not sure if the below output is what you want?

user@pc:~$ mplayer -benchmark -frames 500 -nosound $sintel '/home/user/Downloads/Crossroads: Labor Pains of a New Worldview | FULL MOVIE.mp4'
MPlayer svn r34540 (Ubuntu), built with gcc-4.7 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /home/user/Downloads/Crossroads: Labor Pains of a New Worldview | FULL MOVIE.mp4.
libavformat version 53.21.1 (external)
Mismatching header version 53.19.0
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO: [H264] 1280x720 24bpp 30.000 fps 1609.8 kbps (196.5 kbyte/s)
Clip info:
 major_brand: mp42
 minor_version: 0
 compatible_brands: isommp42
 creation_time: 2012-12-27 10:43:34
Load subtitles in /home/user/Downloads/
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 53.35.0 (external)
Mismatching header version 53.32.2
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Unsupported PixelFormat 81
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 1280x720 => 1280x720 Planar YV12
V: 16.6 0/ 0 11% 0% 0.0% 0 0

BENCHMARKs: VC: 1.845s VO: 0.154s A: 0.000s Sys: 0.042s = 2.041s
BENCHMARK%: VC: 90.3944% VO: 7.5713% A: 0.0000% Sys: 2.0342% = 100.0000%

Exiting... (End of file)

Revision history for this message
Charles Lease (mellowchuck-y) wrote :

Also I'm not sure if this is of help, but someone commented on the Ask Ubuntu page where this originally was posted and supposedly the problem was resolved for that person by suspending to ram then resuming which then "initialized" the chip. However, I tried this with no success.

Revision history for this message
Chris Wilson (ickle) wrote :

I just meant I have no control over flash playback as it is a propietary 3rd party application - we have to wait for them to improve it.

The mplayer output says that is capable of decoding roughly 10 such streams in real time (i.e. it ran at 250fps). So the bottleneck in the pipeline is not the decode or presentation. Let's continue to focus on mplayer so I can find exactly where the bottleneck is.

Sticking with mplayer -vo xv (which is the default if you specify no -vo) can you please decribe if that renders smoothly, then hit 'f' to make it fullscreen (or you can pass -fs on the mplayer commandline). Does it begin to stutter then?

Also, since you describe severe video distortion, can you grab a screenshot or photograph?

Revision history for this message
Charles Lease (mellowchuck-y) wrote :

----I just meant I have no control over flash playback as it is a propietary 3rd party application - we have to wait for them to improve it.----

I don't think it has to do with Flash since the same video runs fine in the other operating system but not in Ubuntu. Also, the same problem occurs for html5 videos which I think, correct me if I'm wrong, is open source on youtube.

----Sticking with mplayer -vo xv (which is the default if you specify no -vo) can you please decribe if that renders smoothly, then hit 'f' to make it fullscreen (or you can pass -fs on the mplayer commandline). Does it begin to stutter then?----

It stutters in both fullscreen and in a windowed view.

----Also, since you describe severe video distortion, can you grab a screenshot or photograph?----

The screenshot doesn't seem to capture the pixelation and skips, but you can see the blurriness. (exact same video works perfectly fine in OSX using vlc)

http://ubuntuone.com/6VZ8aLYlY4SwmJazZv5Uhk

http://ubuntuone.com/5Ts2NVxY0tBbqxUeoUzYUn

Revision history for this message
Chris Wilson (ickle) wrote :

> I don't think it has to do with Flash since the same video runs fine in the other operating system but not in Ubuntu.

They support hw acceleration on Linux for anything other than the nvidia propietary drivers. (Well at one point they had support for Intel PVR chips...) As far as I am aware we (Intel) have not made any inroads into getting them to support more hw.

> Also, the same problem occurs for html5 videos which I think, correct me if I'm wrong, is open source on youtube.

If you are referring to chrome, then it is about as open source as code dumps many months after the fact can be... But we are working with them. WebKit itself seems to drift along failing to get acceleration to work, as the original code base is completely adverse to GPU acceleration. (And our efforts here are sadly not aimed at the desktop.) Firefox should pick up support through gstreamer, eventually.

Thinking about the skips:

Can you switch to a console with CRTL-ATL-F2, login and stop lightdm (sudo service lightdm stop). Then launch X and start playback:

$ sudo Xorg -ac -noreset :0 & sleep 5 ; DISPLAY=:0 mplayer -fs '/home/user/Downloads/Crossroads: Labor Pains of a New Worldview | FULL MOVIE.mp4'

Does it ever skip then?

Revision history for this message
Charles Lease (mellowchuck-y) wrote :

I tried running the command you typed and it error-ed out with 'file not found' so I did sudo -s and ran the command as root; it gave an error stating x server 0 was already in use then a couple seconds after that it seems to start to play then errors out with resolution warnings.

I would also like to add that external Blueray Movies played straight from the disc are almost impossible to watch due to quality; DVD's are a little better. This occurs in all players I use (rhythymbox, mplayer, vlc, totem, dragon player).

Revision history for this message
Charles Lease (mellowchuck-y) wrote :

If you walk me through how to take some sort of screenshot or how to copy the errors from a terminal screen/the mplayer terminal, I will post the errors received when I tried to run the commands per your instructions.

Revision history for this message
penalvch (penalvch) wrote :

Charles Lease, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p xserver-xorg-video-intel REPLACE-WITH-BUG-NUMBER

Please note, given that the information from the prior release is already available, doing this on a release prior to the development one would not be helpful.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

Changed in xserver-xorg-video-intel (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xserver-xorg-video-intel (Ubuntu) because there has been no activity for 60 days.]

Changed in xserver-xorg-video-intel (Ubuntu):
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.