Hello there,
I would recommend you to login through ssh, stop kodi service and run retroarch command using verbose flags, that should give you an idea whats is going on. I think commands involved are around this thread.
Hello there,
I would recommend you to login through ssh, stop kodi service and run retroarch command using verbose flags, that should give you an idea whats is going on. I think commands involved are around this thread.
Hello there,
You could try to copy the binary and needed libraries, maybe it would work, a few point to take in mind:
* Lakka is a branch of LibreElec, so they share the build system and most of the dynamic libraries. That is why just copying the binary works.
* It is systemd who brings down Kodi and up Retroarch, the command is run from favorites.
Sounds easy? sometimes it is, who knows, good luck!
hello schmecks,
When you run retroarch command standalone, remember firt to set up LD_LIBRARY_PATH environment variable for the shell you are using (that means to set it up any time you login back).
(I forgot to mention it before, sorry)
Something like:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/storage/retroarch/lib
Now run the command:
ldd /storage/retroarch/retroarch | grep "not found"
After copy first batch, you could see extra dependencies needed by the libraries you just copied.
I would recommend you to only copy what is not already present on LibreElec, I would prefer native OS libraries.
Another thing you could try, is to specify Lakka image "/usr/lib", in your case I think it is: "/media/root/usr/lib", so it will be something likes:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/media/root/usr/lib
And then try running ldd like:
ldd /storage/retroarch/retroarch | grep "/media"
And whatever cames from the image is what you need to copy.
Hello schmecks, give it a try copying needed libraries from Lakka image.
Check what library is needed:
ldd /storage/retroarch/retroarch | grep "not found"
Get Lakka image and mount it as step 3 on manual procedure.
Create a place to put them:
mkdir /storage/retroarch/lib
Copy them.
Add extra library path in systemd service.
vi .config/system.d/retroarch.service
Environment="LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/storage/retroarch/lib"
systemctl daemon-reload
Here I found a similar issue for some cores and fix them by this way.
I don't think so, remember that retroarch systemd service stops kodi, starts retroarch and then starts kodi back when retroarch exit.
Try something like this, it worked for me.
Create a wrapper script to handle environment variables for service.
vi /storage/retroex.sh
echo "SYSTEM=${1}" > /tmp/iagl.conf # Manual for list.
echo "ROM=${2}" >> /tmp/iagl.conf # XXROM_PATHXX
systemctl start retroarch
Make it executable.
chmod 755 /storage/retroex.sh
Change service
vi /storage/.config/system.d/retroarch.service
# Comment old exec line.
# ExecStart=/storage/retroarch/retroarch
# Add script output file with vars.
EnvironmentFile=/tmp/iagl.conf
# Customize retroarch init flags to your like!
ExecStart=/storage/retroarch/retroarch -L ${SYSTEM} ${ROM}
Remember to reload systemd
systemctl daemon-reload
When set external command for a list at IAGL, follow this pattern:
/storage/retroex.sh SYSTEM "ROM"
SYSTEM -> Whatever goes with -L indicating core to use, set it manually for that list.
ROM -> It is replaced by iagl with rom path of your choice. Note that is important to use quotes to avoid issues with white spaces.
/storage/retroex.sh fbneo "XXROM_PATHXX"
Hello there!.. Yeah, I would think so, the difference with others approaches is the use of systemd service, you could use environment variables to feed retroarch exec arguments. I preferred way I did because I could use all available emulators without need to create a new addon for missing ones.
I got it now, I will update script to 10G, thank you. One question regarding this, are you using rpi4 or another hardware?
I just tried copying and pasting your script above and it worked fine for me, weird indeed.
Hello Marxon,
Thank you very much for your feedback. I just fixed step 5 on procedure but I didn't find the same issue on the script. What is killing me is that it should have checked that you had 9G of free space, not sure why it failed..
Besides that, let me tell you there is some extra work in progress for some cores (ie: scummvm) that needs shared libraries not present in LibreElec, I already found a way to make it work, just need to put all together.
Andres.-
Hello fellas!
I was posting when this thread got suggested, I get both working together by this way:
Hope it help you too!
I have been a fan of both distros, LibreElec and Lakka, it's time to have the best of both worlds in one place, I want to have my cake and eat it too.
Teorically, this should work for all architectures, I focused on my rpi4 aarch64.
It totally can be an addon with a helper, I spent a whole day making it work this way described below, right now, I just want to enjoy it. =D
UPDATE: I realized that all tools needed were present ar LibreElec image so I wrote the script below to get it working easily.
NOTE: Keep a keyboard at hand to configure joystick first time you run it.
NOTE: Share a download directory with zachmorrris IAGL addon to get games.
NOTE: Published at: https://github.com/basilean/retroarch_install
One line install:
wget -q -O - https://raw.githubusercontent.com/basilean/retroarch_install/refs/heads/main/retroarch_install.sh | bash
DISCLAIMER: Take a time to read and understand each step, most of the commands used needs to run as root, that means you can criple your PC if done wrong.
1. Download LibreElec image and install it on an SD as usual.
NOTE: Change the image version to your like.
wget https://releases.libreelec.tv/LibreELEC-RPi4.aarch64-12.0.2.img.gz
gunzip LibreELEC-RPi4.aarch64-12.0.2.img.gz
WARNING: Make sure "/dev/mmcblk0" is the SD target. Change it yo suit you.
dd if=LibreELEC-RPi4.aarch64-12.0.2.img of=/dev/mmcblk0 bs=4M
WARNING: Be sure IO transfer is done, await for "sync" command to return.
sync
2. Boot new sd card in the target device. Once Kodi is up, just power it off, remove the card and insert it back in the PC.
NOTE: This is needed to get "storage" resized in the first boot.
3. Download Lakka image and mount it
NOTE: Change the image version to your like, just match architecture with LibeElec and try to be close on release dates.
https://nightly.builds.lakka.tv/6.x/2025-02-07/RPi4.aarch64/Lakka-RPi4.aarch64-6.x-20250207-0af7dae.img.gz
gunzip Lakka-RPi4.aarch64-6.x-20250207-0af7dae.img.gz
Create mount points.
mkdir /media/flash
mkdir /media/root
WARNING: Make sure /dev/loop0 and /dev/loop1 are the targets or change them. Command "losetup" will return assigned loop for each file.
Mount "Lakka" source (flash),
losetup --show -P -f Lakka-RPi4.aarch64-6.x-20250207-0af7dae.img
mount /dev/loop0p1 /media/flash
From there, mount "SYSTEM" source (rootfs)
losetup --show -f /media/flash/SYSTEM
mount /dev/loop1 /media/root
4. Copy retroarch Lakka components into kodi LibreElec "/storage" filesystem.
Create a mount point.
mkdir /media/storage
WARNING: Make sure "/dev/mmcblk0p2" is the SD target partition. Change it to suit you.
Mount SD card "storage" partition target.
mount /dev/mmcblk0p2 /media/storage
Copy binary (72M).
cp -a /media/root/usr/bin/retroarch /media/storage/retroarch
Copy assets (806M).
cp -a /media/root/usr/share/retroarch /media/storage/.config/retroarch
Copy cores (4.9G).
cp -a /media/root/usr/lib/libretro /media/storage/.config/retroarch/cores
LibRetro Database (684M).
cp -a /media/root/usr/share/libretro-database /media/storage/.config/retroarch/database
Filters (3M)
mkdir /media/storage/.config/retroarch/filters
cp -a /media/root/usr/share/video_filters /media/storage/.config/retroarch/filters/video
cp -a /media/root/usr/share/audio_filters /media/storage/.config/retroarch/filters/audio
WARNING: Be sure IO transfer is done, await for "sync" command to return.
sync
5. Create a retroarch systemd unit.
NOTE: kodi.conf has HOME definition used by retroarch.
vi /media/storage/.config/system.d/retroarch.service
[Unit]
Description=Retroarch
After=network-online.target graphical.target
Requires=graphical.target
Wants=network-online.target
[Service]
EnvironmentFile=/usr/lib/kodi/kodi.conf
ExecStartPre=systemctl stop kodi
ExecStart=/storage/retroarch/retroarch
ExecStopPost=systemctl start kodi
TimeoutStopSec=10
Restart=no
StartLimitInterval=0
LimitNOFILE=16384
[Install]
WantedBy=kodi.target
Display More
Reload systemd and disable retroarch service. It only is going to run when swaps with kodi.
systemctl daemon-reload
systemctl disable retroarch
6. Create a wrapper script.
vi /media/storage/retroarch.py
from xbmc import executebuiltin
from subprocess import run
executebuiltin('Notification(Retroarch, Loading..., 5000, /storage/.config/retroarch/assets/xmb/monochrome/png/retroarch.png)')
run(["/usr/bin/systemctl", "start", "retroarch"])
7. Create a shortcut in favourites
vi /media/storage/.kodi/userdata/favourites.xml
<favourites>
<favourite name="RetroArch" thumb="/storage/.config/retroarch/assets/xmb/monochrome/png/retroarch.png">RunScript(/storage/retroarch.py)</favourite>
</favourites>
8. Clear all mounted filesystems and used devices.
umount /media/storage
umount /media/root/
losetup -d /dev/loop1
umount /media/flash/
losetup -d /dev/loop0
every Youtube App uses API Keys, thats nothing new
API keys are the gold standard at those services
One thing is an api key to identified application that consumes service... this is complete different... we are talking a personal (user) key that would enable google to track your privacy (searches, videos you reproduce, etc).
This practice attempts freedom, I'm not sure why you try to make it looks as it were ok.
Hi basilean,
did you finally find a way to get youtube working without personal API keys?
I would be interessted as well!
Mat
Hey Mat,
Nope, I just quit using youtube through xbmc. I don't feel comfortable using a plugin that lets google to know about usage and link it to my user.
The answers pointing to git howto, makes it clear you have to login into google in order to create keys so really it doesn't solve my question.
I really hope this doesn't become a standard where people develops plugins that serves companies hidden interests.
Hello CvH,
Yes, I know, my point is that using a pool of share keys as it was before, they know you are using a specific app but not who you are.
So, I'm just another guy using kodi or samsung app, even so, if they created a unique serial, I just a number and not a specific person.
That is basic anonymous that I'm asking for that is not fulfilled if I create a key related to my user.
Andres.-
Hello donbrew,
What you said only applies to an android phone.
Using a browser or even on samsung tv client, I don't need to [login|create keys] to watch videos.
While probably they create a random serial to keep track and collect on both, using a VPN, I would be just another unknown, not giving them chance to relate it to my user (becoming paranoid that they are relating IP, UA, cookie and/or another method to get you).
As I stated before, it is a matter of privacy, I appreciate freedom.
Andres.-
Hello cdu13a,
Thank you for your reply but to be truth, we don't really know what google tracks and collects, actually, I think they are better ways to avoid abusing without needing personal keys.
I'm just looking for a better way than creating a fake account just for these keys.
Andres.-
Hello guys,
Like everyone, I found youtube addon is not working anymore without a registered API.
I already read this thread and I have not doubts on how to create personal keys: YouTube Plug-in Thread
I'm not a paranoid guy but kinda like my privacy so my question is:
Do I need to link these keys to a valid google account or is it a workaround to use it anonymous like in my browser?
Thank you in advance.
Andres.-
Hello guys,
Libretro stop working, I'm just getting logs:
ERROR: Add-on 'game.libretro' is not compatible with Kodi
I tried removing "import" lines on addon.xml just to try something but no luck.
I'm using latest: #0203, 03-Feb-2020 but I noticed this few months back.
Any advice or hack to make it work again?
Thank you in advance.