Various problems when booting from USB
#1
Hi all, I'm at my wit's end.

I am running the latest build of OpenELEC for Raspberry Pi 2, and I have two separate configurations using different SD cards:
- Configuration 1 is a standard installation of OpenELEC on a Class 4 SD card. I have no serious problems, but movie/tv scrapers are a little sluggish.
- Configuration 2 is a hybrid installation of OpenELEC on a Class 10 SD card and USB 2.0 as described here. The performance is significantly boosted and scrapers chug along much nicer.

I want to stick with Configuration 2, but I've observed two major problems so far:

1. My /storage/.config/autostart.sh script absolutely does not run. It has the right permissions assigned to it using chmod. The exact same script in Configuration 1 is executed flawlessly. In Configuration 2, it just gets passed over.
2. A ton of streaming content (such as Youtube, SALTS, and Genesis) simply does not work. Again, the exact same setup in Configuration 1 works flawlessly, but in Configuration 2 does not.

Here's an example of my logfile where a simple Youtube video fails to load:

Code:
23:00:37 T:1348465728  NOTICE: -->Python Interpreter Initialized<--
23:00:37 T:1348465728  NOTICE: [plugin.video.youtube] Running: YouTube (5.0.9) on Helix (14.2) with Python 2.7.3
23:00:41 T:1969491968  NOTICE: DVDPlayer: Opening: https://r12---sn-tt17rn7k.googlevideo.com/videoplayback?sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&itag=22&ip=67.55.0.106&source=youtube&mm=31&key=yt5&expire=1427619643&ipbits=0&ratebypass=yes&requiressl=yes&dur=772.202&id=o-ANU0i8O49VbpCp4y2A4cfUgsaJ8cpNWDRNX-zpwCajaC&signature=37DFDCD74EC315ACA40872A3D2D85656B46F5E04.D3FEA829E0F2AF0CA207C6739FBE910B3E96AA76&pl=22&fexp=900720%2C905652%2C907263%2C934954%2C9405976%2C9407060%2C9407103%2C9408102%2C9408134%2C948124%2C948703%2C951511%2C951703%2C952612%2C955205%2C957201%2C960621%2C961404%2C961406%2C962731%2C964751&ms=au&mt=1427597989&upn=IXKSkzisWmU&mv=m&sver=3&initcwndbps=517500
23:00:41 T:1969491968 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
23:00:41 T:1348465728  NOTICE: Thread DVDPlayer start, auto delete: false
23:00:41 T:1348465728  NOTICE: Creating InputStream
23:00:42 T:1348465728   ERROR: Open - Unhandled exception
23:00:42 T:1348465728   ERROR: Open - Error opening https://r12---sn-tt17rn7k.googlevideo.com/videoplayback?sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&itag=22&ip=67.55.0.106&source=youtube&mm=31&key=yt5&expire=1427619643&ipbits=0&ratebypass=yes&requiressl=yes&dur=772.202&id=o-ANU0i8O49VbpCp4y2A4cfUgsaJ8cpNWDRNX-zpwCajaC&signature=37DFDCD74EC315ACA40872A3D2D85656B46F5E04.D3FEA829E0F2AF0CA207C6739FBE910B3E96AA76&pl=22&fexp=900720%2C905652%2C907263%2C934954%2C9405976%2C9407060%2C9407103%2C9408102%2C9408134%2C948124%2C948703%2C951511%2C951703%2C952612%2C955205%2C957201%2C960621%2C961404%2C961406%2C962731%2C964751&ms=au&mt=1427597989&upn=IXKSkzisWmU&mv=m&sver=3&initcwndbps=517500
23:00:42 T:1348465728   ERROR: CDVDPlayer::OpenInputStream - error opening [https://r12---sn-tt17rn7k.googlevideo.com/videoplayback?sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&itag=22&ip=67.55.0.106&source=youtube&mm=31&key=yt5&expire=1427619643&ipbits=0&ratebypass=yes&requiressl=yes&dur=772.202&id=o-ANU0i8O49VbpCp4y2A4cfUgsaJ8cpNWDRNX-zpwCajaC&signature=37DFDCD74EC315ACA40872A3D2D85656B46F5E04.D3FEA829E0F2AF0CA207C6739FBE910B3E96AA76&pl=22&fexp=900720%2C905652%2C907263%2C934954%2C9405976%2C9407060%2C9407103%2C9408102%2C9408134%2C948124%2C948703%2C951511%2C951703%2C952612%2C955205%2C957201%2C960621%2C961404%2C961406%2C962731%2C964751&ms=au&mt=1427597989&upn=IXKSkzisWmU&mv=m&sver=3&initcwndbps=517500]
23:00:42 T:1348465728  NOTICE: CDVDPlayer::OnExit()
23:00:42 T:1969491968   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.youtube/play/?video_id=kBluxk-mPGQ]
23:00:42 T:1969491968  NOTICE: CDVDPlayer::CloseFile()
23:00:42 T:1969491968  NOTICE: DVDPlayer: waiting for threads to exit
23:00:42 T:1969491968  NOTICE: DVDPlayer: finished waiting
23:00:42 T:1969491968  NOTICE: CDVDPlayer::CloseFile()
23:00:42 T:1969491968  NOTICE: DVDPlayer: waiting for threads to exit
23:00:42 T:1969491968  NOTICE: DVDPlayer: finished waiting
23:00:42 T:1959785536  NOTICE: Found 1 Lists of Devices
23:00:42 T:1959785536  NOTICE: Enumerated PI devices:
23:00:42 T:1959785536  NOTICE:     Device 1
23:00:42 T:1959785536  NOTICE:         m_deviceName      : HDMI
23:00:42 T:1959785536  NOTICE:         m_displayName     : HDMI
23:00:42 T:1959785536  NOTICE:         m_displayNameExtra:
23:00:42 T:1959785536  NOTICE:         m_deviceType      : AE_DEVTYPE_HDMI
23:00:42 T:1959785536  NOTICE:         m_channels        : FL,FR
23:00:42 T:1959785536  NOTICE:         m_sampleRates     : 8000,11025,16000,22050,24000,32000,44100,48000,88200,96000,176400,192000
23:00:42 T:1959785536  NOTICE:         m_dataFormats     : AE_FMT_FLOAT,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S32LE,AE_FMT_S16LE,AE_FMT_FLOATP,AE_FMT_S32NEP,AE_FMT_S16NEP,AE_FMT_AC3,AE_FMT_DTS,AE_FMT_EAC3
23:00:42 T:1959785536  NOTICE:     Device 2
23:00:42 T:1959785536  NOTICE:         m_deviceName      : Analogue
23:00:42 T:1959785536  NOTICE:         m_displayName     : Analogue
23:00:42 T:1959785536  NOTICE:         m_displayNameExtra:
23:00:42 T:1959785536  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
23:00:42 T:1959785536  NOTICE:         m_channels        : FL,FR
23:00:42 T:1959785536  NOTICE:         m_sampleRates     : 48000
23:00:42 T:1959785536  NOTICE:         m_dataFormats     : AE_FMT_FLOAT,AE_FMT_S32LE,AE_FMT_S16LE,AE_FMT_FLOATP,AE_FMT_S32NEP,AE_FMT_S16NEP
23:00:42 T:1959785536  NOTICE:     Device 3
23:00:42 T:1959785536  NOTICE:         m_deviceName      : Both
23:00:42 T:1959785536  NOTICE:         m_displayName     : HDMI and Analogue
23:00:42 T:1959785536  NOTICE:         m_displayNameExtra:
23:00:42 T:1959785536  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
23:00:42 T:1959785536  NOTICE:         m_channels        : FL,FR
23:00:42 T:1959785536  NOTICE:         m_sampleRates     : 48000
23:00:42 T:1959785536  NOTICE:         m_dataFormats     : AE_FMT_FLOAT,AE_FMT_S32LE,AE_FMT_S16LE,AE_FMT_FLOATP,AE_FMT_S32NEP,AE_FMT_S16NEP
23:00:44 T:1388311616  NOTICE: Thread BackgroundLoader start, auto delete: false

While those links eventually expire, I copied them directly from the log file into my laptop's Chrome browser and they played fine. I also ran Kodi on my laptop and on my RPi2 side-by-side, playing exactly the same content from exactly the same sources, and the content would play on my laptop but fail on my RPi2 using Configuration 2. If I swap out SD cards and run the RPi on Configuration 1, the same exact content from the same exact sources would play just fine.

Any insight would be greatly appreciated - I really love the responsiveness and performance of the RPi2 on the USB boot, but these two issues are really killing it for me.
Reply
#2
Sounds like you've screwed up Configuration 2.

autostart.sh doesn't require any special permissions to be executed, so if it's not being executed it's because it's not being seen by OpenELEC. Since you've switched to USB how sure are you that Kodi is using the correct mount for /storage?

Paste the following details:
Code:
mount | pastebinit
cat /flash/cmdline.txt | pastebinit
cat /storage/.kodi/temp/kodi.log | pastebinit
systemctl status kodi-autostart | pastebinit
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#3
Thanks for the quick feedback, Milhouse. I'm hoping I didn't screw up Configuration 2, but I'd be a fool not to entertain the possibility. Smile

Here are the pastebins you requested:
Reply
#4
As you can see from the last log, autostart.sh is being run - what makes you think it "absolutely does not run"? It looks like you're bringing up a VPN connection.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#5
I have two arguments in my script:
- first, it sets the correct time and date by executing ntpd -q -p [ntp server]
- second, it runs my openvpn script

After minutes of operation, my date and time are still stuck in the 1960s, and my IP address has not switched to my VPN. I use this exact same autostart.sh script on my other SD card (Configuration 2), where the script executes flawlessly within seconds of booting.
Reply
#6
Obviously you don't have a working network... hence the time not updating correctly, and you shouldn't need to call ntpd in autostart.sh. Try enabling "Wait for network" in OpenELEC Settings.

One thing to check would be that both Pis are configured identically from a network perspective - are they both using DHCP (or is one using a static IP?)

However your autostart.sh *is* running. Why it doesn't work I've no idea, this is your code and something you'll need to debug.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply

Logout Mark Read Team Forum Stats Members Help
Various problems when booting from USB0