Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 508
  • 509
  • 510(current)
  • 511
  • 512
  • 553
Linux ChromeBox Kodi E-Z Setup Script (LibreELEC/Linux+Kodi) [2017/02/21]
It took a bit to find it, but I'm very happy to see this thread is still alive and well!

I bought my Asus Chromebox-M004U in late 2014, installed v3.5 or 3.6 from the OP and haven't messed with it since except for updating versions of Kodi. I did install XBMCbuntu at the time, and I've had to do a few rounds of `apt-get update ...` and `apt-get upgrade...` to keep both Ubuntu and Kodi up to date.

I'm currently running Ubuntu 14.04.5 LTS and Kodi 17.3. Around the time that I upgraded to Kodi 17, I noticed that many times when I'm navigating my video files (I have TV shows & Movies in libraries, but watch a lot of sports that are just sorted into directory structures & not managed by the library), I can get through the directory structure quickly, however, when I go to open the lowest level directory that actually contains files to watch, it can take quite a bit of time for Kodi to respond with the directory listing. Like 15-30 seconds long time. It's accessing all of its media from my server (unRAID) across the network, but the slowdown was distinctly in relation to the upgrade to 17, and there weren't server changes at that time.

I've got a 16GB SSD in the box and disk usage seems to be at a bit of a premium:

Code:
xbmc@xbmc:~$ df -ah
Filesystem      Size  Used Avail Use% Mounted on
sysfs              0     0     0    - /sys
proc               0     0     0    - /proc
udev            923M  4.0K  923M   1% /dev
devpts             0     0     0    - /dev/pts
tmpfs           188M   23M  165M  13% /run
/dev/sda1        13G   12G  264M  98% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none               0     0     0    - /sys/fs/fuse/connections
none               0     0     0    - /sys/kernel/debug
none               0     0     0    - /sys/kernel/security
none            5.0M  4.0K  5.0M   1% /run/lock
none            938M  4.0K  938M   1% /run/shm
none            100M  4.0K  100M   1% /run/user
none               0     0     0    - /sys/fs/pstore
systemd            0     0     0    - /sys/fs/cgroup/systemd
cgroup             0     0     0    - /sys/fs/cgroup/dsystemd
rpc_pipefs         0     0     0    - /run/rpc_pipefs

In particular /dev/sda1 is at 98% utilization (which is actually good, I've seen it at 100%). Is this what's causing directory scanning to run so slowly?

A very large portion of the disk space appears to be taken up with .JPG or .TBN files, so I turned of the 'automatically create thumbnail' setting, deleted a random selection of thumbnails, and that seems to have helped a bit with directory browsing.

I do know that reiserfs struggles mightily when disks are near capacity, but:
Code:
xbmc@xbmc:~$ sudo file -sL /dev/sda
/dev/sda: x86 boot sector
so it doesn't appear to be a reiserfs issue, but I don't know if an "x86 boot sector" format has those same issues

SSDs are reasonably cheap these days, would putting a larger drive in likely resolve this issue? Since it's been...removes socks... nearly 3 years since I had the box open, I don't remember exactly what kind of drive it's got in it. Is it a "standard" SSD (what's the max thickness I could install), or is it one of the m.2 type or something else?

Thanks for making it so very easy to have so many trouble free years of Kodi usage on a super cheap, totally silent box!
Reply
(2017-08-04, 01:04)FreeMan xbmc Wrote: It took a bit to find it, but I'm very happy to see this thread is still alive and well!

I bought my Asus Chromebox-M004U in late 2014, installed v3.5 or 3.6 from the OP and haven't messed with it since except for updating versions of Kodi. I did install XBMCbuntu at the time, and I've had to do a few rounds of `apt-get update ...` and `apt-get upgrade...` to keep both Ubuntu and Kodi up to date.

I'm currently running Ubuntu 14.04.5 LTS and Kodi 17.3. Around the time that I upgraded to Kodi 17, I noticed that many times when I'm navigating my video files (I have TV shows & Movies in libraries, but watch a lot of sports that are just sorted into directory structures & not managed by the library), I can get through the directory structure quickly, however, when I go to open the lowest level directory that actually contains files to watch, it can take quite a bit of time for Kodi to respond with the directory listing. Like 15-30 seconds long time. It's accessing all of its media from my server (unRAID) across the network, but the slowdown was distinctly in relation to the upgrade to 17, and there weren't server changes at that time.

Kodibuntu hasn't been supported by Team Kodi in years, and the LTS kernel used by Ubuntu 14.04 is certainly lacking compared to more up-to-date ones. If you don't have a compelling reason to use a "full" Linux distro, you might be better off backing up your Kodi userdata and starting fresh with LibreELEC (after updating your box to the latest UEFI firmware).

That said, your issue sounds like it's SAMBA related, which could be something at the OS level, or it could be a Kodi issue. Have you tried browsing the SMB shares outside of Kodi to see if the Ubuntu file manager shows the same sluggishness? I'm using 17.3 myself and have all my media on a NAS, and have no issues browsing the directories, but I'm running LE 8.0.2.

Quote:SSDs are reasonably cheap these days, would putting a larger drive in likely resolve this issue? Since it's been...removes socks... nearly 3 years since I had the box open, I don't remember exactly what kind of drive it's got in it. Is it a "standard" SSD (what's the max thickness I could install), or is it one of the m.2 type or something else?

Thanks for making it so very easy to have so many trouble free years of Kodi usage on a super cheap, totally silent box!

http://kodi.wiki/view/Chromebox#Recommen...e_Upgrades

of course, if you switch to LE, 16GB is more than enough
Reply
Thanks for the feedback!

No, I haven't browsed the SMB shares from outside the Kodi interface. I SSH'd into the box and when I go to ~/Movies (for example), the directory is empty because everything is stored remotely. I don't know enough about SAMBA to understand how Kodi is gaining access to the server, so I don't know where to go to see the network. Given some directions, I'll happily follow them! Wink

A couple of questions about your response:
1) What's the difference between Open & Libre ELEC? I recall OpenELEC from a number of years back, but don't know anything about the LibreELEC version.

2) If I recall, OpenELEC wouldn't support a number of (possibly any) different skins. I've become a big fan of the various Aeon skins and would prefer to continue to use it if possible, but if leaving it behind is going to be the best/only recommended solution for going forward, I guess I'll live.

3) If I go this route, what are the steps to update the BIOS? When I originally ran your script, I selected option 3 to install XBMC/KODI on the internal drive, so I don't believe I even have the ChromeOS option at boot anymore. This is my "TV appliance" so I definitely don't need anything remotely like a full Linux install.

4) If I go this route, will the 16GB drive not fill rapidly again with thumbnails, potentially causing the slow browsing issues or at least disk full issues if/when I attempt to update?
Reply
Doing some actual reading here: http://kodi.wiki/view/Chromebox#OS_and_K...stallation it looks like the GalliumOS+Kodi option may be my better bet for what I want. I'll wait for input, though.
Reply
(2017-08-06, 17:40)FreeMan xbmc Wrote: Thanks for the feedback!

No, I haven't browsed the SMB shares from outside the Kodi interface. I SSH'd into the box and when I go to ~/Movies (for example), the directory is empty because everything is stored remotely. I don't know enough about SAMBA to understand how Kodi is gaining access to the server, so I don't know where to go to see the network. Given some directions, I'll happily follow them! Wink
open up your file manager in Ubuntu and go to: smb://<NAS IP address>

Quote:A couple of questions about your response:
1) What's the difference between Open & Libre ELEC? I recall OpenELEC from a number of years back, but don't know anything about the LibreELEC version.
the founder of OpenELEC wanted to maintain absolute control over the project, but had a habit of disappearing for periods of time leaving the developers in a bind. So they forked the project, formed LibreELEC, and that's where all the development happens now. OpenELEC is essentially dead.

Quote:2) If I recall, OpenELEC wouldn't support a number of (possibly any) different skins. I've become a big fan of the various Aeon skins and would prefer to continue to use it if possible, but if leaving it behind is going to be the best/only recommended solution for going forward, I guess I'll live.
I don't recall this ever being the case; there are no limitations on what skin can be used as that's a Kodi function, not an OS one.

Quote:3) If I go this route, what are the steps to update the BIOS? When I originally ran your script, I selected option 3 to install XBMC/KODI on the internal drive, so I don't believe I even have the ChromeOS option at boot anymore. This is my "TV appliance" so I definitely don't need anything remotely like a full Linux install.
from Ubuntu, open a terminal and run the EZ Setup Script again. Update the firmware, power down, boot up the LibreELEC install media, and off you go. Obviously you'll want to back up your Kodi userdata and create the LE install media before flashing the firmware.

Quote:4) If I go this route, will the 16GB drive not fill rapidly again with thumbnails, potentially causing the slow browsing issues or at least disk full issues if/when I attempt to update?
potentially, but you can always have Kodi store the thumbnails on the NAS - that's what I do. Just add the following to advancedsettings.xml in your userdata folder:
Code:
<pathsubstitution>
     <substitute>
          <from>special://masterprofile/Thumbnails/</from>
          <to>smb://<IP of your NAS>/<path>/Thumbnails/</to>
     </substitute>
</pathsubstitution>

(2017-08-06, 17:58)FreeMan xbmc Wrote: Doing some actual reading here: http://kodi.wiki/view/Chromebox#OS_and_K...stallation it looks like the GalliumOS+Kodi option may be my better bet for what I want. I'll wait for input, though.
I really think LibreELEC is the best option from what you've told me so far.
Reply
As far as space is concerned my LibreELEC storage partition shows:
Code:
Filesystem                Size      Used Available Use% Mounted on
/dev/sda2                14.3G      5.5G      8.8G  38% /storage

I have 810 movies and 465 TV series, many of them multi-season.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
Thanks for the tips, Mr. Chromebox! I'll probably settle in for a bit of updating this weekend. And thanks again for the great tools!
Reply
Hi Matt

I'm running the latest LibreElec on my Chromebox and my connections are Chromebox to TV via HDMI, TV to DTS Receiver via Optical / SPDIF.

Do you know what the recommended config is within Kodi please as the audio isn't synchronised. I can fix this for the majority of the time by changing the audio delay and making it +0.250 but this doesn't always work.

Also, do you have a 4K TV and if so then do you have Kodi running at 1080p @ 60fps, or do you have it at 2160p @ 24 / 30fps? I'm tryng to find a happy medium and my TV seems keen to upscale which is fine for 720p / 1080p media, but it's seems to be causing me issues with older 480p stuff.
Reply
(2017-08-16, 10:05)AP0ll0UK Wrote: Hi Matt

I'm running the latest LibreElec on my Chromebox and my connections are Chromebox to TV via HDMI, TV to DTS Receiver via Optical / SPDIF.

Do you know what the recommended config is within Kodi please as the audio isn't synchronised. I can fix this for the majority of the time by changing the audio delay and making it +0.250 but this doesn't always work.

Also, do you have a 4K TV and if so then do you have Kodi running at 1080p @ 60fps, or do you have it at 2160p @ 24 / 30fps? I'm tryng to find a happy medium and my TV seems keen to upscale which is fine for 720p / 1080p media, but it's seems to be causing me issues with older 480p stuff.

250ms is a pretty massive delay in terms of video processing from the TV's end. I use HDMI for audio so everything is clock synced, but you can try setting 'Sync playback to display' under Settings/Player/Video and the 'Enable Dolby Digital transcoding' option under Settings/System/Audio.

for 4K, I'd keep the GUI at 1080p60, and if you have 'Adjust display refresh rate' set to 'On start/stop' under Settings/Player/Video, then it should upscale everything 24/30Hz to 2160p and 50/60Hz to 1080p.
Reply
Thanks for your advice Matt. I'll have a look at those settings today and report back once I've done some testing.

Thanks again Smile
Reply
(2017-08-16, 23:16)Matt Devo Wrote:
(2017-08-16, 10:05)AP0ll0UK Wrote: Hi Matt

I'm running the latest LibreElec on my Chromebox and my connections are Chromebox to TV via HDMI, TV to DTS Receiver via Optical / SPDIF.

Do you know what the recommended config is within Kodi please as the audio isn't synchronised. I can fix this for the majority of the time by changing the audio delay and making it +0.250 but this doesn't always work.

Also, do you have a 4K TV and if so then do you have Kodi running at 1080p @ 60fps, or do you have it at 2160p @ 24 / 30fps? I'm tryng to find a happy medium and my TV seems keen to upscale which is fine for 720p / 1080p media, but it's seems to be causing me issues with older 480p stuff.

250ms is a pretty massive delay in terms of video processing from the TV's end. I use HDMI for audio so everything is clock synced, but you can try setting 'Sync playback to display' under Settings/Player/Video and the 'Enable Dolby Digital transcoding' option under Settings/System/Audio.

for 4K, I'd keep the GUI at 1080p60, and if you have 'Adjust display refresh rate' set to 'On start/stop' under Settings/Player/Video, then it should upscale everything 24/30Hz to 2160p and 50/60Hz to 1080p.

I notice when I set the GUI to 1080p60, my Samsung KS8000 doesn't let me set Picture Mode to "Movie." It only gives me Standard and Dynamic. I regain Movie mode when I actually play the video. When I switch from Game Mode, I have to wait until the file is playing to be able to get it back to Movie Mode. So to bypass that issue, I set the GUI to 1080p30. Is that setting okay? I usually only play standard 1080p 24fps files.
Reply
(2017-08-18, 05:39)riceandfajitas1 Wrote: I notice when I set the GUI to 1080p60, my Samsung KS8000 doesn't let me set Picture Mode to "Movie." It only gives me Standard and Dynamic. I regain Movie mode when I actually play the video. When I switch from Game Mode, I have to wait until the file is playing to be able to get it back to Movie Mode. So to bypass that issue, I set the GUI to 1080p30. Is that setting okay? I usually only play standard 1080p 24fps files.

sigh, Samsung's janky firmware strikes again. In that case, either 1080p30 or 2160p30 would be fine, the GUI will just be a little less fluid/smooth at 30Hz vs 60Hz
Reply
Thanks, I guess I'll just keep it that way.
Reply
(2017-08-16, 23:16)Matt Devo Wrote:
(2017-08-16, 10:05)AP0ll0UK Wrote: Hi Matt

I'm running the latest LibreElec on my Chromebox and my connections are Chromebox to TV via HDMI, TV to DTS Receiver via Optical / SPDIF.

Do you know what the recommended config is within Kodi please as the audio isn't synchronised. I can fix this for the majority of the time by changing the audio delay and making it +0.250 but this doesn't always work.

Also, do you have a 4K TV and if so then do you have Kodi running at 1080p @ 60fps, or do you have it at 2160p @ 24 / 30fps? I'm tryng to find a happy medium and my TV seems keen to upscale which is fine for 720p / 1080p media, but it's seems to be causing me issues with older 480p stuff.

250ms is a pretty massive delay in terms of video processing from the TV's end. I use HDMI for audio so everything is clock synced, but you can try setting 'Sync playback to display' under Settings/Player/Video and the 'Enable Dolby Digital transcoding' option under Settings/System/Audio.

for 4K, I'd keep the GUI at 1080p60, and if you have 'Adjust display refresh rate' set to 'On start/stop' under Settings/Player/Video, then it should upscale everything 24/30Hz to 2160p and 50/60Hz to 1080p.
I'm still playing at the moment. I can't see to resolve the audio delay issue. I've defaulted the audio delay at +250ms for now. I've seen this before with my old TV but the same theatre kit. I can't remember how I fixed it but it was a fix verses a cludge that I've got at the moment. I'd point the finger at the theater kit but I can't say I notice it when I'm gaming on my PC. More testing is probably needed though to flush it out either way.

Changing the resolution seems to have unearthed a slightly different issue which is the Kodi booting up with a single cursor flash and then a blank screen. The box is up and I can SSH to it, just nothing on the screen. Never seen this before and it's not like the box is booting up in a resolution which isn't supported by the TV. I'm guessing it's some negotiation going on between the TV and the box, something is going amiss hence the blank display.

I'll be going through the debug log to see what's what and will let you know.

Sent from my Nexus 6P
Reply
There is also a way to run kodi inside of ChromeOS, rather than dual booting. Check out my HOW-TO here: https://forum.kodi.tv/showthread.php?tid=320808 ([CHROMEOS] HOW TO - Install Kodi on ChromeOS using Crouton)

This is not an attempt to disrespect the work done here, just to make others aware of a new way. Smile
Reply
  • 1
  • 508
  • 509
  • 510(current)
  • 511
  • 512
  • 553

Logout Mark Read Team Forum Stats Members Help
ChromeBox Kodi E-Z Setup Script (LibreELEC/Linux+Kodi) [2017/02/21]37