Kodi Community Forum

Full Version: New install of Ubuntu + Kodi on Intel NUC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi guys,

Just got my Intel NUC. It's a D54250WYK (so i5) with 8GB RAM + SSD + WiFi card
Awesome little beast by the way.

Just followed these instructions to install UBUNTU then KODI on my NUC

http://kodi.wiki/view/HOW-TO:Install_KOD..._Intel_NUC

1) This part hasn't been updated to KODI

http://kodi.wiki/view/HOW-TO:Install_KOD...PulseAudio

So I just tried to "convert" everything that had XBMC in it to KODI

So created a Kodi XSession and a Kodi_ALSA XSession

For some reason both XSessions would appear as "Kodi"

Being unable to tell one from the other, I just kept the Kodi_ALSA XSession, which is still called Kodi but whatever.

I'm unsure if the wrapper script works and I would like to know how to test if Pulse is deactivated when in Kodi, and if I'm relying on Alsa.

I really want to make sure i get DTS-HD and TrueHD


2) I have this stupid overscan problem in UBUNTU

I know this is not a Ubuntu Forum... but people here are knowledgeful in the HTPC + TV field Wink

And when I'm in Kodi I could fix it (in parameters)

Every google search I've done would tell me to use the TV settings.

I have this stupid Sharp Aquos LCD TV that's 40 inches and there is NO option to do that... and it is getting me much annoyed.

Stupid TV has the simplest option menu ever.

Any idea how to fix the overscan in Ubuntu?


3) From the same tutorial, I'm trying to make my IR receiver work with a HARMONY ONE remote :

http://kodi.wiki/view/HOW-TO:Set_up_an_M...l_in_Linux

I did install lirc

then
Code:
dpkg-reconfigure lirc

I select Logitech

And in the "MyHarmony" remote configuration I added two devices : Intel NUC and XBMC

None will work

Except when the Intel NUC is off, if I select the device Intel NUC and click "Power Toggle" it will turn it on!

So the IR receiver does work, but as soon as Ubuntu starts, it doesn't do anything.

In KODI, it's the same. None of the buttons respond.
I know that in Gotham and earlier, you can start XBMC using this from a terminal window or shell script like this:
AE_SINK=ALSA xbmc --standalone &

(the & at the end tells it to run the task in the background so that the shell script can complete or the terminal window can be released).

I HOPE this works with Kodi, of course you would need to change the reference to xbmc in that case.

I think that audio options displayed in settings (shown in the dropdowns) are a bit different when ALSA is in use but don't recall specifically how.

With regard to overscan, I have battled with this myself. People are right when they tell you that the best place to fix it is at the TV - you CAN adjust it within Kodi but without going into the technical details you are losing picture sharpness since you are not doing 1:1 dot mapping (fut another way, you are not seeing the full 1920x1080 display). I am surprised that you can't find a setting to do this since most newer Sharp models have a way to disable it, but anyway I found that I had to follow the instructions on this page to get my Sharp TV to display the "dot by dot" option, so if your TV is a bit older you might give it a try, even though the instructions are probably for a different model than what you have.

Finally, with regard to lirc and the Harmony remote, I find I have the best results when using dpkg-reconfigure to select a MCE remote (might be called Windows MCE or Media Center Edition or something like that, I forget now). Then you need to configure your Harmony to emulate a Windows MCE compatible remote control. This configuration "just works" for me. Of course this also assumes that your Intel NUC has a compatible IR receiver installed in it, or connected to it. If you actually have a Logitech remote, then try to see if the original remote works, and if it does then use the Harmony feature that learns the button presses from the remote. If it doesn't I'd stick with Windows MCE compatibility. If all else fails, search for "Windows MCE remote" on eBay and get a cheap one one that has a USB-connected IR-receiver and try using that (you may need to figure out how to disable your HTPC's internal receiver in that case, if it has one). Someone in my family has an Asrock HTPC and back when we set it up we could not get the internal IR receiver to work but a USB connected receiver works just fine. To see if your remote is being recognized at all, from a terminal window run irw and then press buttons on your remote - every time you do you should see one or more lines of output, for example this is what I get when I push the OK button:

$ irw
000000037ff07bdd 00 KEY_OK mceusb
000000037ff07bdd 01 KEY_OK mceusb
000000037ff07bdd 02 KEY_OK mceusb

(use Control-C to exit irw)

Note however that not seeing any output does not mean the IR receiver is incapable of receiving signals from your remote, it's just not seeing any buttons that it knows about (as might hapen if your remote is sending MCE codes but you configured lirc to look for Logitech codes).

That same site that has the overscan fix I mentioned above also has an article about getting this system to recognize codes from other remotes but it looks a bit technical to me, and may or may not help you. Also, did you read this wiki page?
My priority right now is to make the IR receiver work.

So I was checking this thread out:

http://forum.kodi.tv/showthread.php?tid=183119

(2014-01-12, 10:19)NUC-HTPC Wrote: [ -> ]Problem 5: How do I make my NUC integrated IR receiver work while in Ubuntu OS? (The IR receiver on your NUC works, it’s just that Ubuntu isn’t set up to recognize it/turn it on automatically – that’s why it’ll turn your NUC on out of the box, but not work out of the box once Ubuntu boots up. It’s not Intel’s fault/it’s not Ubuntu’s fault- just a quirk when combining the two)
Solution:
1) open a terminal (ctrl + alt + t)
2) copy/paste: sudo gedit ~/.config/autostart.sh
3) enter sudo password (you set it up when you installed Ubuntu)
4) copy/paste in gedit:
#!/bin/sh
modprobe -r nuvoton-cir
echo "auto" > “/sys/bus/acpi/devices/NTN0530:00/physical_node/resources”
modprobe nuvoton-cir
5) click “save” and then close gedit
6) restart system (you can just type “reboot” in the terminal you have open)

* Should start your NUC integrated IR receiver when Ubuntu loads up (*Many thanks to “aesalazar” via http://forum.xbmc.org/showthread.php?tid=176718&page=17)

When I manually execute the SH script autostart.sh
Code:
modprobe -r nuvoton-cir
echo "auto" > “/sys/bus/acpi/devices/NTN0530:00/physical_node/resources”  
modprobe nuvoton-cir

irw detecting my buttons therefore the IR received is turned on !

It will also work in Kodi before I restart.

The autostart.sh file was placed in the .config subdirectory of my home folder (only user on the machine) but it doesn't load up on start up, I've gotta call it manually.

How do I make this script load on boot (Ubuntu 14.04) ?
In Ubuntu click on Dash Home (topmost button in the launcher bar unless you have moved it) and when it comes up type in Startup and then click on Startup Applications. You can add it to the list but make sure you specify the full path to your script (if you use the Browse button to find it you should be okay).

There may be another, more Linux-y way to do it, but that should work, assuming you have permission to run the script and execute the commands in the script. Just FYI, very often when things don't work as expected in Linux, it's a permissions or ownership issue. If you have Midnight Commander (program name is mc) installed then you can run it from the launcher or a terminal window and then find and highlight your script and then click File in the top menu (of mc, not Ubuntu), and then Advanced chown and it will show you the permissions and ownership of the file. If you are trying to run a script or command and you don't have permission, it won't run. You may have known that already, but some new Linux users don't and it can be really frustrating if they are not used to paying attention to permissions.

One other tip, in a shell script you often need to specify the full path to commands, not just the command name. I don't have any idea why this is true, it just is. You can use "which <commandname>" (without the quotes) from a terminal prompt to see the path to commands that you don't need to specify the path on when running them directly.
(2014-12-26, 01:15)xbmclinuxuser Wrote: [ -> ]In Ubuntu click on Dash Home (topmost button in the launcher bar unless you have moved it) and when it comes up type in Startup and then click on Startup Applications. You can add it to the list but make sure you specify the full path to your script (if you use the Browse button to find it you should be okay).

Thanks for your reply.

If I'm in the Ubuntu desktop when following your procedure I'm worried it will only load it when I load the desktop too, whereas my KODI installation runs as an XSession and basically when I fire up my NUC it will start the KODI XSession without even asking, thus it will not even load the Ubuntu desktop.

I'll still give it a shot.

(2014-12-26, 01:15)xbmclinuxuser Wrote: [ -> ]There may be another, more Linux-y way to do it, but that should work, assuming you have permission to run the script and execute the commands in the script. Just FYI, very often when things don't work as expected in Linux, it's a permissions or ownership issue. If you have Midnight Commander (program name is mc) installed then you can run it from the launcher or a terminal window and then find and highlight your script and then click File in the top menu (of mc, not Ubuntu), and then Advanced chown and it will show you the permissions and ownership of the file. If you are trying to run a script or command and you don't have permission, it won't run. You may have known that already, but some new Linux users don't and it can be really frustrating if they are not used to paying attention to permissions.

One other tip, in a shell script you often need to specify the full path to commands, not just the command name. I don't have any idea why this is true, it just is. You can use "which <commandname>" (without the quotes) from a terminal prompt to see the path to commands that you don't need to specify the path on when running them directly.

You're right on all that.

I made sure to make the script with CHMOD 777 so the permission is letting anyone read and execute it.

I'm not calling the script at all, I just put it in my home folder, under /.config/autostart.sh as the tutorial suggested.

Doing so, I thought it would execute automatically if I log in with my user.

It appears it does not.

I'm thinking about simply invocating it using crontab with @reboot
WTF ?!?

I test using IRW

1) It always work when I call the script manually

2) I tried addicting it in crontab with @reboot option : doesn't work
But it will work if I call the script manually

3) I tried adding it to the STARTUP thing in Ubuntu and load the Ubuntu XSession : doesn't work
But it will work if I call the script manually

I really don't understand how to make this script load on startup ?!?
awwwwww yissssss

Where all else failed, I did it old style and added my line to /etc/rc.local

In my case:
Code:
sh /root/NUC-IR.sh

Moving on to the next problem :

How can I fix the overscan on my TV.

Everywhere I read, most people say I should be able to fix this with my TV menu.

I own a Sharp Aquos, not new (I'd say maybe 5 or 6 years old)

I've seen threads talking about a dot-by-dot mode... I can't find it.

My TV menu's got very limited options, and in the image menu, there's only things about brightness, colors, etc.

Weird thing is I can't figure out the model number of my TV because the rack it's on is screwed in the center and that's where Sharp decided to put their model number.

I mean there's a genius in the engineering department that designed the back of the TV, and in the center of the 4 holes which you use ton install a rack, the dude said: yeah that'd be a perfect place to put a model number.
That's like to worst possible place ever. Can you put it, ANYWHERE but there please?
I just hope I don't have to unscrew my rack I'd really like to avoid that...

Anyhow... does anyone have experience with Sharp Aquos TVs and could guide me to where to find those settings?
try to put it in /etc/rc.local

edit: lol, you were faster
Alright I figured it "somehow"

I took my Harmony One remote (which I use with another TV set) and I added a Sharp Aquos which looked similar to mine.

Doing so allowed me to have access to all kind of "functions" (on the little Harmony One LCD screen)

Eventually, after trying a few, one was called "aspect" which gave me a few options and one of them, called "full screen" allowed me to remove the overscan!

So I fixed 2 problems out 3

Now the last one:

How do I get rid of the PULSE AUDIO

Here's what I did :

I created a file called KODI_alsa_session_starter in folder kodi, chmod'ed with 777 and +x

The file contains this :
Code:
#!/bin/bash
# force KODI to use ALSA for proper passthrough support
AE_SINK=ALSA kodi-standalone

Then I created a XSession file in /usr/share/xsessions/ called KODI.desktop

This file contains:
Code:
[Desktop Entry]
Name= KODI
Comment=This session will start KODI Media Center in ALSA mode
Exec=/kodi/KODI_alsa_session_starter
TryExec=kodi-standalone
Type=Application

I got it all from here:
http://kodi.wiki/view/HOW-TO:Install_KOD...PulseAudio

Except I changed xbmc to kodi

now it should work I guess, but I have no mean how to tell...

However in Kodi when I go into
Settings > System > Audio > Audio Input
I get two choices with "PulseAudio" something then HDMI
The only choice that will work is the PulseAudio server

So I'm getting a bad feeling about this :S
Overscan try Menu > System Options > View Option > View Mode > Dot by Dot 
So just to wrap up, in order to complete my installation, I'm just looking for a wait to test if my disabling of PULSE (and enabling of ALSA) worked.

Any idea on how to do this?
if you get HD audio(DTS HD, TrueHD) passthrough, it worked. Logfile will tell as well.
Hi Everybody, sorry for jump in this post.

Maybe I've a simliar problem like J-Blaze. I also play to setup a Ubuntu 14.04.1 (in my case a LTS Server) and Kodi 14.0. It's a clean installation, where by default now sound system was installed. And I also decided to use ALSA (PulseAudio was never installed on my system).

So I installed the following ALSA pakages:
alsa-base 1.0.25+dfsg-0ubuntu4 all ALSA driver configuration files
alsa-oss 1.0.25-1ubuntu1 amd64 ALSA wrapper for OSS applications
alsa-tools 1.0.27-2ubuntu3 amd64 Console based ALSA utilities for specific hardware
alsa-utils 1.0.27.2-1ubuntu2 amd64 Utilities for configuring and using ALSA

I also did the trick with the KODI_alsa_session_starter and in generell ALSA was used. If I switch Audio output -> Output configuration to "Fixed" I can hear the sound (Gui Sound as well as music for example), so for me it looks like ALSA must be used.

As soon as I switch to "Optimized" or "Best Match", where I can activate Paththrough, everything is quit!

I used for both "Audio output device" and "Passthrough output device" the same HDMI Port (where my AVR is connected to).

My logfile you should find under: http://paste.ubuntu.com/9675938/

Do you have any ideas what is the problem?

Many thanks in advance
Most likely an Denon, Onkyo, Pioneer AVR ... they have issue outputting anything when the intel gpu uses > 30hz @ 1080p

You Fixed output also won't work, if you set the samplerate to 44100 hz.

Passthrough should work in the Optimized / Best Match setting, though.

You need to patch AudioEngine to upsample everything <= 44100 hz. This is an intel driver bug / AVR bug -> a patch, we ship in openelec, does what you want: https://github.com/OpenELEC/OpenELEC.tv/...rate.patch

File a bug with the intel people: bugs.freedesktop.org
Many many thanks for your extrem fast support and this clarification about the root cause and the hint to that patch.

I can't believe that intel will fix that bug in time, so I will try my best to implement and test this patch on my system....
Pages: 1 2