Author Topic: Adding attract mode to lakka  (Read 7961 times)

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Adding attract mode to lakka
« on: March 16, 2017, 05:11:20 PM »
Attract mode has been added to retropie. Well, I am currently using lakka outputting 240p to my wonderful family room crt via component. ;D

I’d like to continue to use lakka as its the official libretro/retroarch dirstro. Setting it up was easy as pie (no pun intended), and a bug I found was even resolved in like two days. But how can I add attract mode? I started a thread here on the lakka forums.

Here was the suggestion:

Quote from: shanti
Don't have a Pi but this might work for you.

use a USB drive or use samba share and put the Attract mode binary and its needed libs inside a writable folder (like /storage/attract or something) you can find what libs are needed by running "ldd attract"

SSH to your Lakka PI and test that is works by running

systemctl stop retroarch
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib ./storage/attract/attract

if it loads then edit/create an autostart.sh file inside /storage/.config:

nano /storage/.config/autostart.sh

put something like this inside:

(
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib
./storage/attract/attract
) &

Now reboot and if everything is correct, attract should start at boot.

Attract mode has a .deb and can compile from source. I don’t even know what to do. Can some one here point me in the right direction? I am able to ssh to the unit from my mac. Side note, I am getting 240p, but I still have tearing.

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
Re: Adding attract mode to lakka
« Reply #1 on: March 17, 2017, 11:10:07 AM »
composite or component?  :o




keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Adding attract mode to lakka
« Reply #2 on: March 17, 2017, 11:17:49 AM »
composite or component?  :o

Composite. Sorry, I mix them up often. Name is so similar. I don't even realize I do it.

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 307
    • View Profile
Re: Adding attract mode to lakka
« Reply #3 on: March 17, 2017, 11:49:26 AM »
composite or component?  :o

Composite. Sorry, I mix them up often. Name is so similar. I don't even realize I do it.

just making sure. :)

I'm not familiar with lakka and the forum wasn't working for me.
does it do read only file system?

« Last Edit: March 17, 2017, 11:52:43 AM by nitrogen_widget »

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Adding attract mode to lakka
« Reply #4 on: December 13, 2018, 09:08:37 AM »
Well, I have done what was discussed in the forum of lakka and what keilmillerjr tells us.

I copy attract executable and the rest of the application in /storage/attract

After doing ldd attract, i get 27 libraries. I copy them all in /storage/attract/lib/

Code: [Select]
ld-linux-armhf.so.3
libarmmem.so
libasound.so.2
libavcodec.so.58
libavformat.so.58
libavutil.so.56
libbcm_host.so
libbrcmEGL.so
libbrcmGLESv2.so
libbsd.so.0
libc.so.6
libdl.so.2
libexpat.so.1
libfontconfig.so.1
libfreetype.so.6
libgcc_s.so.1
libjpeg.so.62
libm.so.6
libmmal_core.so
libmmal_util.so
libmmal_vc_client.so
libopenal.so.1
libpng16.so.16
libpthread.so.0
librt.so.1
libsfml-graphics.so.2.4
libsfml-system.so.2.4
libsfml-window.so.2.4
libsndio.so.6.1
libstdc++.so.6
libswresample.so.3
libswscale.so.5
libudev.so.1
libvchiq_arm.so
libvcos.so
libvcsm.so
libz.so.1


and

Code: [Select]
systemctl stop retroarch LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib ./storage/attract/attract
And he answers the error message of the image. Has anyone achieved anything else?
Nacer a los 15 años Una novela de iOtero

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1273
    • View Profile
Re: Adding attract mode to lakka
« Reply #5 on: December 13, 2018, 10:22:36 AM »
Code: [Select]
systemctl stop retroarch LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib ./storage/attract/attract

This is two different lines/commands...
Code: [Select]
systemctl stop retroarchand
Code: [Select]
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib ./storage/attract/attract
To join commands in Linux you can use a semicolon
Code: [Select]
systemctl stop retroarch; LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib ./storage/attract/attract
I don't know if this will help but it's at least part of your issue.

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Adding attract mode to lakka
« Reply #6 on: December 13, 2018, 01:18:28 PM »
Progets, thanks for the help, I had not noticed, but it still does not work, now it gives error 127.

It seems to say that attract is not, but if it is and with permissions rwxr-xr-x, i do not know if they are enough.

The attract binary i got from a compilation i made myself in Raspbian Stretch.

The main problem is that lakka is based on openELEC, and this is intended only to run kodi and nothing but kodi, although they have managed to get the lakka retroarch, so commands like apt-get do not work.
« Last Edit: December 13, 2018, 01:24:50 PM by iOtero »
Nacer a los 15 años Una novela de iOtero

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Adding attract mode to lakka
« Reply #7 on: December 15, 2018, 10:01:43 AM »
Code: [Select]
systemctl stop retroarch LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib /storage/attract/attract
Without “.” runs, and attract mode shows in pi.

But, this:
Code: [Select]
(export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib /storage/attract/attract) &
in /storage/.config/autostart.sh

not boot with attract mode, only shows retroarch.

Apparently in lakka there is a retroarch-autostart.service that prevents autostart.sh from running and keeps always running retroarch, if you execute the option of the retroarch menu Quit Retroarch, that service activates it again. The problem is that I have no idea how to prevent that service from being launched when starting lakka.
« Last Edit: December 15, 2018, 12:04:29 PM by iOtero »
Nacer a los 15 años Una novela de iOtero