FreeBSDDesktop / DEPRECATED-freebsd-base-graphics

Fork of FreeBSD's base repository to work on graphics-stack-related projects
Other
49 stars 13 forks source link

sound & video playback at half speed #36

Closed dch closed 10 months ago

dch commented 8 years ago

present on:

Section "Device" Identifier "Card0"

Driver "scfb"

Driver      "intel"
Option      "AccelMethod" "sna"

EndSection

MBP logs: dmesg: https://dpaste.de/nvNc xorg: https://dpaste.de/nkyN

mattmacy commented 8 years ago

Are you using GENERIC? No one else is seeing half speed playback.

neelchauhan commented 8 years ago

On my laptop (Dell Inspiron 7352, Broadwell i7 5500U), the video lags or even freezes but the audio does not (or it may, but a little if it does). This was tested on Firefox.

I might just have to stick with Linux on this laptop (Linux works excellently on this laptop, where *BSD support isn't too great as I also tried OpenBSD).

mattmacy commented 8 years ago

@neelchauhan have you tried disabling video acceleration? At least with chrome this is off by default on most Linux distros. This is really a ports bug.

mattmacy commented 8 years ago

@neelchauhan It turns out I see the same issue on Firefox. And I've actually noticed as well that FF doesn't get vblank interrupts on WebGL demos. I didn't realize FF had issues because I'm really not at all fond of it. If you can bare to use chrome/chromium (port calls itself chromium but the executable gets named chrome ... go figured), it works like a champ. If you have to use FF then Linux is probably the best route for you.

Nonetheless, I will fix this eventually.

mattmacy commented 8 years ago

@dch If you're seeing this with mp3 playback it is definitely not a graphics driver bug. Are you running powerd? Have you tried disabling that?

mattmacy commented 8 years ago

@dch let's see your rc.conf and loader.conf

dch commented 8 years ago

OK I literally just finished rebuilding All The Things using Monday 27th June and we're better off:

Just retrying all of this without mains power in case powerd is the root cause & I'll jump on IRC

mattmacy commented 8 years ago

If you're not having problems on scfb, but are on i195kms that means you need to turn off video acceleration. On ubuntu on a gtx980ti chrome disables hw video acceleration. The FreeBSD default to always use it clearly isn't correct.

dch commented 8 years ago

thanks @mattmacy is this disabling it in xorg.conf.d just by excluding the AccelMethod, or does it require something like disabling Chrome's Use hardware acceleration when required?

Section "Device"
    Identifier  "Card0"
    Driver      "scfb"
    # Driver        "intel"
    # Option        "AccelMethod" "sna"
EndSection

FWIW powerd made no difference to results.

mattmacy commented 8 years ago

That disables the driver altogether. On chromium: --disable-accelerated-video-decode

mattmacy commented 8 years ago

Are you running a debug kernel? If so is driver offloaded playback still choppy on a non-debug kernel?

dch commented 8 years ago

I re-tested this today on the NUC with drm-next and xserver-next, using youtube Queen videos.

I've fiddled with powerd and can't seem to find a difference, theres nothing in the system BIOS config that tells me anything of use either, although I boot via UEFI.

dch commented 7 years ago

I updated firmware on the NUC this week, rebuilt drm-next and issue is still present... weird. I'm now wondering whether this is related to the display, hope to get my hands on one next week to test against. Additional ideas welcomed!

dch commented 7 years ago

Did some cross testing:

I've been doing some reading trying to understand how this "stuff" works - slow progress. It seems HDMI sound speed is calculated automatically using Pixel Clocks.. further surfing lead me to these two:

The last one looks like a smoking gun and the diffs are quite localised so I will have a crack at patching them & report back.

nomadlogic commented 7 years ago

Are you still running into this issue @dch ? I've been able to watch video without issues using drm-next for quite a while now.

neelchauhan commented 7 years ago

On a HP EliteBook 9470m I use for purely 'personal' computing with the graphics/drm-next-kmod port, I do not have this issue. I do not run FreeBSD on the Inspiron I mentioned earlier (my Dell mostly runs Ubuntu now).

dch commented 10 months ago

coming back to this bug ~ 6 years later, it's nothing to do with drm-kmod, something to do with this specific NUC hardware. Note that under Linux the issue is addressed.