Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Everything about X, Gnome, KDE, ... and everything running on it

Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby peek » 2018-10-31 10:34

After more than three weeks of Googling myself to sleep, I’m finally admitting to intellectual deficiency.

I acquired an Intel NUC to use with Kodi…

I have to confess, I’ve only used Linux for network type services and always only via an SSH console. (Yip, beloved ‘olde putty seated right next to corporate Windows) Yet, in my heart, I felt tis to be the year I would finally axe Windows.

And so, the NUC7CJYH was to be the bearer of graphical FREEDOM. I did a minimal console install of “debian-9.5.0-amd64-netinst.iso” followed by “apt-get install xinit kodi” .

(I contemplated other hardware options, but finalised on Mr & Mrs Intel as I understand they’re forthcoming and actually do wanna play nice with Uncle Linus)

For good measure I also, as always, do a:

Code: Select all
apt-get update
apt-get upgrade
apt-get dist-upgrade


which adds the “firmware-linux-free” package, in this scenario.

Yet, starting Kodi via
Code: Select all
/usr/bin/xinit /usr/bin/kodi-standalone
had the terminal swear at me !

Code: Select all
/usr/lib/x86_64-linux-gnu/kodi/kodi-xrandr: Failed to get size of gamma for output default
libEGL warning: DRI2: failed to authenticate


Regardless, Kodi starts up, be it a bit slow.

Yet the true surprise is in the system details being:

Processor utilisation constantly at 33%.

OS: Debian GNU/Linux 9 (stretch) (kernel: Linux 4.9.0-8-amd64)
GPU: Gallium 0.4 on llvmpipe (LLVM 3.9, 128bits)
OpenGL vendor: VMWare, Inc.
OpenGL version: 3.0 Mesa 13.0.6


Moving to the Audio under System Settings in Kodi … “freezes” the interface temporarily. (Please forgive me for such a sacrilegious statement involving Linux)

Once finally within the Audio settings, no output devices is listed.

Soooo, this has to be a driver issue … Yet, what more than installing the “firmware-linux-free” package can be done in regards to a driver?? For this is not over bloated Windows…

I’ve scoured the net, trying to make sense of this. Installed packaged on packages. Even did a graphical installations and then another with ALL packages installed. All for naught.

Though I’ve found numerous “related” topics, the final answer has always been to install LibreELEC.

Without making an commotion, I softly put my Debian T-shirt in the wash as to never allow it to witness what I was about to do.



Now … LibreELEC-Generic-x86_64-8.90.006.img.gz works PERFECT with the NUC7CJYH !

PERFECT, as in better than I could ever have contemplated, AMAZINGLY PERFECT! Everything works. Once the LibreELEC installer has completed and the NUC boots into Kodi all connectivity options works, first time, every time. Ethernet, WiFi, Bluetooth. Video, audio and power options (with WOL). LibreElec should be relabelled “Garden of Eden”. It’s bliss, tranquillity, the definition of ZEN, did I mention perfect, sensation, euphoric, … it’s unbelievable. … but it’s not debian.

Time for another confession. I’ve never contemplated or even tried to use wireless, bluetooth or even audio on a Linux machine before.

From LibreELEC’s Kodi, the system details being:

Processor utilisation lingering at 2%.

OS: LibreELECC (official) 8.90.006 9.0 (kernel: Linux 4.18.11)
GPU: Mesa DRI Intel® UHD Graphics 600 (Geminilake 2x6)
OpenGL vendor: Intel Open Source Technology Center
OpenGL version: 4.5 (Core Profile) Mesa 18.2.1
Audio: ALSA: HAD Intel PCH ALC233
ALSA: HAD Intel PCH, HDMI #0 -> 4
PULSE: Bluetooth Audio (PULSEAUDIO)


That was 4 days ago. Yet, I still just cannot get a breakthrough with debian.

i.e.

Code: Select all
glxinfo
Error: Unable to open display


Code: Select all
Glxgears
Error: couldn’t open display (null)


I feel so lost, I’ve actually stopped and have resorted to reading Linux administrative publications in search of enlightenment. (Which means I'm at the verge of throwing the towel in, as I hardly ever get past the second chapter of any admin manual)

Sooo, what am I trying to accomplish?

1. The most minimalist possible installation of Debian with Kodi
2. On startup or restart, boot straight into Kodi
3. No full blown aids. Sorry, I mean, the least amount of any window managers and/or desktop environment components, if even required.
4. SSH access and the freedom to install any other network service such as BIND, DHCP and/or PostFix if and when required. Basically dear olde debian as I have loved her since many many moons ago, upgraded to play music or a video in the background on some screen or HiFi.
5. Understand Debian\Linux multimedia better as to be able to resolve these ferrel issues quicker and more efficiently in the future.

Being new to forum posts, is there any seasoned Debianian whom would advise on how to proceed and troubleshoot as to finally achieve this objective?
User avatar
peek
 
Posts: 18
Joined: 2018-10-31 10:15

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby Segfault » 2018-10-31 14:40

Dunno, bro. The whole idea using 4.9 kernel (or OS that defaults to this) with new hardware is just calling for trouble. Sure, now all Debian gurus will chime in and tell how great thing is backporting and how you should do this and that to apply them. Besides, all other software is antiquated, too. For instance Xorg server and its drivers. Can the video driver even handle your graphics? According to your post it cannot and falls back to something like VESA or fbdev.
Segfault
 
Posts: 762
Joined: 2005-09-24 12:24

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby stevepusser » 2018-10-31 18:58

This is a common issue as the stable version of Debian ages and no longer supports new hardware out of the box.

The answer is the same as it always is: install the latest versions of the kernel, firmware, and usually newer Mesa packages from the backports repository, and everything should work.

If you want us to know what hardware you have, install inxi, update the hardware databases as sysadmin with
Code: Select all
update-pciids
update-usbids

then as a normal user:

Code: Select all
inxi -Fxz


The output of "gallium" in your openGL rendering is showing that it's falling back to software rendering instead of the hardware DRI provided by Mesa--no doubt at the root of why the openGL Kodi interface isn't working.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10126
Joined: 2009-10-06 05:53

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby peek » 2018-11-01 09:45

Thanks for replying.

My ignorance has been bliss. It's served me well, till now.

Segfault, would you mind advising how you'd address the objective? (Dare we speak the name of another distribution, starting with U...?)

stevepusser, I'm in for the ride. I've installed inxi, just not sure on how to "update the hardware databases as sysadmin"

So, in the interimn, I just run the above as root, resulting in:

update-pciids -> "Downloaded daily snapshot"
update-usbids -> "Downloads from http://www.linux-usb.org" and saves "/var/lib/usbutils/usb.ids.new" locally

#inxi -Fxz

Code: Select all
System:    Host: Debkodi Kernel: 4.9.0-8-amd64 x86_64 (64 bit gcc: 6.3.0)
           Console: tty 0 Distro: Debian GNU/Linux 9 (stretch)
Machine:   Device: un-determined System: Intel product: NUC7CJYH v: J67971-402
           Mobo: Intel model: NUC7JYB v: J67967-401
           UEFI: Intel v: JYGLKCPX.86A.0045.2018.1001.1100 date: 10/01/2018
CPU:       Dual core Intel Celeron J4005 (-MCP-) cache: 4096 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 7987
           clock speeds: max: 2001 MHz 1: 1400 MHz 2: 1100 MHz
Graphics:  Card: Intel Device 3185 bus-ID: 00:02.0
           Display Server: N/A drivers: fbdev (unloaded: modesetting,vesa)
           tty size: 80x24 Advanced Data: N/A out of X
Audio:     Card Intel Device 3198 bus-ID: 00:0e.0
Network:   Card-1: Intel Device 31dc bus-ID: 00:0c.0
           IF: N/A state: N/A speed: N/A duplex: N/A mac: N/A
           Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: e000 bus-ID: 02:00.0
           IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 15.4GB (35.1% used)
           ID-1: USB /dev/sda model: Ultra_Fit size: 15.4GB
Partition: ID-1: / size: 11G used: 1.7G (17%) fs: ext4 dev: /dev/sda2
           ID-2: swap-1 size: 3.85GB used: 0.00GB (0%) fs: swap dev: /dev/sda3
Sensors:   System Temperatures: cpu: 42.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 88 Uptime: 17:44 Memory: 100.3/3539.6MB
           Init: systemd runlevel: 5 Gcc sys: N/A
           Client: Shell (bash 4.4.121) inxi: 2.3.5


.. boldly venturing further than I've ventured before:

1.) Installing the latest version of the kernel:

#apt-cache search linux-image

Code: Select all
linux-headers-4.9.0-7-amd64 - Header files for Linux 4.9.0-7-amd64
linux-headers-4.9.0-7-rt-amd64 - Header files for Linux 4.9.0-7-rt-amd64
linux-image-4.9.0-7-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-7-amd64-dbg - Debug symbols for linux-image-4.9.0-7-amd64
linux-image-4.9.0-7-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-7-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-7-rt-amd64
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-amd64-dbg - Debugging symbols for Linux amd64 configuration (meta-package)
linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT
linux-image-rt-amd64-dbg - Debugging symbols for Linux rt-amd64 configuration (meta-package)
linux-headers-4.9.0-3-amd64 - Header files for Linux 4.9.0-3-amd64
linux-headers-4.9.0-3-rt-amd64 - Header files for Linux 4.9.0-3-rt-amd64
linux-headers-4.9.0-4-amd64 - Header files for Linux 4.9.0-4-amd64
linux-headers-4.9.0-4-rt-amd64 - Header files for Linux 4.9.0-4-rt-amd64
linux-headers-4.9.0-5-amd64 - Header files for Linux 4.9.0-5-amd64
linux-headers-4.9.0-5-rt-amd64 - Header files for Linux 4.9.0-5-rt-amd64
linux-headers-4.9.0-6-amd64 - Header files for Linux 4.9.0-6-amd64
linux-headers-4.9.0-6-rt-amd64 - Header files for Linux 4.9.0-6-rt-amd64
linux-headers-4.9.0-8-amd64 - Header files for Linux 4.9.0-8-amd64
linux-headers-4.9.0-8-rt-amd64 - Header files for Linux 4.9.0-8-rt-amd64
linux-image-4.9.0-3-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-3-amd64-dbg - Debug symbols for linux-image-4.9.0-3-amd64
linux-image-4.9.0-3-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-3-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-3-rt-amd64
linux-image-4.9.0-4-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-4-amd64-dbg - Debug symbols for linux-image-4.9.0-4-amd64
linux-image-4.9.0-4-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-4-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-4-rt-amd64
linux-image-4.9.0-5-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-5-amd64-dbg - Debug symbols for linux-image-4.9.0-5-amd64
linux-image-4.9.0-5-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-5-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-5-rt-amd64
linux-image-4.9.0-6-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-6-amd64-dbg - Debug symbols for linux-image-4.9.0-6-amd64
linux-image-4.9.0-6-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-6-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-6-rt-amd64
linux-image-4.9.0-8-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-8-amd64-dbg - Debug symbols for linux-image-4.9.0-8-amd64
linux-image-4.9.0-8-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-8-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-8-rt-amd64


Hhmmmm ... I believe I'd need to get back to this after the backports repository update.


2.) Implementing backports - Heeding Segfault's warning

2.1) "For Backports are packages taken from the next Debian release (called "testing") adjusted and recompiled for usage on Debian stable. (In a few cases, usually for security updates, backports are also created from the Debian unstable (aka SID) distribution.)" - via Google

2.2) "It is therefore recommended to only select single backported packages that fit your needs, and not use all available backports. " - https://backports.debian.org/

2.3) "Who's afraid?" - Famous last words that has left deep scares

#echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list

#apt-get update

** All backports are deactivated by default To install something from backports run: apt-get -t stretch-backports install "package"

#apt-cache search linux-image

Code: Select all
linux-headers-4.9.0-7-amd64 - Header files for Linux 4.9.0-7-amd64
linux-headers-4.9.0-7-rt-amd64 - Header files for Linux 4.9.0-7-rt-amd64
linux-image-4.9.0-7-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-7-amd64-dbg - Debug symbols for linux-image-4.9.0-7-amd64
linux-image-4.9.0-7-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-7-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-7-rt-amd64
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-amd64-dbg - Debugging symbols for Linux amd64 configuration (meta-package)
linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT
linux-image-rt-amd64-dbg - Debugging symbols for Linux rt-amd64 configuration (meta-package)
linux-headers-4.9.0-3-amd64 - Header files for Linux 4.9.0-3-amd64
linux-headers-4.9.0-3-rt-amd64 - Header files for Linux 4.9.0-3-rt-amd64
linux-headers-4.9.0-4-amd64 - Header files for Linux 4.9.0-4-amd64
linux-headers-4.9.0-4-rt-amd64 - Header files for Linux 4.9.0-4-rt-amd64
linux-headers-4.9.0-5-amd64 - Header files for Linux 4.9.0-5-amd64
linux-headers-4.9.0-5-rt-amd64 - Header files for Linux 4.9.0-5-rt-amd64
linux-headers-4.9.0-6-amd64 - Header files for Linux 4.9.0-6-amd64
linux-headers-4.9.0-6-rt-amd64 - Header files for Linux 4.9.0-6-rt-amd64
linux-headers-4.9.0-8-amd64 - Header files for Linux 4.9.0-8-amd64
linux-headers-4.9.0-8-rt-amd64 - Header files for Linux 4.9.0-8-rt-amd64
linux-image-4.9.0-3-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-3-amd64-dbg - Debug symbols for linux-image-4.9.0-3-amd64
linux-image-4.9.0-3-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-3-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-3-rt-amd64
linux-image-4.9.0-4-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-4-amd64-dbg - Debug symbols for linux-image-4.9.0-4-amd64
linux-image-4.9.0-4-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-4-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-4-rt-amd64
linux-image-4.9.0-5-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-5-amd64-dbg - Debug symbols for linux-image-4.9.0-5-amd64
linux-image-4.9.0-5-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-5-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-5-rt-amd64
linux-image-4.9.0-6-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-6-amd64-dbg - Debug symbols for linux-image-4.9.0-6-amd64
linux-image-4.9.0-6-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-6-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-6-rt-amd64
linux-image-4.9.0-8-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-8-amd64-dbg - Debug symbols for linux-image-4.9.0-8-amd64
linux-image-4.9.0-8-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-4.9.0-8-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-8-rt-amd64
linux-headers-4.17.0-0.bpo.1-amd64 - Header files for Linux 4.17.0-0.bpo.1-amd64
linux-headers-4.17.0-0.bpo.1-cloud-amd64 - Header files for Linux 4.17.0-0.bpo.1-cloud-amd64
linux-headers-4.17.0-0.bpo.3-amd64 - Header files for Linux 4.17.0-0.bpo.3-amd64
linux-headers-4.17.0-0.bpo.3-cloud-amd64 - Header files for Linux 4.17.0-0.bpo.3-cloud-amd64
linux-headers-4.18.0-0.bpo.1-amd64 - Header files for Linux 4.18.0-0.bpo.1-amd64
linux-headers-4.18.0-0.bpo.1-cloud-amd64 - Header files for Linux 4.18.0-0.bpo.1-cloud-amd64
linux-headers-4.18.0-0.bpo.1-rt-amd64 - Header files for Linux 4.18.0-0.bpo.1-rt-amd64
linux-image-4.17.0-0.bpo.1-amd64 - Linux 4.17 for 64-bit PCs
linux-image-4.17.0-0.bpo.1-amd64-dbg - Debug symbols for linux-image-4.17.0-0.bpo.1-amd64
linux-image-4.17.0-0.bpo.1-cloud-amd64 - Linux 4.17 for x86-64 cloud
linux-image-4.17.0-0.bpo.1-cloud-amd64-dbg - Debug symbols for linux-image-4.17.0-0.bpo.1-cloud-amd64
linux-image-4.17.0-0.bpo.3-amd64 - Linux 4.17 for 64-bit PCs
linux-image-4.17.0-0.bpo.3-amd64-dbg - Debug symbols for linux-image-4.17.0-0.bpo.3-amd64
linux-image-4.17.0-0.bpo.3-cloud-amd64 - Linux 4.17 for x86-64 cloud
linux-image-4.17.0-0.bpo.3-cloud-amd64-dbg - Debug symbols for linux-image-4.17.0-0.bpo.3-cloud-amd64
linux-image-4.18.0-0.bpo.1-amd64 - Linux 4.18 for 64-bit PCs
linux-image-4.18.0-0.bpo.1-amd64-dbg - Debug symbols for linux-image-4.18.0-0.bpo.1-amd64
linux-image-4.18.0-0.bpo.1-cloud-amd64 - Linux 4.18 for x86-64 cloud
linux-image-4.18.0-0.bpo.1-cloud-amd64-dbg - Debug symbols for linux-image-4.18.0-0.bpo.1-cloud-amd64
linux-image-4.18.0-0.bpo.1-rt-amd64 - Linux 4.18 for 64-bit PCs, PREEMPT_RT
linux-image-4.18.0-0.bpo.1-rt-amd64-dbg - Debug symbols for linux-image-4.18.0-0.bpo.1-rt-amd64
linux-headers-4.9.0-4-grsec-amd64 - Header files for Linux 4.9.0-4-grsec-amd64
linux-image-4.9.0-4-grsec-amd64 - Linux 4.9 for 64-bit PCs, Grsecurity protection (unofficial patch)
linux-image-grsec-amd64 - Linux image meta-package, grsec featureset
linux-image-cloud-amd64 - Linux for x86-64 cloud (meta-package)
linux-image-cloud-amd64-dbg - Debugging symbols for Linux cloud-amd64 configuration (meta-package)


Hhmmm. Nice. Picking .... linux-image-4.18.0-0.bpo.1-amd64 ... taking point 2.3 of above into account.

#apt-get -t stretch-backports install linux-image-4.18.0-0.bpo.1-amd64

Code: Select all
Some moaning ...
...
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8107e-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8107e-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168h-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168h-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168g-3.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168g-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8106e-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8106e-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8411-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8411-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8402-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168f-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168f-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8105e-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168e-3.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168e-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168e-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-1.fw for module r8169
...


Rebooting ...

Some hardware errors ... then "input not supported" on display. Swap to a newer model display and we're fired up.

#dmesg

Code: Select all
[    0.000000] Linux version 4.18.0-0.bpo.1-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP Debian 4.18.6-1~bpo9+1 (2018-09-13)
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.18.0-0.bpo.1-amd64 root=UUID=850b2b49-b9b1-457a-90d0-53343350a3d9 ro quiet
...
[    6.862088] Intel(R) Wireless WiFi driver for Linux
[    6.862090] Copyright(c) 2003- 2015 Intel Corporation
[    6.862141] iwlwifi 0000:00:0c.0: enabling device (0000 -> 0002)
[    6.912652] iwlwifi 0000:00:0c.0: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-38.ucode (-2)
[    6.912692] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
[    6.912727] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-38.ucode failed with error -2
[    6.912743] iwlwifi 0000:00:0c.0: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-37.ucode (-2)
[    6.912776] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-37.ucode failed with error -2
[    6.912788] iwlwifi 0000:00:0c.0: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-36.ucode (-2)
[    6.912820] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-36.ucode failed with error -2
[    6.912830] iwlwifi 0000:00:0c.0: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-35.ucode (-2)
[    6.912863] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-35.ucode failed with error -2
[    6.912873] iwlwifi 0000:00:0c.0: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-34.ucode (-2)
[    6.912905] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-34.ucode failed with error -2
[    6.912914] iwlwifi 0000:00:0c.0: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-33.ucode (-2)
[    6.912947] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-33.ucode failed with error -2
[    6.912958] iwlwifi 0000:00:0c.0: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-32.ucode (-2)
[    6.912991] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-32.ucode failed with error -2
[    6.913000] iwlwifi 0000:00:0c.0: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-31.ucode (-2)
[    6.913033] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-31.ucode failed with error -2
[    6.913042] iwlwifi 0000:00:0c.0: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-30.ucode (-2)
[    6.913075] iwlwifi 0000:00:0c.0: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-30.ucode failed with error -2
[    6.913077] iwlwifi 0000:00:0c.0: minimum version required: iwlwifi-9000-pu-b0-jf-b0-30
[    6.913125] iwlwifi 0000:00:0c.0: maximum version supported: iwlwifi-9000-pu-b0-jf-b0-38
[    6.913154] iwlwifi 0000:00:0c.0: check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
[    6.955143] i2c i2c-2: fc0012: Fitipower FC0012 successfully identified
[    7.116495] media: Linux media interface: v0.10
[    7.220071] Bluetooth: Core ver 2.22
[    7.220093] NET: Registered protocol family 31
[    7.220094] Bluetooth: HCI device and connection manager initialized
[    7.220099] Bluetooth: HCI socket layer initialized
[    7.220102] Bluetooth: L2CAP socket layer initialized
[    7.220109] Bluetooth: SCO socket layer initialized
[    7.251120] videodev: Linux video capture interface: v2.00
[    7.360055] usbcore: registered new interface driver btusb
[    7.390726] Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015
[    7.391731] Bluetooth: hci0: Device revision is 2
[    7.391732] Bluetooth: hci0: Secure boot is enabled
[    7.391732] Bluetooth: hci0: OTP lock is enabled
[    7.391733] Bluetooth: hci0: API lock is enabled
[    7.391734] Bluetooth: hci0: Debug lock is disabled
[    7.391735] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[    7.391754] bluetooth hci0: firmware: failed to load intel/ibt-17-16-1.sfi (-2)
[    7.391791] bluetooth hci0: Direct firmware load for intel/ibt-17-16-1.sfi failed with error -2
[    7.391793] Bluetooth: hci0: Failed to load Intel firmware file (-2)
[    7.396715] [drm] GuC: No firmware known for this platform!
[    7.396717] [drm] HuC: No firmware known for this platform!
...
[    7.398073] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    7.399067] i915 0000:00:02.0: firmware: failed to load i915/glk_dmc_ver1_04.bin (-2)
[    7.399074] i915 0000:00:02.0: Direct firmware load for i915/glk_dmc_ver1_04.bin failed with error -2
[    7.399077] i915 0000:00:02.0: Failed to load DMC firmware i915/glk_dmc_ver1_04.bin. Disabling runtime power management.
[    7.399079] i915 0000:00:02.0: DMC firmware homepage: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
...
[    9.023017] r8169 0000:02:00.0: firmware: failed to load rtl_nic/rtl8168h-2.fw (-2)
[    9.023059] r8169 0000:02:00.0: Direct firmware load for rtl_nic/rtl8168h-2.fw failed with error -2
[    9.023063] r8169 0000:02:00.0 eno1: unable to load firmware patch rtl_nic/rtl8168h-2.fw (-2)
[    9.062585] r8169 0000:02:00.0 eno1: link down
[    9.062586] r8169 0000:02:00.0 eno1: link down
...
[  166.521677] Bluetooth: RFCOMM TTY layer initialized
[  166.521685] Bluetooth: RFCOMM socket layer initialized
[  166.521691] Bluetooth: RFCOMM ver 1.11
[ 3096.031354] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to polling mode: last cmd=0x202f0600
[ 3097.043581] snd_hda_intel 0000:00:0e.0: No response from codec, disabling MSI: last cmd=0x202f0600
[ 3098.055593] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to single_cmd mode: last cmd=0x202f0600


Trying to start Kodi as a normal user:

Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)


#groups user

cdrom floppy audio dip video plugdev netdev


Starting Kodi under root:

... and the MAGIC of Uncle Linus's kernel just jumps out ! No wonder I've never need to fiddle with it. (*** Not forgetting Segfault's warning ***)

From BackPortDebian’s Kodi, the system details being:

Processor utilisation lingering at 2%.

OS: Debian GNU/Linux 9 (stretch) (kernek: Linux 4.18.0-0.bp...
GPU: Mesa DRI Intel® UHD Graphics 600 (Geminilake 2x6)
OpenGL vendor: Intel Open Source Technology Center
OpenGL version: 3.0 Mesa 13.0.6

- GPU temperature: ? -

Audio: ALSA: HD Intel PCH ALC233
ALSA: HD Intel PCH, HDMI #0 -> 4

- No Bluetooth Audio -


With Kodi still running or exited:

#glxinfo
Error: unable to open display


#glxgears
Error: couldn't open display (null)


and on the console I notice:

libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error, driver_name=(null)
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error, driver_name=(null)


One hellova improvement just running a new kernel. It's insane !

So, what would the "normal user" be missing to be able to run Kodi (as opposed to root) ?

And the only remaining things to fix (firmware) would be: ?

iwlwifi
bluetooth
i915
r8169

Would it just be a case of dropping *.ko files in a folder ?

Then to upgrade MESA 13.0.6 to MESA 18.x.y and pondering if there's a means to hook into the LibreElec's "Add-On's" for Kodi ?
User avatar
peek
 
Posts: 18
Joined: 2018-10-31 10:15

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby Segfault » 2018-11-01 16:31

OK, I myself stopped using Debian when systemd came. Thus, I really don't know what one has to do in Debian to run a single application on X (and not using any WM). I do exactly this with my NUC, running Gentoo. Here is wiki article abut non-root Xorg. https://wiki.gentoo.org/wiki/Non_root_Xorg
Segfault
 
Posts: 762
Joined: 2005-09-24 12:24

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby Head_on_a_Stick » 2018-11-01 17:28

peek wrote:Picking .... linux-image-4.18.0-0.bpo.1-amd64

You should install the kernel metapackage (the one without any version numbers) to make sure it is kept updated, running an outdated kernel is unwise.

peek wrote:
Code: Select all
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8107e-2.fw for module r8169

The backported firmware-realtek package will remove those messages.

peek wrote:
Code: Select all
[    7.398073] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    7.399067] i915 0000:00:02.0: firmware: failed to load i915/glk_dmc_ver1_04.bin (-2)
[    7.399074] i915 0000:00:02.0: Direct firmware load for i915/glk_dmc_ver1_04.bin failed with error -2
[    7.399077] i915 0000:00:02.0: Failed to load DMC firmware i915/glk_dmc_ver1_04.bin. Disabling runtime power management.
[    7.399079] i915 0000:00:02.0: DMC firmware homepage: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915

The backported firmware-misc-nonfree package will remove those messages.

peek wrote:Trying to start Kodi as a normal user:

Code: Select all
Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)

Does this get Kodi working (as your normal user!):
Code: Select all
startx $(which kodi)

peek wrote:Starting Kodi under root

*Never* do this.

Also, how are you "starting Kodi as root", exactly?

Did you log in as your normal user and use `sudo`? If so then the root-owned ~/.Xauthority will have to be deleted (I think).

peek wrote:With Kodi still running or exited:

Code: Select all
#glxinfo
Error: unable to open display


Code: Select all
#glxgears
Error: couldn't open display (null)

If you are running those commands from a console (TTY) then you need to state the display, for example:
Code: Select all
DISPLAY=:0 glxinfo

And please stop running commands as root unless you absolutely have to: https://en.wikipedia.org/wiki/Principle ... _privilege

Oh, and I agree with Segfault — you should probably use Arch instead with hardware this new; Debian 10 will be out next summer and should work much better with your hardware (once the non-free firmware has been installed).
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8169
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby stevepusser » 2018-11-01 18:29

Sysadmin means as root or with sudo; since Debian users can have either one or both of those enabled, I wasn't that specific. But don't run inxi as sysadmin.

You can also get your wi-fi working, if that's important, by installing firmware-iwlwifi from backports.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10126
Joined: 2009-10-06 05:53

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby Segfault » 2018-11-01 18:42

I've never used kodi-standalone, so I looked it up: https://forum.kodi.tv/showthread.php?tid=329239

FYI I set up my NUC by hand, it autologins kodi user in inittab and starts kodi from ~/.xinitrc.
Segfault
 
Posts: 762
Joined: 2005-09-24 12:24

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby stevepusser » 2018-11-01 20:44

I know kodi installs some kind of session manager; I have a standalone Kodi session option in lightdm.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10126
Joined: 2009-10-06 05:53

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby Segfault » 2018-11-01 21:14

stevepusser wrote:I know kodi installs some kind of session manager; I have a standalone Kodi session option in lightdm.

No logic here, if lightdm calls it a session it does not mean Kodi has a session manager. Probably if you ran plain xterm on top of X without any WM then you could make lightdm call it xterm session ...
Segfault
 
Posts: 762
Joined: 2005-09-24 12:24

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby jmgibson1981 » 2018-11-02 02:21

Read most of the posts. I think the installation is being done wrong and that is the issue. I don't think the hardware is to new. Below I've posted my research compiled from many sources. Try this guide to install and see where you end up. While I know backports are helpful, at the end of the day they are not the highly tested packages that come with stable. Backport as needed, not by default is how I run my systems. The reason your xinit failed is because you didn't install a package necessary for it to work, which is covered below. Do a fresh install and follow below steps. Report back as needed. I wrote this, not copy pasted from someone's blog.

------------------

I've been running my main HTPC on Ubuntu 16.04 for awhile now. Only reason I don't run Debian is with the AMD hardware, there is a graphical stutter that I can't shake with Debian. But the configuration is the same. You will need ssh access to this box. My machine also runs dns, dhcp, ltsp, torrent, apt-cache proxy, minecraft servers, file server & backup, main media storage among other things all on a box in my entertainment center.

For all configurations add firmware packages as required. You will likely need to enable contrib and nonfree repos.

Packages required for a minimal Kodi installation. Standalone is not officially supported by the Kodi team, so I use LightDM with Openbox.

Code: Select all
kodi kodi-eventclients-kodi-send xorg openbox lightdm pulseaudio


To autostart Openbox with LightDM this is my config

Code: Select all
cat /etc/lightdm/lightdm.conf.d/kodi.conf
[SeatDefaults]
autologin-user=kodimain
autologin-user-timeout=0
user-session=openbox


Openbox autostart config.

Code: Select all
cat /home/kodimain/.config/openbox/autostart
sleep 5
mediastart &
sleep 5
xset s 0 s blank -dpms &


Above mediastart script. I've found on the official Kodi packages from the PPA that it will segfault once every 15-20 restarts. This will restart till running. I've seen this behavior with Debian as well. I think it has to do with a PVR addon though so It may not be an issue for you. black_eagle gave me this on the Kodi forums. Works perfectly.

Code: Select all
while true ; do
  pidof kodi.bin > /dev/null
  if [[ "$?" -ne 0 ]] ; then
    /usr/bin/kodi &
  fi
  sleep 30
done


I restart Kodi daily with a cronjob. Keeps it fresh. There is also a minor audio stutter that shows up after X number of days of runtime on my local MP3 collection when played. This solves the issue. I've seen this on both Ubuntu & Debian. I run this script on a cronjob to stop Kodi, and restart LightDM which restarts Kodi. You may or may not need this. For a daily restart with systemd service file, just crontab a service restart. Simple.

Code: Select all
for seconds in 30 20 10 ; do
  kodi-send --action "Notification(kodi restart in ${seconds} seconds,standby!)"
  sleep 10
done
for app in mediastart kodi openbox ; do
  for process in $(pgrep "$app") ; do
    kill "$process"
  done
done
if pgrep lightdm ; then
  sleep 2
  systemctl restart lightdm
fi


If you insist on running standalone rather than a supported way with a window manager then adjust package list accordingly.

Code: Select all
kodi kodi-eventclients-kodi-send xorg xinit dbus-x11 pulseaudio xserver-xorg-legacy


Run this and select Anybody

Code: Select all
dpkg-reconfigure xserver-xorg-legacy


Edit /etc/X11/Xwrapper.config to add the following line.

Code: Select all
needs_root_rights=yes


A systemd service file is included in the Debian installation. You will find it in /lib/systemd/system I believe. Copy it to /etc/systemd/system and edit as needed. Don't forget to enable the service.

For both standalone & with Openbox / DM create a dedicated kodi user to run as. Put this user in the audio & video groups. This should enable the sound selections in the Kodi settings. Edit /etc/lightdm/lightdm.conf.d/kodi.conf to reflect this user. For standalone adjust user in service file and run this to update the service.

Code: Select all
systemctl daemon-reload


If you want a central SQL database, I personally use MariaDB. Instructions for an SQL database can be found on Kodi's wiki - https://kodi.wiki/view/MySQL . I'm not sure if this works with MySQL but this configuration greatly increases speed of accessing the DB on MariaDB

Code: Select all
cat /etc/mysql/mariadb.conf.d/50-kodi.optimize.conf
[mysqld]

optimizer_search_depth = 1
skip-name-resolve
innodb_adaptive_hash_index = off


Start the Kodi service else start LightDM and you should be rolling.

The above will give you a fully functional base installation. I would highly recommend using an SQL DB rather than Kodi's internal DB. This allows you to share the DB with other Kodi machines in your home if you wish from the start rather than losing or having to export and import your existing DB to an SQL DB at a later date. The SQL overhead is minimal even with multiple machines accessing at the same time.

Static IP on the Kodi machine(s) would be best. This allows one to use an app on your phone / tablet as the remote. I find it more convenient than using a physical remote with Lirc - https://wiki.debian.org/NetworkConfigur ... e_manually

--------------------

The above is my accumulation of much googling and searching to optimize my setup. It has become a bit of an obsession. This is just a compiled list of (IMHO) the right way to do things, without the various inconsistencies. This is not the only way to skin this cat, but I find it to be the best way after much experimentation over a few years.

To name a few sources. Arch wiki, Debian forums, Ubuntu forums, Kodi wiki, Kodi forums, Overclock.net forums. I wish I had kept a list of all the pages I've viewed over the last few years compiling this. To many to count. Lots of reading.
jmgibson1981
 
Posts: 79
Joined: 2015-06-07 14:38

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby stevepusser » 2018-11-02 19:37

You use an Ubuntu PPA at your own risk.

2018 hardware very often needs a newer kernel and graphic libraries. This is a fact. If you don't have the exact same device and have tested it, what weight should anyone give your opinion about that? FWIW, my May 2018 Intel Coffee Lake i7-8750H laptop absolutely requires a newer kernel, mesa, and firmware than is in standard Stretch to work correctly.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Quod Libet 4.2.0, Pale Moon 28.2.0, wine-staging 3.20, GIMP 2.10.8, Liquorix kernel 4.18-22, Midori 6.0
User avatar
stevepusser
 
Posts: 10126
Joined: 2009-10-06 05:53

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby jmgibson1981 » 2018-11-02 20:31

My opinion, which is clearly worthless in your eyes is my own personal experience. Backports haven't done a damn thing for me on my hardware, even though it's older hardware. But that was the ONLY suggestion people had near as I recall. My point, if you can at least respect it, is that backports are NOT a silver bullet. You need to isolate a problem, then fix problem. In this case if Kodi isn't installed and configured correctly then you don't know what you are trying to fix. I recognize some of those errors posted above. They are due to not having xserver-xorg-legacy installed and configured correctly. It's like throwing darts in the dark, just hoping for the best. Backports while being official Debian packages do not have the testing time that stable packages have. As such, I see no need to jump straight to backports until you know you need it. I'd rather keep my systems on as many stable packages as possible personally.

*EDIT* Calling me out for using a PPA on Ubuntu is nothing more than trying to discredit sound advice. If you don't like it you don't need to post, or insult in the process. I screwed around for a couple months trying to get Debian to play nice with my hardware, backports and all and got nowhere. I went with what worked, I didn't settle for 2nd best in my case as some people do.
jmgibson1981
 
Posts: 79
Joined: 2015-06-07 14:38

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby Head_on_a_Stick » 2018-11-02 20:55

jmgibson1981 wrote:I've been running my main HTPC on Ubuntu 16.04 for awhile now.

Then why are you posting here?

jmgibson1981 wrote:I use LightDM with Openbox

Why?

Kodi works just fine without a display manager or a window manager and the OP wants a minimal system.

jmgibson1981 wrote:If you insist on running standalone rather than a supported way with a window manager then adjust package list accordingly.

Code: Select all
kodi kodi-eventclients-kodi-send xorg xinit dbus-x11 pulseaudio xserver-xorg-legacy


Run this and select Anybody

Code: Select all
dpkg-reconfigure xserver-xorg-legacy


Edit /etc/X11/Xwrapper.config to add the following line.

Code: Select all
needs_root_rights=yes


A systemd service file is included in the Debian installation. You will find it in /lib/systemd/system I believe. Copy it to /etc/systemd/system and edit as needed. Don't forget to enable the service.

^ This is shockingly bad advice, please remove it from your post.

The xserver-xorg-legacy package should not be used and is not needed, this will start Kodi just fine from a console login (I've just tested it in my Debian stretch system):
Code: Select all
startx $(which kodi)

The reason why the OP has problems is because they tried `xinit` instead of `startx`, IMO.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8169
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Purist form of Kodi on Intel NUC7CJYH - No LibreELEC

Postby jmgibson1981 » 2018-11-02 23:28

God forbid I try to help someone. Minimal yes. But most people want support for what they do, I know I do. You want to run unsupported methods, by all means. I have no vested interest. But you people are ridiculous. I have a feeling I wouldn't have gotten half this garbage if I left out the Ubuntu part of my post. Unreal. This type of crap is why people hate linux. Elitist BS nitpicking every little thing. I won't be back. Throw a party, I don't care. I've spent a couple years perfecting my deployment in every way with countless adjustments and experiments to configs to get things perfect. If that is worthless, I'm sorry I wasted your time. I won't make that mistake again, at least not here. If a mod is reading this, just close my damn account. Not worth the grief.
jmgibson1981
 
Posts: 79
Joined: 2015-06-07 14:38

Next

Return to Desktop & Multimedia

Who is online

Users browsing this forum: NHOJ and 11 guests

fashionable