Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Definitive Intel NUC How-to Guide (Surround Sound over HDMI, Apple Remote, Graphics), Part 2

thesabthesab Posts: 26Members, Plex Pass Plex Pass
edited April 2015 in Linux

April 2015 Update:

 

If you want to skip all of this (as there are updates to this methodology, feel free to use some automation:

 

 
Cheers!
 
-- Sab
 

 

As continued from my earlier post https://forums.plex.tv/topic/103833-definitive-intel-nuc-how-to-guide-surround-sound-over-hdmi-apple-remote-graphics/, this is an update so that you can use Ubuntu 14.04 with your Intel NUC, and get things sorted out.

 

About Me

As I mentioned earlier, I am and have been a Linux infrastructure engineer for some time now, and I thought I'd lend my skills towards getting some not-so-simple things sorted out with Plex, Linux, and the NUC. I wrote these guides because there really wasn't a great resource for them online, and there are a lot of "I think this should work..." or "I've heard that it doesn't support..." style rumors floating around, hence why I consider this guide to be definitive. While it doesn't 100% fix the underlying issues (which I'm still looking into in my spare time), it does get everything sorted so you can enjoy the most out of your tiny PC and home theater.

 

The Operating System

Much debate goes into which system would work best, including things such as OpenELEC, OS X, or even that one from Redmond. This guide is for people who, after much debate, have decided that they want to run Ubuntu on their NUC (for example, if they wanted to run Steam and play some games as well, which still works best with Ubuntu, even better than Linux Mint in terms of performance).

 

For this guide, I've chosen Xubuntu, as I wanted something which had all the features of Ubuntu (and the package repositories), but without a lot of cruft and extra nonsense. This all being said, let's jump into how to go from zero to Plex!

 

Make a Bootable USB Key

Unlike previous versions of the Linux kernel included with 13.x, there are no known USB 3.0 bugs here, so feel free to use a USB 3 thumb drive, should you have one.

 

Acquire the ISO from your preferred mirror, or torrents, and then do this:

# Linux users:
sudo dd if=xubuntu-14.04-desktop-amd64.iso of=/dev/sdb bs=1M

# Mac OS X users:
sudo dd if=xubuntu-14.04-desktop-amd64.iso of=/dev/rdisk1 bs=1m

You'll need to be in the current directory where the ISO resides.

Note: either "sdb" or "rdisk1" may be different depending on your computer's number of hard disks, or mounted disk images.

Note: On Mac OS X, use a lowercase '1m' for the block size parameter, as the 'dd' binary is BSD-derived. If using Homebrew, use 'gdd', and specify '1M'.

Note: On Mac OS X, use 'rdisk' in lieu of 'disk', as it's synchronous, and will write data in a more intelligent manner for USB keys.

 

Configure the UEFI BIOS

You'll need to ensure WOL is disabled, else your NUC will turn itself on after you have turned it off, which is a bit odd.

 

Configure the Operating System

Go ahead and install Xubuntu (or Ubuntu), and once it's up-and-running, make these modifications:

 

Repositories, Certificates, Packages, Oh my!

# You'll need to hit 'enter' after each to accept the GPG keys:
sudo su -
add-apt-repository ppa:pulse-eight/libcec
add-apt-repository ppa:plexapp/plexht

# Get the Intel Graphics Drivers keys:
wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg -O - | apt-key add -
wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-2 -O - | apt-key add -

# Get the Intel repo:
echo "deb https://download.01.org/gfx/ubuntu/14.04/main trusty main #Intel Graphics drivers" > /etc/apt/sources.list.d/intellinuxgraphics.list


# Update the system:
apt-get update && apt-get dist-upgrade

# Install our needed packages:
apt-get install i965-va-driver intel-gpu-tools libva-drm1 libva-egl1 libva-intel-vaapi-driver libva-tpi1 libva-wayland1 vainfo plexhometheater

Optimize Solid State Drive Performance

By default, Ubuntu does not add the 'discard' parameter to the mount options, which disallows use of TRIM commands:

sudo su -
cp /etc/fstab{,.save}
sed -i 's/errors=remount-ro/errors=remount-ro,discard/g' /etc/fstab

Fix Plex Audio Support for Surround Sound

We'll want to use the built-in audio engine, rather than farm it out to Pulse, as it doesn't pass things through appropriately:

sudo su -
apt-get remove pulseaudio

July 2014 Update: Thanks to @Aisknab for pointing out that we can safely just remove pulseaudio, and thereby getting audio to work properly.

 

Phase Two: Getting the Apple Remote Working

(This section copied from the original guide, as it sill works)

 

Note: This section uses the ir-keytable method, which maps keypresses on the remote to those of a keyboard.

 

I didn't have another remote, nor did I want one with 50 billion buttons, but I did have an newish Apple remote. This will work with the silver, metal Apple remote (possibly with the older one, you might have to test it).

 

Requisite Packages

sudo su -
apt-get install ir-keytable lirc

When you install LIRC, you'll be asked for what remote you have. Just pick anything, we'll be overwriting the configuration file anyway. We'll be using ir-keytable, which effectively maps IR key presses to keyboard presses. This way, you won't have to futz around with trying to get all of LIRC working, which is a nightmare and a half.

 

Configure and Disable LIRC

sudo su -
echo 'include "/usr/share/lirc/remotes/devinput/lircd.conf.devinput"' > /etc/lirc/lircd.conf
cat << EOF > /etc/lirc/hardware.conf
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/lirc0"
REMOTE_SOCKET="/var/run/lirc/lircd"
REMOTE_LIRCD_CONF="/etc/lircd/lircd.conf"
REMOTE_LIRCD_ARGS=""
START_LIRCD="true"
LOAD_MODULES="true"
LIRCMD_CONF=""
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
EOF
rm /etc/rc*/*lirc*

This will remove LIRC from startup, as we'll be replacing it with our own thing in a second. Now, let's configure the key table.

 

Configure IR-Keytable

sudo su -
cat << EOF > /etc/rc_keymaps/apple_remote_sab
==> apple_remote_sab <==
# Apple Remote by Sab
0x77e1d0e4 KEY_UP
0x77e1b0e4 KEY_DOWN
0x77e110e4 KEY_LEFT
0x77e1e0e4 KEY_RIGHT
0x77e1bae4 KEY_ENTER
0x77e140e4 KEY_ESC
0x77e17ae4 KEY_SPACE
EOF

This has all the key bindings for the 7 keys of the remote to emulate a keyboard for use with Plex.

 

Add a darn init script for this nonsense

sudo su -
cat << EOF > /etc/init.d/make-ir-freaking-work
#!/usr/bin/env bash
echo 'Modprobing...'
modprobe -r nuvoton_cir
sleep 1
echo 'Echoing...'
echo "auto" > /sys/bus/acpi/devices/NTN0530\:00/physical_node/resources
sleep 1
echo 'Modprobing...'
modprobe nuvoton-cir
sleep 1
echo 'Clearing the old keytable...'
ir-keytable -c
sleep 1
echo 'Injecting the new keytable...'
ir-keytable -p NEC,RC6 -w /etc/rc_keymaps/apple_remote_sab
echo 'Done.'
EOF

# Symlinks to start at boot (run level 2 only):
chmod +x /etc/init.d/make-ir-freaking-work
ln -s /etc/init.d/make-ir-freaking-work /etc/rc2.d/S20make-ir-freaking-work

So, what's going on here? Well, for whatever reason, the OS doesn't quite realize it has an IR receiver. So, if you were to attempt to start LIRC without first modprobing with the correct driver, it would fail to create the appropriate UNIX socket as it fails to initialize properly. This makes sure we have the necessary bits running after we start-up. Also, we'll be able to start lircd from ir-keytable itself, so we don't need it starting first, failing, and then this not working.

 

Start Plex at Boot

Hopefully you've configured auto-login properly. If not, check out the user management settings, and get whatever user you're using with Plex to login without a password. Then, configure Plex to start after that:

 

Add Autostart Parameter

mkdir -p ~/.config/autostart/
cat << EOF > ~/.config/autostart/plex.desktop
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Plex Home Theater
Comment=Starts Plex Home Theater automatically
Exec=plexhometheater.sh
StartupNotify=false
Terminal=false
Hidden=false
EOF

Setting the Settings

Once things are all set up and installed, you may or may not have surround sound working. The reason is the output device isn't set up properly for the system, or for Plex.

 

To fix this, run `pavucontrol`, and select the 'Configuration' tab. There, select the "Built-in Audio Profile" drop-down. On mine, there are 4 entries. Select "Digital Stereo (HDMI) Output (unplugged)", then "Digital Stereo (HDMI) Output". This resets the output to use the HDMI properly.

 

Then in Plex, go into Preferences, System, Audio output, and select something like "HDA Intel, MEI SOMETHING on HDMI" for both the Audio output device and the Passthrough output device, where "something" is a name for your TV or receiver (in my case, it says Panasonic).

 

If your receiver supports it, also set DTS-HD Master audio and TrueHD capable checkboxes here.

 

Differences from the Old Guide

If you've read the previous guide, then you know there's a few things left out of this one. One of the big issues was networking. In Ubuntu 14, Network Manager actually starts up and acquires an IP quickly, which means we don't have to fuss with the network settings. There's also a few packages which we don't need anymore, and we can install the Intel drivers without using their horrid installer.

 

Questions, Comments, or Concerns?

Let me know, and I'll do my best to get back to you.

 

Happy computing!

 

-Sab

 

Optional Permanent VSYNC

In case you want to enable vertical sync permanently, which might help if you're experiencing issues with page tearing or flickering, you can create this file and then reboot your computer:

mkdir -p /etc/X11/xorg.conf.d
cat << EOF > /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
Identifier "Intel Graphics"
Option "SwapbuffersWait" "true"
Option "AccelMethod" "sna"
Option "TearFree" "true"
EndSection
EOF
«13

Comments

  • tonalitytonality Posts: 2Members

    Hi Sab,

    REALLY great writeup, and very helpful, got almost everything working now but I am wondering if you have any more detail on some of the video options, as I am indeed still getting flickering and freezing on some of my heavier movie files.

    Just as a minor note, in your last VSYNC script, you are attempting to write your lines to a directory, so i think you may have left out the line where you name the script :)

    Again, thank you so much for all this info/work, i am just now digging into my new NUC and i'm pretty sure you've saved me at least a week's worth of foul language and headache!

  • thesabthesab Posts: 26Members, Plex Pass Plex Pass
    tonality wrote on June 1 2014, 3:04 AM: »

    Hi Sab,

    REALLY great writeup, and very helpful, got almost everything working now but I am wondering if you have any more detail on some of the video options, as I am indeed still getting flickering and freezing on some of my heavier movie files.

    Just as a minor note, in your last VSYNC script, you are attempting to write your lines to a directory, so i think you may have left out the line where you name the script :)

    Again, thank you so much for all this info/work, i am just now digging into my new NUC and i'm pretty sure you've saved me at least a week's worth of foul language and headache!

    Whoops! Fixed :) But I'm glad I was able to help!

    What sort of issues are you having with video playback? I've played a 60 GB MKV (H.264/DTS-HD) just fine. The only thing which might cause some stuttering which I can think of would be VSYNC settings, or networking issues (like trying to retrieve the file over 802.11b ;)). Of course, it might be Plex server related as well, if you're attempting to transcode a file which need not be transcoded, but the HT client should properly request the correct codecs... :\

    Post some info on the file (bitrate, codec, container, etc), and/or give it a try locally with VLC or mplayer, and see if you still have playback issues. That way we can eliminate a few options.

    sudo apt-get install ubuntu-restricted-extras vlc mplayer
    mplayer /path/to/your/file.mkv
  • tonalitytonality Posts: 2Members

    Hey Sab;

    Turns out your initial assumption was correct; I was originally seeing a couple of flickers in the UI but then could not get my TrueHD copy of 5th Element to load past the splash screen...turned out it was trying to pull it from the NAS via a wireless pipe, which doesn't do well despite being 802.11ac.   I am still on the fence as to whether to keep my Mac Mini as the Media Server or to just let the NUC handle double duty and migrate the collection over.

    At any rate, after a fresh install and a few other (unrelated) tweaks, I re-did your walkthrough above and moved that MKV to a more accessible spot, and it worked like a champ, so again, THANK YOU!

    Oh, on a side note, which Apple remote are you using that you were able to get working in LIRC? I have a very old one (looks like an old Nano, just the wheel and a Menu button) that i thought might work with your config but doesn't seem to want to pick up.  Wanted to see if we had the same one before i started delving into the logs to see why it didn't like it, but it's not critical since i'm about to opt for a Harmony anyway.

    Thanks again!

  • thesabthesab Posts: 26Members, Plex Pass Plex Pass
    edited June 2014
    tonality wrote on June 3 2014, 1:02 AM: »

    Hey Sab;

    Turns out your initial assumption was correct; I was originally seeing a couple of flickers in the UI but then could not get my TrueHD copy of 5th Element to load past the splash screen...turned out it was trying to pull it from the NAS via a wireless pipe, which doesn't do well despite being 802.11ac.   I am still on the fence as to whether to keep my Mac Mini as the Media Server or to just let the NUC handle double duty and migrate the collection over.

    At any rate, after a fresh install and a few other (unrelated) tweaks, I re-did your walkthrough above and moved that MKV to a more accessible spot, and it worked like a champ, so again, THANK YOU!

    Oh, on a side note, which Apple remote are you using that you were able to get working in LIRC? I have a very old one (looks like an old Nano, just the wheel and a Menu button) that i thought might work with your config but doesn't seem to want to pick up.  Wanted to see if we had the same one before i started delving into the logs to see why it didn't like it, but it's not critical since i'm about to opt for a Harmony anyway.

    Thanks again!

    Glad to hear things worked out! :D As for your first issue: 802.11ac is capable of serving up more than enough bandwidth for TrueHD/DTS-HD 1080p video, provided the network topology is sound. For instance, the current generation of Mac Mini (http://www.apple.com/mac-mini/specs.html) doesn't support 802.11ac, limiting you to 802.11n. If you don't have your router set up to use the 5 GHz spectrum, then you're losing out on a lot of bandwidth. And if you are, it might not be on a separate SSID. If it's the same SSID, OS X might select the 2.4 GHz channel as it has a better signal-to-noise ratio. Even still, 802.11n @ 5Ghz is limited to 300 Mb/s, which in reality turns out to be about 40-60 Mb/s (or about 5-7 MB/s). Running some math I'm not 100% sure of on a movie I have stored reveals that you need a  minimum of only 1964531 bytes per second to stream up a 1080p/DTS-HD file (or roughly 14 Mb/s). Assuming you're not in a crazy degraded WiFi zone, you should be able to do this over a relativistically low-overhead encapsulation protocol (such as NFS).

    If you're pulling the device from a NAS over WiFi, and then also serving it to the NUC via WiFi, and it's a NAS which doesn't support low-overhead encapsulation (or does so poorly, some Iomega NAS devices were limited to around 10-15 MB/s over SMB/CIFS or AFP, despite being gigabit), then it's not going to run well. Try running `iftop` during a file copy procedure and monitoring the bandwidth you have available.

    On another note, if it's a newer NUC (2-core HT i5), I'd just put Plex MS on that with Plex HT, as even the newer Mac mini's are a bit outdated, and the NUC has CPU to spare. Note on that though, if you have the thumbnail image thingy checked (where it makes thumbnails for ever 5 or so seconds of movie for quick scrolling), it will use a large amount of space to store that in its DB. I have so far 1104 video files (of which 229 are feature-length movies, most are 45 or 20-minute TV shows), and the DB takes up around 24 GB.

    As for your super-easy remote question: I'm using the newer all-aluminum version of the Apple Remote. If you'd like to create your own codes for use in the keytable, you can run this handy-dandy command and get it working A-OK. Below is a sample of button presses:

    sab@nuc ~ $ sudo ir-keytable -t
    Testing events. Please, press CTRL-C to abort.
    1402096817.539144: event type EV_MSC(0x04): scancode = 0x77e140e4
    1402096817.539144: event type EV_KEY(0x01) key_down: KEY_ESC(0x0001)
    1402096817.539144: event type EV_SYN(0x00).
    1402096817.789112: event type EV_KEY(0x01) key_up: KEY_ESC(0x0001)
    1402096817.789112: event type EV_SYN(0x00).
    1402096818.078515: event type EV_MSC(0x04): scancode = 0x77e140e4
    1402096818.078515: event type EV_KEY(0x01) key_down: KEY_ESC(0x0001)
    1402096818.078515: event type EV_SYN(0x00).
    1402096818.329140: event type EV_KEY(0x01) key_up: KEY_ESC(0x0001)
    1402096818.329140: event type EV_SYN(0x00).
    1402096818.465317: event type EV_MSC(0x04): scancode = 0x77e140e4
    1402096818.465317: event type EV_KEY(0x01) key_down: KEY_ESC(0x0001)
    1402096818.465317: event type EV_SYN(0x00).
    1402096818.717090: event type EV_KEY(0x01) key_up: KEY_ESC(0x0001)
    1402096818.717090: event type EV_SYN(0x00).
    1402096819.286630: event type EV_MSC(0x04): scancode = 0x77e1b0e4
    1402096819.286630: event type EV_KEY(0x01) key_down: KEY_DOWN(0x0001)
    1402096819.286630: event type EV_SYN(0x00).
    1402096819.286679: event type EV_MSC(0x04): scancode = 0x77e1b0e4
    1402096819.286679: event type EV_SYN(0x00).
    1402096819.286691: event type EV_MSC(0x04): scancode = 0x77e1b0e4
    1402096819.286691: event type EV_SYN(0x00).
    1402096819.537072: event type EV_KEY(0x01) key_up: KEY_DOWN(0x0001)
    1402096819.537072: event type EV_SYN(0x00).
    1402096820.094883: event type EV_MSC(0x04): scancode = 0x77e1d0e4
    1402096820.094883: event type EV_KEY(0x01) key_down: KEY_UP(0x0001)
    1402096820.094883: event type EV_SYN(0x00).
    

    Now, the "EV_KEY" sections are because these are already mapped as defined in /etc/rc_keymaps/apple_remote_sab on my machine. The "scancode" section, however, shows you what you need to place in your own keytable for each key press. Create a file like /etc/rc_keymaps/apple_remote_tonalitys_old_white_icky_nano_remote ;) similar to this:

    ==> apple_remote_tonalitys_old_white_icky_nano_remote <==
    # Apple Remote by Tonality
    0x77e1d0e4 KEY_UP
    0x77e1b0e4 KEY_DOWN
    0x77e110e4 KEY_LEFT
    0x77e1e0e4 KEY_RIGHT
    0x77e1bae4 KEY_ENTER
    0x77e140e4 KEY_ESC
    

    But replace the scan codes with ones you get from running `ir-keytable -t`. The old Apple remote has 1 button less, so you probably won't want to put a pause button in there, or swap enter for space, whichever you prefer :).

    Should you get a fancy Harmony remote, you'll need to run this, or find someone else's keymap for it. I'm not 100% certain if the default LIRC configuration will "just work". I chose to bypass the LIRC usage in favor of ir-keytable, meaning my IR remote just mimics a keyboard, rather than sending unique button presses. Whether or not that will "just work" with Plex is yet to be known... Either way, best of luck! :D

    As always, Happy computing!

  • hudhouse_plexhudhouse_plex Posts: 2Members, Plex Pass Plex Pass

    Hi Sab -

    Great thanks for both posts they provide insight that is only learned by many housr of trail and error ;-)

    Would you mind adding a little bit mor info by providing the hardware in your NUC rig. I want to bye one just not sure exactly which one to getor where, so any info on aquiringi a NUC rig would be greatly appreciated.

    tia,

    hud

  • thesabthesab Posts: 26Members, Plex Pass Plex Pass
    hudhouse_plex wrote on June 8 2014, 8:32 PM: »

    Hi Sab -

    Great thanks for both posts they provide insight that is only learned by many housr of trail and error ;-)

    Would you mind adding a little bit mor info by providing the hardware in your NUC rig. I want to bye one just not sure exactly which one to getor where, so any info on aquiringi a NUC rig would be greatly appreciated.

    tia,

    hud

    See this helpful link: http://bit.ly/SHNiEs ;)

  • hudhouse_plexhudhouse_plex Posts: 2Members, Plex Pass Plex Pass
    thesab wrote on June 9 2014, 2:03 AM: »

    See this helpful link: http://bit.ly/SHNiEs ;)

    hahahaha - ok, got it thanks! I just am checking because I got a zbox id41 with an ion2 a couple years back the darn thing never worked right with as a htpc.

  • peteracworthpeteracworth Posts: 1Members
    edited June 2014

    Thanks so much! I followed the instructions down to phase 2, because surround sound was my only pain point.  Unfortunately, there was no change and the issue persists and it is the same as at raw install time :(

    Essentially, sound sometimes works and sometimes does not. It usually works through applications such as VLC or SMPlayer which have a 5.1 sound source.  When I start these applications I see my Pioneer receiver go to PCM mode and I can hear audio.

    But stereo sources (Pithos, browsers, or system sounds) do not produce any sounds. The receiver stays in "Stereo" and no sound is produced, despite seeing levels in Pulse Audio Volume Control.  Occasionally I can fool my receiver into going into PCM mode by launching a 5.1 source and then launching my stereo sound source and I will then hear the stereo source until such time as I attempt to restart it (at which point I will lose it).

    Any idea what can be going on?  Its some poor negotiation with the receiver presumably.

  • thesabthesab Posts: 26Members, Plex Pass Plex Pass
    peteracworth wrote on June 12 2014, 3:24 AM: »

    Thanks so much! I followed the instructions down to phase 2, because surround sound was my only pain point.  Unfortunately, there was no change and the issue persists and it is the same as at raw install time :(

    Essentially, sound sometimes works and sometimes does not. It usually works through applications such as VLC or SMPlayer which have a 5.1 sound source.  When I start these applications I see my Pioneer receiver go to PCM mode and I can hear audio.

    But stereo sources (Pithos, browsers, or system sounds) do not produce any sounds. The receiver stays in "Stereo" and no sound is produced, despite seeing levels in Pulse Audio Volume Control.  Occasionally I can fool my receiver into going into PCM mode by launching a 5.1 source and then launching my stereo sound source and I will then hear the stereo source until such time as I attempt to restart it (at which point I will lose it).

    Any idea what can be going on?  Its some poor negotiation with the receiver presumably.

    If VLC is working for you, it means that it's capable of connecting or bypassing the sound server and communicating directly to the receiver. Do us a favor and post your guisettings.xml audiooutput section (located at ~/.plexht/userdata/guisettings.xml). Mine looks like this:

        <audiooutput>
            <ac3passthrough>true</ac3passthrough>
            <audiodevice>ALSA:hdmi:CARD=HDMI,DEV=0</audiodevice>
            <channels>8</channels>
            <defaultdelay>0</defaultdelay>
            <dtshdpassthrough>true</dtshdpassthrough>
            <dtspassthrough>true</dtspassthrough>
            <guisoundmode>2</guisoundmode>
            <mode>2</mode>
            <multichannellpcm>true</multichannellpcm>
            <normalizelevels>true</normalizelevels>
            <passthroughaac>true</passthroughaac>
            <passthroughdevice>ALSA:hdmi:CARD=HDMI,DEV=0</passthroughdevice>
            <stereoupmix>false</stereoupmix>
            <truehdpassthrough>true</truehdpassthrough>
        </audiooutput>
    

    Make sure your plexhometheater.sh script has AE_ENGINE=SOFT uncommented. Then, select the 5.1 output in pavucontrol, then back to digital stereo. Follow my instructions from here (https://forums.plex.tv/topic/103833-definitive-intel-nuc-how-to-guide-surround-sound-over-hdmi-apple-remote-graphics/page-2#entry662420), and let me know if that works.

    Happy computing!

  • nkxdnmxj773nkxdnmxj773 Posts: 9Members
    edited June 2014

    new7.jpg  here  bump...

  • markenbarbaramarkenbarbara Posts: 1Members, Plex Pass

    Hello,

    I followed your tutorial and it works like a charm! But i have a small problem.. when i switch the source of my signal (for ex. from HDMI1-Intel NUC to HDMI2-PS3) i loose my signal with the NUC and i don´t have any screen anymore. I have read that you should update the bios to version 50. But i already did that.. Just to be clear, i am using Xubuntu. Any ideas?

  • BobatronBobatron Posts: 10Members, Plex Pass Plex Pass
    markenbarbara wrote on June 19 2014, 6:27 PM: »

    Hello,

    I followed your tutorial and it works like a charm! But i have a small problem.. when i switch the source of my signal (for ex. from HDMI1-Intel NUC to HDMI2-PS3) i loose my signal with the NUC and i don´t have any screen anymore. I have read that you should update the bios to version 50. But i already did that.. Just to be clear, i am using Xubuntu. Any ideas?

    In the original NUC guide for 13.10 we discussed this issue. I haven't seen any resolution yet other than telling the NUC to never sleep the display. I did this and changed some of the HDMI CEC settings on my TV so it doesn't issue any power down commands and things have all been working well. 

    https://forums.plex.tv/topic/103833-definitive-intel-nuc-how-to-guide-surround-sound-over-hdmi-apple-remote-graphics/?p=635808

  • thesabthesab Posts: 26Members, Plex Pass Plex Pass
    markenbarbara wrote on June 19 2014, 6:27 PM: »

    Hello,

    I followed your tutorial and it works like a charm! But i have a small problem.. when i switch the source of my signal (for ex. from HDMI1-Intel NUC to HDMI2-PS3) i loose my signal with the NUC and i don´t have any screen anymore. I have read that you should update the bios to version 50. But i already did that.. Just to be clear, i am using Xubuntu. Any ideas?

    and...

    Bobatron wrote on June 24 2014, 12:43 PM: »

    In the original NUC guide for 13.10 we discussed this issue. I haven't seen any resolution yet other than telling the NUC to never sleep the display. I did this and changed some of the HDMI CEC settings on my TV so it doesn't issue any power down commands and things have all been working well. 

    https://forums.plex.tv/topic/103833-definitive-intel-nuc-how-to-guide-surround-sound-over-hdmi-apple-remote-graphics/?p=635808

    So that I understand you... If you switch your receiver from the NUC to the PS3 you lose the signal with the NUC. Is that not the purpose of a receiver? Or are you saying that once you switch away and then back to the NUC, the screen is blank? In that case, I'm fairly certain Mr. Bobatron's comment would come into play. Best of luck!

  • robertjnixon@gmail.comrobertjnixon@gmail.com Posts: 3Members, Plex Pass Plex Pass
    edited July 2014
    markenbarbara wrote on June 19 2014, 6:27 PM: »

    Hello,

    I followed your tutorial and it works like a charm! But i have a small problem.. when i switch the source of my signal (for ex. from HDMI1-Intel NUC to HDMI2-PS3) i loose my signal with the NUC and i don´t have any screen anymore. I have read that you should update the bios to version 50. But i already did that.. Just to be clear, i am using Xubuntu. Any ideas?

    I was also having this issue. It is caused by a bug in Xfce4-settings https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-331/+bug/1308105 . To fix the issue just kill the xfsettingsd process before you switch input i.e. killall xfsettingsd . I also made the xfsettingsd process non-executable so it couldn't be run at startup.
  • ShunnerShunner Posts: 3Members, Plex Pass Plex Pass

    I followed this guide and it works great! However, since I also want to run steam and games (going to use it for home-streaming) I want to keep PulseAudio installed and running.

    I updated the launch script slightly with the following changes:

    • Sets AE_ENGINE=soft (to disable pulse audio usage)
    • Suspend the sink used for playback (forcing PulseAudio to release the device)

    plexhometheater.sh

    #!/bin/sh
    export XBMC_HOME=/opt/plexhometheater/share/XBMC
    #Use export AE_ENGINE=SOFT to disable pulse audio
    export AE_ENGINE=SOFT
    pactl suspend-sink 0 1
    /opt/plexhometheater/bin/plexhometheater
    pactl suspend-sink 0 0

    These changes unlocks the device for audio passthrough (don't forget to change the audio output settings to map to the correct ALSA output). The syntax to toggle the sink is:

    pactl suspend-sink <sink> 1/0 (1 = suspend, 0 = resume)

    You can determine which sink you should suspend through pacmd list-sinks.

  • ShunnerShunner Posts: 3Members, Plex Pass Plex Pass

    A slightly modified approach to the IR setup...

    First, I moved the module dance into a modprobe-script:

    /etc/modprobe.d/nuvoton_cir.conf

    install nuvoton_cir /sbin/modprobe -i nuvoton_cir ; sleep 1 ; /sbin/modprobe -r -i nuvoton_cir ; echo "auto" > "/sys/bus/acpi/devices/NTN0530:00/physical_node/resources" ; sleep 1 ; /sbin/modprobe -i nuvoton_cir

    Which reduces the actual ir-keytable setup to this:

    /etc/init.d/ir-keytable

    #!/bin/sh
    sleep 1 # needed to let the driver get ready...
    ir-keytable -c -p NEC,RC-6 -w /etc/rc_keymaps/apple_remote
    

    And then finally activate the script by running the following as root:

    chmod +x /etc/init.d/ir-keytable
    update-rc.d ir-keytable start 20 2 .
    

    When the ACPI issues are resolved (there's a beta BIOS which I haven't tested: https://communities.intel.com/thread/46259?start=0&tstart=0 that seems to correct the problem) the modprobe script can be removed.

  • ShunnerShunner Posts: 3Members, Plex Pass Plex Pass
    edited July 2014

    I've refined the IR setup further, there's no longer any need for LIRC or custom scripts during startup.

    1. Don't install LIRC, or uninstall it if you already have it installed and is not using it for anything else: (Be aware that by default LIRC resets the ir-keyboard protocol)
      sudo apt-get remove lirc
      

      We only need ir-keytable since LIRC support is these days part of the kernel itself.

    2. Create and save your keymap in /etc/rc_keymaps/apple_remote: (Keycodes below are just samples and will not match your remote, see below for a guide to generating a file for your own device)
      # table apple_remote, type: NEC,RC-6
      0x77e1c040 KEY_ESC
      0x77e13a40 KEY_ENTER
      0x77e16040 KEY_RIGHT
      0x77e19040 KEY_LEFT
      0x77e15040 KEY_UP
      0x77e13040 KEY_DOWN
      0x77e1fa40 KEY_PLAYPAUSE
      

      NOTE: The first comment is actually used by ir-keytable to set the protocol, so make sure you keep it intact.
       

    3. Add the following line as the first entry in /etc/rc_maps.cfg: (NOTE: I've called my keymap apple_remote and it must match what you called your keymap in the previous step.)
      *       *                        apple_remote

    To simplify generating the apple remote keymap, I've written a small fiddle here: http://jsfiddle.net/shunner78/Xn653/embedded/result/

    Simply capture a keycode from your apple remote using:

    sudo ir-keytable -p NEC -t
    

    Insert it into the form, press enter and it will output a properly formatted keymap for your unique remote.

  • MacsureMacsure Posts: 5Members

    Hi Sab,

    Thankyou so much for this guide. Just what I need as I am brand new to Linux. So your instructions  were perfectly clear for me and all is well.

    I have 2 questions maybe you can help me with

    System Specs : NUC2820, Saming SSD 120 Gb,  Ram 4 GB, OS is xubuntu-14.04    I run  PMS and PHT  on it that all.

    Question 1.  Sometimes, as in 80% of the time  I get  flickers on my screen when I scrolling through  looking for a move to watch. I was wondering if there is something I can do to fix this.

    I entered your code as per your instruction, No joy. :(

    Question 2 : I have movies on a NAS, when I used  win 7  it mounted automatically  I made it my  " Z" drive and PMS found it so I could set it up... blah blah

    But on xubuntu-14.04 when I go to PMS it only  show on the folders on me C; drive.

    Can show me/ teach how I can  auto mont/ permantley mount my NAS on  Start up please.

    I have google and uTube, but I dont undertand the lingo yet, Still learning I guess,

    Once again thank  for yout TUT, as least I got this far :)

  • vdimitrovvdimitrov Posts: 56Members ✭✭

    Hi Sab,

     

    Thank you for the guide. I've ran into issues with my external USB (C-Media 106 Like) card, which I connected from the NUC's USB port to my receiver's optical in. It is an old receiver without HDMI in and the TV does not pass-through DTS and AC3.

     

    The result was some clicking sounds, when navigating in Plex or watching files with analog audio. Pass-through worked well and I am using ALSA. The PA sink is disabled as above post.

    I spent hours trying to fix this and finally the fix for me was creating ~./asoundrc custom ALSA profile:

     

    pcm.!spdif {
      type plug
      slave {
        pcm "iec958:CARD=Device,DEV=0"
        rate 48000
        format S16_LE
        channels 2
      }
    }

     

    I set Plex to use the new spdif device for both audio and passthrough and all works well. No broken record noise, no issues. Please, note that spdif is 2 channels only, pass-through is 5.1.

    Also, for some reason I had  to change Audio Output (on top) to HDMI, which seems to enabled the Multichannel PCM. Without this last setting, some channels like CNN, CNet would crash the PHT and I could not figure out why.

     

    The only issue I have to figure out now is why when PHT starts automatically (my PMS also loads automatically at reboot on the same NUC) and enter the channel directory shows 0 channels. I can still see the channels from the main menu on the right side and can launch them, but not if I enter Channels. If I close the PHT and reopen it I see a full listings of channels. I am using Night skin, but I believe with the standard skin as well. Not sure if it is timing or something else. Maybe I should put some delay on the PHT start.

     

    Thanks again.

  • andyblac1974andyblac1974 Posts: 1,062Members, Plex Pass, Plex Ninja Plex Ninja
    edited August 2014

    can anyone confirm full HD audio (DTS-HD / TrueHD) is working for the Intel NUC D54250WYK, just i am currently using i7 Mac Mini and i am tempted to replace with one of these.

    Server: Synology RS3617XS / RX1217 [INTEL Xeon E3-1230 v2, 32Gb RAM]
    Storage: 104Tb RAID6 (75.9Tb usable)
    Clients: Kodi Plex Add-on (Odroid's C2), LG Plex App. PMP (Mac). iPhone. iPad. Android TV. Web.

    PlexDVRAPI Enigma2 Plugin: Support / Setup Guide / Source files
«13
Sign In or Register to comment.