v19 Notes on compiling v19 alpha on the Raspberry Pi 4+ and Raspbian Buster.
#76
@flos06 have you added these lines to config.txt ?
Code:
dtoverlay=vc4-kms-v3d,cma-256
dtoverlay=rpivid-v4l2
Reply
#77
(2021-03-07, 17:32)asavah Wrote: @flos06 have you added these lines to config.txt ?
Code:
dtoverlay=vc4-kms-v3d,cma-256
dtoverlay=rpivid-v4l2

Yes I have, I was on raspberry pi os 32 bit and used rpi-update to get to kernel 5.10.

Currently I am trying 64 bit and compiling the kernel myself from github /Linux the rpi 5.10.y branch.

I am not 100% sure if what I did the first time with rpi-update was correct? Also not sure if what I am doing right now is the way to go or if I have to use some kernel tweaks?
Reply
#78
Also is it okay to use sudo apt-get full-upgrade after the kernel update? It seems to do a lot of stuff for 5.4

(I am relatively new to all this but I love learning and trying these things out but clearly I am doing something wrong here)
Reply
#79
one more possibility which would be a true facepalm. After installing I booted up kodi using simply the command kodi. Am I supposed to boot it using kodi-gbm? I would think it would not make a difference since I've builded for gbm but maybe?
Reply
#80
last post for a while because I'm clogging up the forums. I've figured out from my logs that I am indeed running kodi-gbm by simply running kodi. Another thing which may be a problem is that I am running raspberry pi OS Lite. Should I be using full? I have no need for a desktop environment or anything and figured if I installed all the dependencies it would be fine.

(really annoying that I can't edit my posts why is that?)
Reply
#81
(2021-03-08, 12:29)flos06 Wrote: (really annoying that I can't edit my posts why is that?)

It's because you're a newbie account. It's a generic board anti-spam measure as we get too many bots coming in and posting innocuous/random stuff and then coming back later to drop their payloads via the edit function.

Once sufficient criteria relating to posts and account age are met, the account will automatically upgrade and be granted new privs, including post editing.

But to save any further annoyance, you should now be able to make edits.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#82
Well this has been a rollercoaster! 
I tried finding the raspberry Pi guide to compile V19 final myself - one of my devices had auto updated (my android mobile), so I wanted to get my server updated (Pi 4). 

tl;dr: popcornmix branch, gbm build - using the guide on page 5 of this thread, use raspi-config to change to boot to console(brief explainer here and "auto-starting kodi at boot" here - I haven't done the autostart yet, but that helped me figure out I need to turn off the desktop), db migration didn't work so used mysql_upgrade (as is, using kodi user/pass. No idea what it actually did). Success!

I really think there needs to be a raspberry pi guide, or at least a mention on the linux page, to cover the various intricacies. 

Before finding this thread, I jumped in to the linux guide, managed to compile the X11 version but failed to launch ("Unable to create GUI"). 
So I tried the gbm version, and it was about 6 compiles ago so I can't remember what happened - I think there was either errors, or nothing (instant quit). I didn't think to check logs at the time 🤦‍♂️

Anyway, the guide on page 5 really helped too. I'd stumbled across some of the "-DENABLE" flags myself, and the others helped me over the line. 

I used the popcornmix fork, compiled the gbm version, but couldn't get it to appear on my TV (I don't have a keyboard or mouse connected so I'm doing everything via SSH). 
It wasn't until I tried a fresh install of Raspberry Pi OS for testing and ran my previously-compiled gbm kodi, that I realised it was actually running, but it just wasn't visible on the TV. I heard a kodi notification sound, even though I couldn't see anything but the Pi desktop/login. 

A bit more googling and I found my answer on a Pi forum, to do with the desktop outputting, so Kodi can't output because it needs the display to itself, and the desktop is using it. 
So a quick raspi-config tweak and switch to boot to console, not desktop, and now I can see kodi!

Database migration/upgrade didn't work though. MariaDB version is 10.3 - not sure if that matters. 
I could see in the logs that it attempted the migration on first run. I can see the MyVideos119 and MyMusic82 databases on mysql/mariadb. Those contained all my media. 
kodi still displayed an empty library. 
Some googling pointed me to threads on this forum, and others had the issue and resolved it by running mysql_upgrade. After giving up remembering root password and using the kodi username I'd created back on V18, it worked! Everything completed with "OK", it just couldn't output a log of what it did. 
A kodi launch later, and my library is there and full and complete! It fully updates as far as I can tell (resume position, new things added/found, stuff gets removed, and it does it on the mysql database and I can see those changes on other devices). 
This is an "old" log from one of the launches with a blank library, after first-run. I didn't catch the first run log. Also hadn't enabled debugging. Not sure how useful this will be. 
https://pastebin.com/3TWidPLs
Database stuff starts at: 2021-03-09 03:47:17.508 
If needed, I can probably re-create the issue by dropping my 119 and 82 databases, and running kodi on my fresh Raspberry Pi OS install. 

Happy days! 
Sorry for the story - I added a tl;dr at the top. 
All of this made me finally fit a fan to my Pi case - those compiles really dragged on after the 3rd or 4th attempt and constant 80C+ temperature. I think my USB Hard drive is dying now too, it keeps making a whining noise. Or there's a power issue from all the heat. Oops. Shame I didn't fit the fan before all this.
Reply
#83
Hi I've built both, the x11 works but cannot exit, when i either close the window or use the power in the gui it freezes and has to be killed.  otherwiese it is ok for most but h265 doesnt work (but i think it isnt supposed to yet) 

I tried the gbm version and it builds after finding some missing dependencies.  however the bbuild wont start from ./kodi-gbm it gives the "ERROR: Unable to create GUI. Exiting
Segmentation fault

after searching ive updated the user and put pi in the various groups, added the extra 2 lines in config.txt.  set enough graphics ram and all the bits i can find on web searches to check...

where is a log to see what is faulting when i try to run the build?

this is on pi4 8gb buster10.10
Reply
#84
(2022-01-15, 13:54)labtopia Wrote: I tried the gbm version and it builds after finding some missing dependencies.  however the bbuild wont start from ./kodi-gbm it gives the "ERROR: Unable to create GUI. Exiting
Segmentation fault
gbm can't run with desktop running. You can switch VT away from X (e.g. ctrl-alt-F3) and then launch it (or boot to console).
Kodi in the rpios repo will have a launcher script to do this for you.
Reply
#85
has this script already been written? kodi-gbm works fine for me on rpi4 buster if i boot to console. thanx for the nice work at this point.
i would be able to flexibly switch in between kodi and desktop without rebooting though. Is there a good guid to that?
Reply
#86
(2022-07-20, 14:21)bendsch Wrote: has this script already been written? kodi-gbm works fine for me on rpi4 buster if i boot to console. thanx for the nice work at this point.
i would be able to flexibly switch in between kodi and desktop without rebooting though. Is there a good guid to that?
Yes. The script, if you are running on RPiOS bullseye, is /usr/bin/kodi.
If you grep that for "chvt" you can confirm it has support for switching VT if deskop is running.

You can read here for the history behind the build and launcher script.
Reply
#87
(2022-07-21, 16:27)popcornmix Wrote:
(2022-07-20, 14:21)bendsch Wrote: has this script already been written? kodi-gbm works fine for me on rpi4 buster if i boot to console. thanx for the nice work at this point.
i would be able to flexibly switch in between kodi and desktop without rebooting though. Is there a good guid to that?
Yes. The script, if you are running on RPiOS bullseye, is /usr/bin/kodi.
If you grep that for "chvt" you can confirm it has support for switching VT if deskop is running.

You can read here for the history behind the build and launcher script.
thank for the reply, i built the gdm-version so i guess for me it's /usr/local/bin/kodi. i figured i was using it already without really being aware what it does (thought it was the executable binary).

i wrote myself a systemd unit file and it works so far but i wanted to know, wether or not there was a better way of gracefully stopping kodi. for now the only way of stopping it i found was sending a killall command. could you have a look at it?
Quote:[Unit]
Description = Kodi Media Center
After = remote-fs.target network-online.target
Wants = network-online.target

[Service]
User = pi
Group = pi
Type = simple
TTYPath=/dev/tty3
Environment=WINDOWING=gbm
ExecStart = /usr/local/bin/kodi-standalone
ExecStop = //usr/bin/killall --user pi --exact --wait kodi-gbm
#ExecStart = /usr/bin/kodi-standalone
Restart = on-abort
StandardInput=tty
RestartSec = 5

[Install]
WantedBy = graphical.target
 
cheers,
bendsch
Reply
#88
You may be able to send an RPC command (e.g. Application.Quit).
Reply
#89
perfekt, thanx a lot. my unit file looks like this now:
Quote:[Unit]
Description = Kodi Media Center
After = remote-fs.target network-online.target
Wants = network-online.target

[Service]
User = pi
Group = pi
Type = simple
TTYPath=/dev/tty3
Environment=WINDOWING=gbm
ExecStart = /usr/local/bin/kodi-standalone
ExecStop = /usr/bin/curl -X POST -H "content-type:application/json" http://localhost:9191/jsonrpc -d '{"jsonrpc":"2.0","method":"Application.Quit"}'
Restart = on-abort
StandardInput=tty
RestartSec = 5

[Install]
WantedBy = graphical.target
   on exit i get several messages and warning about python scripts interrupted by user or failed to stop but the application is closing. i guess they have been there before though ...
Quote:2022-07-25 19:14:39.274 T:2552  WARNING <CWebserver[9191]>: invalid response data with range start at 1 and end at 0
2022-07-25 19:14:39.285 T:2406     INFO <general>: Stopping player
2022-07-25 19:14:39.285 T:2406     INFO <general>: Storing total System Uptime
2022-07-25 19:14:39.285 T:2406     INFO <general>: Saving settings
2022-07-25 19:14:39.298 T:2406     INFO <general>: Saving skin settings
2022-07-25 19:14:39.299 T:2406     INFO <general>: Stopping all
2022-07-25 19:14:39.300 T:2406     INFO <general>: ES: Stopping event server
2022-07-25 19:14:39.300 T:2406     INFO <general>: stopping zeroconf publishing
2022-07-25 19:14:39.304 T:2406     INFO <CWebserver[9191]>: Stopped
2022-07-25 19:14:40.126 T:2478     INFO <general>: ES: UDP Event server stopped
2022-07-25 19:14:40.129 T:2406     INFO <general>: stop dvd detect media
2022-07-25 19:14:40.134 T:2406     INFO <general>: CServiceAddonManager: failed to stop inputstream.ffmpegdirect (may have ended)
2022-07-25 19:14:40.135 T:2470     INFO <general>: CPythonInvoker(1, /home/pi/.kodi/addons/plugin.video.youtube/resources/lib/startup.py): script successfully run
2022-07-25 19:14:40.602 T:2470     INFO <general>: Python interpreter interrupted by user
2022-07-25 19:14:41.102 T:2471     INFO <general>: CPythonInvoker(2, /home/pi/.kodi/addons/script.common.plugin.cache/resources/lib/entry_point.py): script successfully run
2022-07-25 19:14:41.486 T:2471     INFO <general>: Python interpreter interrupted by user
2022-07-25 19:14:41.586 T:2472     INFO <general>: CPythonInvoker(3, /home/pi/.kodi/addons/script.cu.lrclyrics/default.py): script successfully run
2022-07-25 19:14:41.979 T:2472  WARNING <general>: CPythonInvoker(3, /home/pi/.kodi/addons/script.cu.lrclyrics/default.py): the python script "/home/pi/.kodi/addons/script.cu.lrclyrics/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon9xbmcaddon5AddonE,N9XBMCAddon7xbmcgui6WindowE
2022-07-25 19:14:41.990 T:2472     INFO <general>: Python interpreter interrupted by user
2022-07-25 19:14:41.993 T:2473     INFO <general>: [script.tubecast] ssdp: Stopping SSDP server
2022-07-25 19:14:42.091 T:2473     INFO <general>: CPythonInvoker(4, /home/pi/.kodi/addons/script.tubecast/main.py): script successfully run
2022-07-25 19:14:42.360 T:2473     INFO <general>: Python interpreter interrupted by user
2022-07-25 19:14:42.543 T:2474     INFO <general>: CPythonInvoker(5, /home/pi/.kodi/addons/script.xbmcbackup/service.py): script successfully run
2022-07-25 19:14:42.802 T:2474     INFO <general>: Python interpreter interrupted by user
2022-07-25 19:14:42.802 T:2475     INFO <general>: CPythonInvoker(6, /home/pi/.kodi/addons/service.takealug.epg-grabber/service.py): script successfully run
2022-07-25 19:14:42.968 T:2475     INFO <general>: Python interpreter interrupted by user
2022-07-25 19:14:42.968 T:2406     INFO <general>: CServiceAddonManager: failed to stop service.xbmc.versioncheck (may have ended)        
Reply

Logout Mark Read Team Forum Stats Members Help
Notes on compiling v19 alpha on the Raspberry Pi 4+ and Raspbian Buster.0