Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility of Kodi 18 / Leia? #13

Open
whatsnewsisyphus opened this issue Oct 8, 2017 · 42 comments
Open

Possibility of Kodi 18 / Leia? #13

whatsnewsisyphus opened this issue Oct 8, 2017 · 42 comments
Assignees

Comments

@whatsnewsisyphus
Copy link

Any chance of working with Kodi 18? (DRM would allow Netflix) Let me know if you need testers.

@Saiyato
Copy link
Owner

Saiyato commented Oct 9, 2017

This is possible, but I'm going to need a ppa in order to test, because I can't compile the package myself.

@SCiunczyk
Copy link

You can count on me with tests as well.

@whatsnewsisyphus
Copy link
Author

@Saiyato you mean this ppa?

@Saiyato
Copy link
Owner

Saiyato commented Oct 9, 2017

@whatsnewsisyphus Unfortunately no, that ppa is for Ubuntu, we're going to need a Debian ppa (with armhf packages). I've tried and failed to compile Kodi myself in the past, so I'm pretty sure it will take me at least hours and hours of trying before I see any progress, hence the need for a ppa ;)

@whatsnewsisyphus
Copy link
Author

whatsnewsisyphus commented Oct 9, 2017

Would osmc packages or LibreELEC packages help?

@Saiyato
Copy link
Owner

Saiyato commented Oct 10, 2017

I have looked at this in the past, but I'm not sure I can just install those... I have to investigate.
The problem with those packages is ease of use, a ppa allows me to just update and install, custom packages at various locations do not ;)

I'm working on a different plugin now which is nearing alpha status, after that I'm continuing the LCD plugin. So it might take some time before I'm able to test this.

@whatsnewsisyphus
Copy link
Author

whatsnewsisyphus commented Oct 10, 2017 via email

@SCiunczyk
Copy link

Knock knock. Is the project still alive ?

@Saiyato
Copy link
Owner

Saiyato commented Feb 17, 2018

Sure, but I haven't found a ppa hosting stable Leia

@SCiunczyk
Copy link

The Kodi 18 Leia (beta) is available for download ... except RPi :-( so maybe in near future ....

@Christopher-Peterson
Copy link

The Kodi wiki now lists a backport of Kodi 18 for Debian Jessie:

# kodi repos
# starting with debian jessie, debian provides kodi via its backports repository
# remember: those packages are not supported by team kodi
deb http://http.debian.net/debian jessie-backports main

Kodi Leia still doesn't appear to be available in the official Raspbian repos, though.

@biva
Copy link

biva commented Feb 23, 2019

Now that it's officially released, would it be easier to update your plugin to Kodi 18?

@strowi
Copy link

strowi commented Mar 8, 2019

As far as i can see, there are only repos for kodi18 on strech, but not for jessie (which is, what vollumio is currently using). So someone would have to create a debian package for it..

@Saiyato
Copy link
Owner

Saiyato commented Oct 7, 2019

Or, move towards Stretch if not Buster, which would make it easier to install other apps in the future. Same applies to wanting Kodi to work on RPi 4's, that only works on Buster.

@Rhapsody02
Copy link

Speaking of the RPi 4B, any progress toward its support, please?
From volumio/Build#388 it seems it might be already possible.

Appreciate your efforts on this!

@Saiyato
Copy link
Owner

Saiyato commented Feb 8, 2020

Hi @Rhapsody02 , if you're running Buster, you should be good. If not, you will have to either wait for stable Buster or compile it yourself on Jessie I'm afraid.

@ashthespy
Copy link

@Saiyato just a heads up/question for when you find the time - Any tips for kovzol from over at the forums to get Kodi working on Volumio Buser?

@Saiyato
Copy link
Owner

Saiyato commented Mar 4, 2020

Evening,

Just patched it on GH, first tests on a Pi2 with Buster fail... Feel free to test on a Pi4, I will test my Pi3 when I get the time.

@mike42smith
Copy link

@Saiyato I tested Kodi 18.6 Leia on a Raspberry Pi 4 4G based on the default raspbian / debain repo successfully. Details on the Volumio forum: Volumio Debian Buster Beta - Raspi images debugging

Could you update your Kodi plugin that the pippleware repo will not added if the armv71 arch and Buster distro is detected, because it seems to be unnecessary in this case.

Additional the path /opt/vc/bin has to be added to PATH environment. I did it globally by following:

sudo tee -a /etc/profile.d/vc-fix.sh > /dev/null <<EOT #set PATH so it includes VC bin if it exists if [ -d "/opt/vc/bin" ] ; then PATH="/opt/vc/bin:$PATH" fi EOT

Further the following line has to be added to /boot/userconfig.txt in order to start Kodi on Buster:
echo "dtoverlay=vc4-fkms-v3d" >> /boot/userconfig.txt

In order to install Kodi from repo the package raspberrypi-kernel is required. Therefore backup the default Volumio apt preferences to restore it during uninstalling the Kodi package:
mv /etc/apt/preferences.d/raspberrypi-kernel /etc/apt/preferences.d/raspberrypi-kernel.kodi.bak

However, the autostart at boot time does not work yet.

Finally, I not sure about the groups where the user might be included. Ashthespy on Volumio forum suggested to add the user also to the netdev group. Could this be neseccary if Kodi is going to connect network resources?

Thanks for your effort. :-)

@ashthespy
Copy link

ashthespy commented Apr 29, 2020

Additional the path /opt/vc/bin has to be added to PATH environment. I did it globally by following:

sudo tee -a /etc/profile.d/vc-fix.sh > /dev/null <<EOT #set PATH so it includes VC bin if it exists if [ -d "/opt/vc/bin" ] ; then PATH="/opt/vc/bin:$PATH" fi EOT

I'll fix this in the next build, until then you could try export LD_LIBRARY_PATH=/opt/vc/lib/:$LD_LIBRARY_PATH which might also be required.

EDIT: I peek at raspbian to see how they do it, and they just add symlinks to required binaries. Maybe something like this would suffice for us?

[ -f /opt/vc/bin/vcgencmd ] && alias vcgencmd="LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/vc/lib /opt/vc/bin/vcgencmd"
[ -f /opt/vc/bin/tvservice ] && alias tvservice="LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/vc/lib /opt/vc/bin/tvservice"

Finally, I not sure about the groups where the user might be included. Ashthespy on Volumio forum suggested to add the user also to the netdev group. Could this be neseccary if Kodi is going to connect network resources?

Should also check if cdrom and tty are really required..

@mike42smith
Copy link

If I use the suggested approach I still get error messages:
/usr/bin/kodi: 48: /usr/bin/kodi: tvservice: not found
/usr/bin/kodi: 62: /usr/bin/kodi: tvservice: not found
However Kodi gui starts.
I haven't checked it on Raspbian yet.

@Saiyato
Copy link
Owner

Saiyato commented Apr 30, 2020

Hi all,

Just tried installing manually on my Pi4 (had to switch, because it's my movie Pi), it's all good when installing from the default ppa. No need for the pipplware ppa, which is good news. Great find!

A few notes, @mike42smith I think you forgot the 'mapping egl libraries' part, this takes care of vcgencmd mapping, no vc-fix.sh required. This will auto-add it to the $PATH env

What I didn't do yet:

  • update the script obviously, because we're in the testing phase (I will create a new branch)
  • set autostart; this is done by the plugin, not the unit file, otherwise it's harder to disable autostart
  • fix the tvservice error, this was always the case and I never had any problems (or issues mentioned on GH)

Note that I can call tvservice from the cli:

volumio@volumio4:~$ tvservice -s
state 0xa [HDMI CUSTOM RGB lim 16:9], 1920x1080 @ 50.00Hz, progressive

PS: Yes running a 4k movie on my test setup (1080p monitor), this should have Kodi downscale to full HD (which, I think, should be extra heavy). So if it runs like this... it should run on my telly.

It's playing a 4k movie now, let's see if it finishes without problems ;)

Testscript:

  • install kodi
  • set resolution
  • add share (NFS)
  • scrape movies (install universal scraper -> i.e. add-on installation is working)
  • play 4k movie
  • adjust audio settings (passthru)
  • enable subtitles

@ashthespy
Copy link

Neato, will it also "Just work" for the pi3?

If I use the suggested approach I still get error messages:
/usr/bin/kodi: 48: /usr/bin/kodi: tvservice: not found
/usr/bin/kodi: 62: /usr/bin/kodi: tvservice: not found

Note that I can call tvservice from the cli:

FWIW, the tvservice is already wrapped up with an alias in /etc/bash.bashrc, hence is available from the interactive shell:

volumio@volumio:~$ grep tvservice /etc/bash.bashrc -C 3
alias service="sudo /usr/sbin/service"
alias ifconfig="sudo /sbin/ifconfig"
# tv-service
alias tvservice="/opt/vc/bin/tvservice"
# vcgencmd
alias vcgencmd="/opt/vc/bin/vcgencmd"

But kodi.sh launch script will need it in $PATH, as the aliases won't be expanded by default

Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt (see the description of shopt under SHELL BUILTIN COMMANDS below).

@Saiyato
Copy link
Owner

Saiyato commented Apr 30, 2020

Quick update:

The tvservice error had to do with running kodi as a different user from /usr/bin and with the standalone argument. I fixed this by symlinking /opt/vc/bin/tvservice to /usr/bin/tvservice (see latest commit in branch Buster. I believe this is what you are saying in different words as well :P

As for the Pi3... not sure yet, will test after I get this branch up-and-running nicely for the Pi4. The Pi3 should still use Jessie for now ;) (or accept things might not work as intended).

To be continued...

@Saiyato Saiyato self-assigned this Apr 30, 2020
@mike42smith
Copy link

Thanks Saiyato.

What I didn't do yet:

  • update the script obviously, because we're in the testing phase (I will create a new branch)

Let me make some comments to your script :-)

  • If you update your script further I would suggest to exclude the GPU memory update part for Raspberry Pi 4 because it seems not to be necessary anymore because of the integrated Memory Mangement Unit (MMU) Details
  • I guess the line 101 (rm /etc/ld.so.conf.d/00-vmcs.conf) is also not necessary because of line 102
  • Could you imagine to avoid loading files like source.xml from another server (e.g. raw.githubusercontent.com) because not everybody would like to have this automatically on its disk. If it is not that much work I would prefer to get the possibility to add sources in the plugin config web frontend on Volumio like the GPU memory settings are implemente now. That would be offer a more liberal solution. ;-)
  • Unfortunately I am also a little bit unhappy about the guisettings.xml what is downloaded the same way because it is not really transparent what settings are included by default with this file.

Sorry, I am not very familiar with the Volumio environment. But I will help if needed and I can. :-)

@Saiyato
Copy link
Owner

Saiyato commented May 1, 2020

Hi @mike42smith

  • For the gpu_mem part, the Volumio default is 32M, which causes crashes (at least when playing 4k content), just tested this. So we need a different value (64 and 128 are also not working: [vc_sm_ioctl_alloc]: failed to allocate memory on videocore (status: 0, trans_id: 23))
  • I will test line 101, I believe it should indeed overwrite the file ;) good call
  • I omitted the guisettings (outdated anyways) and sources (also outdated and I don't use em anymore)

@Saiyato
Copy link
Owner

Saiyato commented May 1, 2020

Update on the memory part, LibreElec (a trusted source imho) states 320M is necessary for (some) 4k playback; see post

Default GPU memory split - at least 288M is needed for some 4k HEVC files

Which is an advise I followed earlier and it worked perfectly, 192M still has choppy playback, going to try 244M after which I will decide on 244M or 320M

@Saiyato
Copy link
Owner

Saiyato commented May 1, 2020

A few reboots later, set gpu_mem to 320M and the errors in the logs disappeared, 244M still showed the same allocation errors (and had choppy playback).

So I'm going to update gpu_mem_1024 to 320 (was 256).

@mike42smith
Copy link

@Saiyato: Some additional feedback to the install.sh in the Buster branch.
Are there any reasons that 'Configuration' is written in the path with a capitalized 'C' in lines 82-89?
There might also be a typo in line 89 where is 'Kodi' starts with a capitalized 'K'.
I have lowercased it in my test environment successfully.
Further I would place the systemd unit into /lib/systemd/system/ instead of /etc/systemd/system/ (line: 137). Or does this cause any problem within the volumio update process?
Finally the lines 100-101 might not be necessary in this kind because the file is already placed within the Kodi installation process. (however without trailing slash)

If you add a possibility to activate and deactivate Kodi autostart in the Volumio web frontend, could you also add a function to activate the Kodi webserver in the settings. Otherwise the user needs a addional keyboard to activate it and so the possibility to use a smartphone app to control directly.

Thanks :-)

@Saiyato
Copy link
Owner

Saiyato commented May 5, 2020

Hi @mike42smith ,

Just amended most of the above, herewith my comments:

  • restructured the kodi mapping (capitalization inconsistencies)

  • The unit file is just a service description, according to the FHS (since it's system-wide) it should reside in either /lib/systemd/system or /etc/systemd/system, the latter if you're going to change its contents. Either way should be fine, other plugins use /etc/systemd, for uniformity within the (eco)system I'd like to keep it in /etc/systemd/system. But feel free to configure when and where necessary.

  • I will check the existence of

00-vmcs.conf

in my next test run ;)

  • The webserver settings are already in the plugin, just need to amend to the new config file standards (namespaces have been added) and test :)

@Saiyato
Copy link
Owner

Saiyato commented May 6, 2020

@ashthespy it works on both my Pi2 and Pi3B+, as well as on the Pi4 obviously ;)
Naturally 4k is only supported on Pi4 models and HVEC depends on compression. 'Simple' 1080p works perfectly on all three platforms (Pi2, 3B+ and 4).

The thing that remains is patching the plugin itself (index.js) and deciding what we want to do with the disabled APT pinning.

@Saiyato
Copy link
Owner

Saiyato commented May 6, 2020

@mike42smith 00-vmcs.conf is indeed written when installing the package from the default PPA, I made the creation of it conditional.

As said in my previous comment, the plugin needs a refresh, because the settings-file structure changed as of Kodi Leia.

@ashthespy
Copy link

ashthespy commented May 6, 2020

@ashthespy it works on both my Pi2 and Pi3B+, as well as on the Pi4 obviously ;)
Naturally 4k is only supported on Pi4 models and HVEC depends on compression. 'Simple' 1080p works perfectly on all three platforms (Pi2, 3B+ and 4).

That is great! I didn't bother getting further with a buster build for the pi0 as node12 has dropped official support for armv6l. They still provide "unofficial" build though, but does it even make sense to run Kodi on a Pi1/Zero?

The thing that remains is patching the plugin itself (index.js) and deciding what we want to do with the disabled APT pinning.

I could just include libcec4 into the build by default, so the kernel pinning should be sidestepped..
EDIT: Done in Raspberry Pi Volumio-3.007-2020-05-18-pi

@mike42smith
Copy link

@Saiyato Just a tiny request: Would you be so kind and remove the name of the Kodi version (Krypton) of the package.json file in line 12 (in the Buster branch). Otherwise it might be confusing for Buster users expecting Kodi Leia.
Thanks :-)

@tmsy1
Copy link

tmsy1 commented Jul 8, 2020

Hi Saiyato,
I am using your Plugin since the very beginning on RPi3 and it is working like a charm. Thanks so far for your work! Really appreciated!

Now I realize that some kodi plugins were not supported anymore with krypton and require Leia. So I am interested if you still plan to get Leia working with Pi3? I am happy to support with testing!

All the best!

@chluyten
Copy link

chluyten commented Oct 25, 2020

The plugin from branche buster installed on Buster ( the 2020-08-21, version 0.010
Raspberry Pi Volumio-3.010-2020-08-21-pi)

The following message appears during installation: /usr/local/bin/volumio: line242: /usr/local/bin/node: No such file or directory

Seems to be working fine except the TV remote does not work. I can use the keyboard (logitec k400 plus).

Do you know what to do to make the remote work?
Thank you in advance, nice plugin for volumio:)

@ashthespy
Copy link

ashthespy commented Oct 25, 2020

The plugin from branche buster installed on Buster ( the 2020-08-21, version 0.010
Raspberry Pi Volumio-3.010-2020-08-21-pi)

The following message appears during installation: /usr/local/bin/volumio: line242: /usr/local/bini/node: No such file or directory

This is probably cause it's still looking for the node binary at the legacy path.
Try where node to figure out the new path and either fix the volumio script, or symlink to the legacy path..

@chluyten
Copy link

chluyten commented Oct 26, 2020 via email

@Saiyato
Copy link
Owner

Saiyato commented Oct 27, 2020

Just tested a bit, this should work (for now) sudo ln -s /usr/bin/node /usr/local/bin/node

Note that I have not tested a lot, just a quick test to verify volumio plugin install works afterwards, which seems to be the case. I was able to install the DUO plugin (and had to recompile for Buster for the libraries to work).

@chluyten
Copy link

I test it, ( sudo ln -s /usr/bin/node /usr/local/bin/node)
this is the result:
This command will install the plugin on your device

Compressing the plugin
Plugin succesfully compressed
/bin/mv: target '/tmp/plugins/kodi.zip' is not a directory
child_process.js:650
throw err;
^

Error: Command failed: /bin/mv *.zip /tmp/plugins/kodi.zip
/bin/mv: target '/tmp/plugins/kodi.zip' is not a directory

at checkExecSyncError (child_process.js:607:13)
at execSync (child_process.js:647:13)
at install (/volumio/pluginhelper.js:689:9)
at Object.<anonymous> (/volumio/pluginhelper.js:751:9)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)

@Saiyato
Copy link
Owner

Saiyato commented Nov 11, 2020

I think you need to install the nodes, what have you done exactly? I can advise you to use the plugin helper repo as a reference (link: https://github.com/Saiyato/volumio-plugin-helper)

It's very likely you need to run npm i in the directory first, to solve all nodeJS deps. ;)

@chluyten
Copy link

kodi 18.7 is installed, i think without nodes (want de afstandsbediening van TV werkt nog niet)

(ik heb een map gemaakt en volumio-kodi-plugin-Buster er in gezet, deze geïnstalleerd met volumio plugin install en dan kreeg ik meldingen in het bovenstaand scherm
Nu ga ik die run eens proberen.
Mijn doel is volumio op rpi3B+ te zetten met versie kodi leia om dan volgende addons (vrtnu, vier,..) te installeren in kodi)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests