Archive:Install Kodi on an Intel NUC: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
Line 10: Line 10:


I recommend a haswell based design, since it is superior to the older models in many respects (IRDA built in).
I recommend a haswell based design, since it is superior to the older models in many respects (IRDA built in).
I would assume, that XBMC has an appetite for the i5 board, but I have read that the i3 is way sufficient for the day2day use.
I would assume, that KODI has an appetite for the i5 board, but I have read that the i3 is way sufficient for the day2day use.
Don't (!) save too much money - you want the i5 - think about the Aeon MQ5 skin ;_)
Don't (!) save too much money - you want the i5 - think about the Aeon MQ5 skin ;_)


Line 17: Line 17:
'''ATTN: make sure to always update to the latest BIOS prior to any installation attempt, otherwise you might run into issues during the setup process (missing boot devices, etc.)'''
'''ATTN: make sure to always update to the latest BIOS prior to any installation attempt, otherwise you might run into issues during the setup process (missing boot devices, etc.)'''


==XBMC Distributions==
Distributions==
Before you continue with the native installation method, that I describe later, you should consider either of the pre-built XBMC distributions, that already work out of the box on the NUC platform.
Before you continue with the native installation method, that I describe later, you should consider either of the pre-built KODI distributions, that already work out of the box on the NUC platform.
If you want to go down that road, please refer to the respective sections:
If you want to go down that road, please refer to the respective sections:
[[File:XBMCbuntu.png|60x60px|link=XBMCbuntu]][[XBMCbuntu]]
[[File:KODIbuntu.png|60x60px|link=KODIbuntu]][[KODIbuntu]]
[[File:OpenELEC.png|60x60px|link=OpenELEC]][[OpenELEC]]
[[File:OpenELEC.png|60x60px|link=OpenELEC]][[OpenELEC]]


I myself have started with [[XBMCbuntu]] (KodiBunut).
I myself have started with [[KODIbuntu]] (KodiBunut).
The problem is, that the current download image for USB installation is not capable to EFI boot.
The problem is, that the current download image for USB installation is not capable to EFI boot.
Therefor it is not possible (!) to install XBMCbuntu with propper initial EFI bios support.
Therefor it is not possible (!) to install KODIbuntu with propper initial EFI bios support.
There are ways to enable EFI boot later, but that is a tricky thing to do.
There are ways to enable EFI boot later, but that is a tricky thing to do.
If you wish to go down that road, there is already a very good [[HOW-TO:Install KodiBuntu from a USB drive]]
If you wish to go down that road, there is already a very good [[HOW-TO:Install KodiBuntu from a USB drive]]


==Native Ubuntu & XBMC (XBMCbuntu do it yourself)==
==Native Ubuntu & KODI (KODIbuntu do it yourself)==
Re-build XBMCbuntu from a default Ubuntu image to be able to have
Re-build KODIbuntu from a default Ubuntu image to be able to have
* full EFI-Bios support
* full EFI-Bios support
* effective AutoStart {xsessions)
* effective AutoStart {xsessions)
* DTSHD/TrueHD support
* DTSHD/TrueHD support
Mind you, that AutoStart & HDAudio works already with the original XBMCbuntu image.
Mind you, that AutoStart & HDAudio works already with the original KODIbuntu image.


Many credits of this tutorial go to the authors of the various resources around the internet, that cover almost all the aspects, that I concentrate here.
Many credits of this tutorial go to the authors of the various resources around the internet, that cover almost all the aspects, that I concentrate here.
Line 43: Line 43:
Initially you want to install a current Desktop Version of Ubuntu (http://www.ubuntu.com/download/desktop).
Initially you want to install a current Desktop Version of Ubuntu (http://www.ubuntu.com/download/desktop).
The advantage of the Desktop Version is, that X11 gets already configured for you.
The advantage of the Desktop Version is, that X11 gets already configured for you.
With XBMC you are *NOT* in a desktop-less server use case. It is of some advantage to be able to log into the Ubuntu-Desktop on demand.   
With KODI you are *NOT* in a desktop-less server use case. It is of some advantage to be able to log into the Ubuntu-Desktop on demand.   
So you download the latest Ubuntu Desktop image and basically follow down the same procedure as described in the [[HOW-TO:Install KodiBuntu from a USB drive]] (... but with a different image !).
So you download the latest Ubuntu Desktop image and basically follow down the same procedure as described in the [[HOW-TO:Install KodiBuntu from a USB drive]] (... but with a different image !).
Attention:
Attention:
Line 49: Line 49:
* If you get to the partition section, I would recommend *NOT* to use LVM but opt for a straight forward default configuration. LVM adds some complexity, that you should choose only if you need it (RAID designs, etc.) or you know exactly what you are doing.
* If you get to the partition section, I would recommend *NOT* to use LVM but opt for a straight forward default configuration. LVM adds some complexity, that you should choose only if you need it (RAID designs, etc.) or you know exactly what you are doing.
* If you skip any default option during the partion layout: the boot-partion is very important for EFI to work. Choose at least 512MB, FAT32 and mount it to /boot/efi.
* If you skip any default option during the partion layout: the boot-partion is very important for EFI to work. Choose at least 512MB, FAT32 and mount it to /boot/efi.
===Install XBMC===
===Install KODI===
Once you have booted into your shiny new desktop for the first time, you now get ready for the XBMC installation.
Once you have booted into your shiny new desktop for the first time, you now get ready for the KODI installation.
Thats straight forward by following the [[HOW-TO:Install XBMC for Linux]].
Thats straight forward by following the [[HOW-TO:Install KODI for Linux]].
So fire up a terminal and follow the steps.
So fire up a terminal and follow the steps.
===autostart XBMC===
===autostart KODI===
If you have followed the Ubuntu Desktop installation above, autostarting XBMC is as easy as adding another desktop session to the login xsessions.
If you have followed the Ubuntu Desktop installation above, autostarting KODI is as easy as adding another desktop session to the login xsessions.
Ubuntu remebers the last used desktop/xsession. So the new XBMC xsession survives the next reboot.
Ubuntu remebers the last used desktop/xsession. So the new KODI xsession survives the next reboot.
<pre>
<pre>
cd /usr/share/xsessions
cd /usr/share/xsessions
vi XBMC.desktop
vi KODI.desktop
</pre>
</pre>
Insert the next lines into the newly generated file
Insert the next lines into the newly generated file
<pre>
<pre>
[Desktop Entry]
[Desktop Entry]
Name=XBMC
Name=KODI
Comment=This session will start XBMC Media Center
Comment=This session will start KODI Media Center
Exec=xbmc-standalone
Exec=KODI-standalone
TryExec=xbmc-standalone
TryExec=KODI-standalone
Type=Application
Type=Application
</pre>
</pre>
In order to be able to choose this new desktop, logout of the ubuntu GUI (upper right corner, logout/exit).
In order to be able to choose this new desktop, logout of the ubuntu GUI (upper right corner, logout/exit).
This will get you to the ubuntu login-screen. If you click on the symbol just right of your current login, you will be able to choose the new desktop entry.
This will get you to the ubuntu login-screen. If you click on the symbol just right of your current login, you will be able to choose the new desktop entry.
Login, using your predefined user credentials - and you should be beamed right into XBMC.
Login, using your predefined user credentials - and you should be beamed right into KODI.
===disable PulseAudio===
===disable PulseAudio===
For reference, you find a good XBMC/PulseAudio guide here: [[PulseAudio]].
For reference, you find a good KODI/PulseAudio guide here: [[PulseAudio]].
While PulseAudio is mandatory in a shared audio use case in a default desktop environment, it simply does not support passthrough of HD-audio (DTS-HD, TrueHD, etc.) at this time.
While PulseAudio is mandatory in a shared audio use case in a default desktop environment, it simply does not support passthrough of HD-audio (DTS-HD, TrueHD, etc.) at this time.
So if you need this, because you have an AV receiver that is able to encode that material, you need to disable PulseAudio during XBMC use.
So if you need this, because you have an AV receiver that is able to encode that material, you need to disable PulseAudio during KODI use.
You could simply uninstall it, but since it would be need for the ubuntu desktop, there is a handy workaround, that goes hand-in-hand with the XBMC autostart method.
You could simply uninstall it, but since it would be need for the ubuntu desktop, there is a handy workaround, that goes hand-in-hand with the KODI autostart method.


There is a convenient command line method to start XBMC without loading the PulseAudio environment.
There is a convenient command line method to start KODI without loading the PulseAudio environment.
Unfortunately we cannot use that method, directly within the xsession profile.
Unfortunately we cannot use that method, directly within the xsession profile.
In order to force XBMC into using the ALSA drivers, we use a script wrapper for the XBMC startup instead.
In order to force KODI into using the ALSA drivers, we use a script wrapper for the KODI startup instead.


<pre>
<pre>
vi ~\xbmc_alsa_session_starter
vi ~\KODI_alsa_session_starter
</pre>
</pre>
<pre>
<pre>
#!/bin/bash
#!/bin/bash
# force XBMC to use ALSA for proper passthrough support
# force KODI to use ALSA for proper passthrough support
AE_SINK=ALSA xbmc-standalone
AE_SINK=ALSA KODI-standalone
</pre>
</pre>
<pre>
<pre>
chmod +x ~\xbmc_alsa_session_starter
chmod +x ~\KODI_alsa_session_starter
</pre>
</pre>


Finally we need to add a new xsession configuration that we can use for autostarting XBMC with ALSA support.
Finally we need to add a new xsession configuration that we can use for autostarting KODI with ALSA support.
<pre>
<pre>
vi /usr/share/xsessions/XBMC_ALSA.desktop
vi /usr/share/xsessions/KODI_ALSA.desktop
</pre>
</pre>
'''You have to modify the config according to your specific username'''
'''You have to modify the config according to your specific username'''
<pre>
<pre>
[Desktop Entry]
[Desktop Entry]
Name=XBMC
Name=KODI
Comment=This session will start XBMC Media Center in ALSA mode
Comment=This session will start KODI Media Center in ALSA mode
Exec=/home/**USERNAME**/xbmc_alsa_session_starter
Exec=/home/**USERNAME**/KODI_alsa_session_starter
TryExec=xbmc-standalone
TryExec=KODI-standalone
Type=Application
Type=Application
</pre>
</pre>
Now "exit" XBMC or the Ubuntu desktop and use the "new" xsession XBMC_ALSA with your predefined user.
Now "exit" KODI or the Ubuntu desktop and use the "new" xsession KODI_ALSA with your predefined user.
You are now using an XBMC in ALSA mode.
You are now using an KODI in ALSA mode.


===configure LIRC===
===configure LIRC===

Revision as of 08:55, 8 January 2015

Home icon grey.png   ▶ Intel NUC ▶ Install Kodi on an Intel NUC

THIS SECTION IS CURRENTLY UNDER CONSTRUCTION (STARTED 2014.10.03)

Preliminary

The preliminary requirement for this tutorial is, that you have managed for the NUC to be up and booting @least into the bios screen (memory and storage well recognised). Since a NUC comes almost barebone (case and mainboard), memory and harddrive (msata) is mandatory. This means as well, that a keyboard is plugged in and an HDMI connection to a TV/monitor is established.

I recommend a haswell based design, since it is superior to the older models in many respects (IRDA built in). I would assume, that KODI has an appetite for the i5 board, but I have read that the i3 is way sufficient for the day2day use. Don't (!) save too much money - you want the i5 - think about the Aeon MQ5 skin ;_)

So with the shiny bios flashing on your TV/monitor you are ready to go.

ATTN: make sure to always update to the latest BIOS prior to any installation attempt, otherwise you might run into issues during the setup process (missing boot devices, etc.)

Distributions==

Before you continue with the native installation method, that I describe later, you should consider either of the pre-built KODI distributions, that already work out of the box on the NUC platform. If you want to go down that road, please refer to the respective sections: KODIbuntu.pngKODIbuntu OpenELEC.pngOpenELEC

I myself have started with KODIbuntu (KodiBunut). The problem is, that the current download image for USB installation is not capable to EFI boot. Therefor it is not possible (!) to install KODIbuntu with propper initial EFI bios support. There are ways to enable EFI boot later, but that is a tricky thing to do. If you wish to go down that road, there is already a very good HOW-TO:Install KodiBuntu from a USB drive

Native Ubuntu & KODI (KODIbuntu do it yourself)

Re-build KODIbuntu from a default Ubuntu image to be able to have

  • full EFI-Bios support
  • effective AutoStart {xsessions)
  • DTSHD/TrueHD support

Mind you, that AutoStart & HDAudio works already with the original KODIbuntu image.

Many credits of this tutorial go to the authors of the various resources around the internet, that cover almost all the aspects, that I concentrate here. Please pay some attention to these sites, since they either cover other linux aspects or different solutions as well (like PLEX, etc.).

Install Ubuntu Desktop

Initially you want to install a current Desktop Version of Ubuntu (http://www.ubuntu.com/download/desktop). The advantage of the Desktop Version is, that X11 gets already configured for you. With KODI you are *NOT* in a desktop-less server use case. It is of some advantage to be able to log into the Ubuntu-Desktop on demand. So you download the latest Ubuntu Desktop image and basically follow down the same procedure as described in the HOW-TO:Install KodiBuntu from a USB drive (... but with a different image !). Attention:

  • You *HAVE* to boot your USB drive through EFI support. If the drive is not recognised by the EFI-Bios and boots the legacy way, you will not end up with an EFI installation. That can be tricky. It might as well mean the you boot cycle your NUC a view times until the thumbdrive is properly recognised. Even try to unetbootin your thumbdrive again.
  • If you get to the partition section, I would recommend *NOT* to use LVM but opt for a straight forward default configuration. LVM adds some complexity, that you should choose only if you need it (RAID designs, etc.) or you know exactly what you are doing.
  • If you skip any default option during the partion layout: the boot-partion is very important for EFI to work. Choose at least 512MB, FAT32 and mount it to /boot/efi.

Install KODI

Once you have booted into your shiny new desktop for the first time, you now get ready for the KODI installation. Thats straight forward by following the HOW-TO:Install KODI for Linux. So fire up a terminal and follow the steps.

autostart KODI

If you have followed the Ubuntu Desktop installation above, autostarting KODI is as easy as adding another desktop session to the login xsessions. Ubuntu remebers the last used desktop/xsession. So the new KODI xsession survives the next reboot.

cd /usr/share/xsessions
vi KODI.desktop

Insert the next lines into the newly generated file

[Desktop Entry]
Name=KODI
Comment=This session will start KODI Media Center
Exec=KODI-standalone
TryExec=KODI-standalone
Type=Application

In order to be able to choose this new desktop, logout of the ubuntu GUI (upper right corner, logout/exit). This will get you to the ubuntu login-screen. If you click on the symbol just right of your current login, you will be able to choose the new desktop entry. Login, using your predefined user credentials - and you should be beamed right into KODI.

disable PulseAudio

For reference, you find a good KODI/PulseAudio guide here: PulseAudio. While PulseAudio is mandatory in a shared audio use case in a default desktop environment, it simply does not support passthrough of HD-audio (DTS-HD, TrueHD, etc.) at this time. So if you need this, because you have an AV receiver that is able to encode that material, you need to disable PulseAudio during KODI use. You could simply uninstall it, but since it would be need for the ubuntu desktop, there is a handy workaround, that goes hand-in-hand with the KODI autostart method.

There is a convenient command line method to start KODI without loading the PulseAudio environment. Unfortunately we cannot use that method, directly within the xsession profile. In order to force KODI into using the ALSA drivers, we use a script wrapper for the KODI startup instead.

vi ~\KODI_alsa_session_starter
#!/bin/bash
# force KODI to use ALSA for proper passthrough support
AE_SINK=ALSA KODI-standalone
chmod +x ~\KODI_alsa_session_starter

Finally we need to add a new xsession configuration that we can use for autostarting KODI with ALSA support.

vi /usr/share/xsessions/KODI_ALSA.desktop

You have to modify the config according to your specific username

[Desktop Entry]
Name=KODI
Comment=This session will start KODI Media Center in ALSA mode
Exec=/home/**USERNAME**/KODI_alsa_session_starter
TryExec=KODI-standalone
Type=Application

Now "exit" KODI or the Ubuntu desktop and use the "new" xsession KODI_ALSA with your predefined user. You are now using an KODI in ALSA mode.

configure LIRC

I order to be able to use the built in IR receiver follow the HOW-TO:Set up an MCE remote control in Linux