# Intel NUC NUC5CPYH - video/audio playback



## noisebloom (Nov 9, 2018)

Hey everyone,

I've been a long-time FreeBSD user, and have 11.2 running on my Intel NUC (NUC5CPYH). I've always run it headless, but decided to get a TV to plug it into.

I set up an X server running xfce4. I had no luck getting the intel or vesa drivers to work, but scfb worked fine (using UEFI boot).

Everything looks good, but I can't for the life of me get video (HTML5 in any of the web browsers, e.g. YouTube) or audio playback to work.

For the audio, I've tried modifying hw.snd_default_unit to point to the pcm I'm using (I've tried audio through HDMI _and _the headphone jacks on my NUC), but the best I can do is get some noise to output if I run "cat /dev/urandom > /dev/dsp*". mplayer complains that the audio device is "stuck".

As far as HTML5, I'm not aware I really need to install anything to enable it for Opera, Firefox, etc. The YouTube videos I play just have the spinning loading wheel going around in the center... Maybe because the audio won't load?

Has anyone tested this capabilities out for the NUC? Any ideas? I would be extremely grateful if someone could be of assistance that has run with a setup like this. I love the NUC for code development, but I get the feeling that I may need to get something else if I want to play media...

Thank you!


----------



## bosterman73 (Nov 10, 2018)

Hi.
I recently had the same issues with the sound.

For your comment, sending noise to /dev/dsp*, I understand that OSS works correctly in your NUC.
You can configure firefox and mplayer to use OSS as a sound system.
For firefox you can follow the steps of this thread:
https://forums.freebsd.org/threads/...-optiplex-455-intel-chipset.67966/post-405539
In the case of the MPlayer you can include in the configuration ($HOME/.mplayer/config) the search order of the audio systems. In my case it is:

```
ao=oss,alsa,press
```
I hope these steps can help you.

Regards.


----------



## bosterman73 (Nov 10, 2018)

In the case of video ... Have you installed the xf86-video-intel package in the NUC?

It's just curiosity.

Regards.


----------



## noisebloom (Nov 10, 2018)

bosterman73 said:


> In the case of video ... Have you installed the xf86-video-intel package in the NUC?
> 
> It's just curiosity.
> 
> Regards.



Yes, I have... 

I actually just found out that the Braswell chipset my NUC has is not supported by FreeBSD for graphics... 

Time for an upgrade, it sounds! Thanks for your help!


----------



## noisebloom (Nov 10, 2018)

bosterman73 said:


> Hi.
> I recently had the same issues with the sound.
> 
> For your comment, sending noise to /dev/dsp*, I understand that OSS works correctly in your NUC.
> ...



Same issues with no change... As I stated, I'm going to purchase a new NUC with a supported chipset and see where I get from there. 

Thanks!


----------



## k.jacker (Nov 10, 2018)

bosterman73 said:


> Have you installed the xf86-video-intel package...


That's not neccesary.
OP gota a Braswell CPU with unknown graphics hardware according to arc.intel.com. Most likely something Skylake like, since that was the most recent Core CPU generation at that time. Graphics hardware should be supported by drm-next-kmod port, sources must be fetched first and portstree updated.
To check if your CPU's pciid is in the sourcecode, you could run a little script I made some time ago for that reason.
https://forums.freebsd.org/threads/...or-intel-integrated-graphics-with-xorg.66732/
The script is in post #5, second codeblock. It doesn't change anything on your system, can be run rum home directory.
As a result it will also give you detailed steps on how to get the needed driver up and running.


----------



## noisebloom (Nov 11, 2018)

k.jacker said:


> That's not neccesary.
> OP gota a Braswell CPU with unknown graphics hardware according to arc.intel.com. Most likely something Skylake like, since that was the most recent Core CPU generation at that time. Graphics hardware should be supported by drm-next-kmod port, sources must be fetched first and portstree updated.
> To check if your CPU's pciid is in the sourcecode, you could run a little script I made some time ago for that reason.
> https://forums.freebsd.org/threads/...or-intel-integrated-graphics-with-xorg.66732/
> ...



Wow... I had heard of drm-next-kmod, but I didn't put two and two together. Your thread is excellent; it's nice to have a thorough and clear explanation!

Installing drm-next-kmod from ports worked. The driver kicked in and the screen resolution adjusted itself accordingly. YouTube does play now, but it's _extremely _slow... I'm getting a frame a minute or something. I'm thinking this chipset is just not powerful enough for video.

I have a core i5 (Kabylake) NUC that I just ordered, so I'm assuming I'll have much better luck!


----------



## yuripv (Nov 11, 2018)

FWIW, I have an older "nettop" system with IvyBridge (or even SandyBridge, can't check at the moment as it's wating for PSU replacement) with drm-devel-kmod (it was running -current), and it's able of playing 1080p videos just fine, so I doubt yours isn't enough powerful.


----------



## unitrunker (Nov 11, 2018)

k.jacker said:


> can be run rum home directory.


I always keep some rum in the home directory.


----------



## noisebloom (Nov 12, 2018)

yuripv said:


> FWIW, I have an older "nettop" system with IvyBridge (or even SandyBridge, can't check at the moment as it's wating for PSU replacement) with drm-devel-kmod (it was running -current), and it's able of playing 1080p videos just fine, so I doubt yours isn't enough powerful.



Hmm, if that's the case, I still have something wrong. I'll have to check out the logs...


----------



## k.jacker (Nov 12, 2018)

yuripv Neither SandyBridge or IvyBridge require any drm port, /boot/kernel/i915kms.ko works for everything up to Haswell generation.



noisebloom said:


> Hmm, if that's the case, I still have something wrong. I'll have to check out the logs...


Do you have powerd(8) enabled? Maybe you processor is stuck at it's lowest frequency. A Core processor, runs fullHD videos just fine at 800MHz, but those SoC like Braswell might not.
Check `sysctl dev.cpu.0.freq` while running a video. Frequency shouldn't be at it's lowest (800MHz i guess for your CPU).
Try playing a video from your machine as well, google will find some kind of trailer or the like, you could download to test.


----------



## noisebloom (Nov 13, 2018)

k.jacker said:


> yuripv Neither SandyBridge or IvyBridge require any drm port, /boot/kernel/i915kms.ko works for everything up to Haswell generation.
> 
> 
> Do you have powerd(8) enabled? Maybe you processor is stuck at it's lowest frequency. A Core processor, runs fullHD videos just fine at 800MHz, but those SoC like Braswell might not.
> ...



Frequency shows 1600.

Unfortunately, using MPlayer revealed that there is no xvideo support for this card. I may try messing around to see if there are alternatives I can use with this card...


----------



## yuripv (Nov 13, 2018)

k.jacker as it's going out real soon now (TM), I just switched to using the drm from ports so that there's no surprise.


----------



## noisebloom (Nov 16, 2018)

I just received a new Intel NUC with an i5 Kabylake processor. Literally popped my SSD from the old NUC, and the video and audio playback just work! 

Very cool that no package installs or additional configuration was needed. 

Thanks for all your help!


----------



## trev (Nov 17, 2018)

As FreeBSD supports it, can you provide the NUC model number for future interested users?


----------



## noisebloom (Nov 19, 2018)

trev said:


> As FreeBSD supports it, can you provide the NUC model number for future interested users?



Yup.
NUC7i5BNH looks to be supported with drm-next-kmod from ports.


----------



## noisebloom (Nov 26, 2018)

I am actually running into an interesting issue with the new NUC7i5BNH's audio over HDMI.

Upon a fresh boot, the audio works just fine. However, after about 30 min, something seems to "time out", and I can't get the audio to work unless I reboot.

I diffed /var/log/messages and saw the message "hdacc1: Unexpected unsolicited response with tag 63: ffffffff" 9 times. Not sure if that's related...


----------



## yuripv (Nov 26, 2018)

noisebloom Don't think so; I have NUC7i7BNB, and it works flawlessly despite having (sometimes) those messages in the log.

The only problem I have with HDMI sound is that it stops working after monitor suspend, but that's easily worked around using `devctl suspend hdacc1; devctl resume hdacc1`.


----------



## noisebloom (Nov 26, 2018)

yuripv said:


> noisebloom Don't think so; I have NUC7i7BNB, and it works flawlessly despite having (sometimes) those messages in the log.
> 
> The only problem I have with HDMI sound is that it stops working after monitor suspend, but that's easily worked around using `devctl suspend hdacc1; devctl resume hdacc1`.



It looks like this is exactly my problem, and those commands worked like a charm. I have an icon on my desktop that does this now, and I may have to have add this to my chromium launcher as well. 

Thanks!


----------



## yuripv (Nov 26, 2018)

I *think* this is related to the fact that the driver says I'm using DP, and not HDMI, so it doesn't properly (or at all) resume the sound device after monitor is turned back on -- are you seeing the same?

```
[   105.216] (II) modeset(0): Output DP-1 connected
[   105.216] (II) modeset(0): Output DP-2 disconnected
[   105.216] (II) modeset(0): Output HDMI-1 disconnected
```


----------

