Moderator Control Panel ]

OpenELEC 5.0.4

Re: OpenELEC 5.0.4

Postby jimmyx » Sat Jun 13, 2015 6:07 am

reinstalled to your latest 5.0.8 and the imx6-soc-fan-monitor.conf.sample file was there, I edited it and added
Code: Select All Code
systemctl restart imx6-soc-fan-monitor
to and sadly the fan still does not start :(

the only way ive been able to ensure the fan runs is adding this
Code: Select All Code
echo default-on > /sys/class/leds/fan/trigger

also for whatever reason the system does not seem to be getting the time properly ive tried all of the options here:

with 5.0.4 the above time settings added to would ensure my machine had the correct time always.

also now every time the box looses power it goes to the screen others have been reporting and I cannot seem to get out of it unless I reflash, but in order to reflash I must take the box upstairs to my computer then unplug it and bring it back down to TV downstairs and the error comes back

( typing "fsck -y /dev/mmcblk0p2" and after it runs its commands "reboot" seems to have resolved the above issue )

Any input would be greatly appreciated :)
Posts: 13
Joined: Mon May 18, 2015 2:24 pm

Re: OpenELEC 5.0.4

Postby vpeter » Sat Jun 13, 2015 5:16 pm

jimmyx Wrote:the imx6-soc-fan-monitor.conf.sample file was there, I edited it
Did you rename it to imx6-soc-fan-monitor.conf?
You can help me buy new work notebook with paypal donation, after 8 years it's time to upgrade.
Posts: 427
Joined: Sun Jul 27, 2014 2:12 am
Location: Slovenia

Re: OpenELEC 5.0.4

Postby jimmyx » Wed Jun 17, 2015 2:34 am

yes i did... (change the name to .conf)

sadly my dog tripped over the power adapter for my matrix and now the unit is dead (or so it seems) and I had just sold my second unit. So it appears my adventures in the openelec matrix days are over as fast as theyve begun :(

well lucky me it turns out it was the PSU that was blown and NOT the matrix PHEW!
Posts: 13
Joined: Mon May 18, 2015 2:24 pm

Re: OpenELEC 5.0.4

Postby SinOjos » Tue Jul 21, 2015 7:01 am

OpenElec 5.93.2 Beta and now 5.95.3 Beta for the Matrix mini pc is now available directly from the OpenElec websites in the downloads section.

I was using the the Matrix for some development work running Gentoo Linux for some time, but have completed that project, and wanted to go ahead and use it for a media center.

I was happy to see this thread, and subsequently OpenElec for the Matrix downloadable directly from OpenElec. I have no idea if you were involved with getting the necessary files together and included, vpeter, if you were, a big thanks for your time and work. It is a real shame that tbsdtv contributes nothing towards improvements and or updates for the matrix mini pc.

Even though I have run a number of different Linux OS's in a number of different configuration, I have yet to get anything to boot directly from an SATA SSD, despite using the published dip switch positions, and various optional dip switch positions.

Fortunately you can boot to the SATA SSD from a sdcard easily. Since I have not seen anyone post anything about booting from a SATA SSD. I thought I would post how to run OpenElec off a SATA SSD, booting from a sdcard, so that others can enjoy the improved performance, and disk space. Some stats first so you understand some of the differences of what kind of read speeds are generally seen with the various types of disks.

Running: hdparm -tT /dev/sda (replace sda with the drive you want to test)

Will give you and idea of what kind of read speed differences there are between the mmc, sdcard, ssd.

onboard mmc:
Timing cached reads: 348 MB in 2.00 seconds = 173.64 MB/sec
Timing buffered disk reads: 126 MB in 3.01 seconds = 41.90 MB/sec

sdcard: Does not matter what rating your sdcard has 10 or above, even a 4 can get the same speed. High priced sdcard rated for 70MBs read will not be any faster, at least not on my Matrix.

Timing cached reads: 338 MB in 2.00 seconds = 168.87 MB/sec
Timing buffered disk reads: 50 MB in 3.07 seconds = 16.29 MB/sec

sata ssd:

Timing cached reads: 358 MB in 2.01 seconds = 178.43 MB/sec
Timing buffered disk reads: 218 MB in 3.00 seconds = 72.65 MB/sec

Of course you can do dd tests as well as other apps like bonnie++. On all arm devices that have onboard mmc, sdcard along with sata. I found that where a sata ssd really shines, using bonnie++ to really test all the different file sizes for read, write, synchronous and asynchronous, a sata ssd performs considerably better at the 4k, 8k, and other small file writes and reads. Those faster small file size read writes really improve the responsiveness and overall performance of an OS. sdcards are typically slow for the smaller file sizes and are not really well suited for running an OS. While some of the better quality USB disks generally do much better than sdcards. Yet USB disks still do not come close to a sata ssd. The reason for that is that sdcards and usb disks are typically designed for file/data storage, and most files people want to store are in the small MB size to large MB size. They are designed to perform better with larger files sizes, as the
higher advertised read rates, help sell the product. There are numerous tests out there, from a multitude of arm devices, do some searches.

Ok now on to installing OpenElec onto a SATA SSD on the Matrix mini pc.

You will need the OpenElec tarball. You do not need the image. Only the Beta at this time has the Matrix mini pc files, current version is 5.95.3.

You may want to follow the suggestions in the OpenElec manual installation instructions, concerning file system parameters and ssd trim support. For the most part, the manual installation instructions will be followed.

First partition and create a file system on the sdcard. Before partitioning, you may want to zero out the sdcard, especially if you have dd it with various boot files in the past. Make sure you do this to the correct drive, as it WILL DELETE all partition tables and boot loader files. Unless you have backups, you WILL NOT be able to recover. MAKE SURE YOU DO NOT DO THIS TO YOUR PRIMARY COMPUTER DRIVE!

dd if=/dev/zero of=/dev/sdX bs=1M count=8
(a higher count like 16,32,64 can be used if you think it is necessary)

You will not need a large sdcard as only a few files will be on it. 100-250MB partition will suffice or go a head and use the whole disk, unless you want a separate second partition for storage. I used the ext4 file system.

These are the files you need to place on the sdcard. Make sure to use the uEnv-matrix.txt for your uEnv.txt.

(found in the target folder of the OpenElec tarball)

(found in the 3rdparty/bootloader folder in the OpenElec tarball)

(found in the 3rdparty/bootloader folder in the OpenElect tarball - copied from the uEnv-matrix.txt)

You will need to make a couple changes to the boot & disk args in the uEnv.txt. I removed the last line as it is unnecessary as I have had no trouble with the hwaddress being found. Below is what I have. The last two lines are all one line, the forum cut it due to length.

mmcargs=setenv bootargs 'boot=/dev/sda1 disk=/dev/sda2 quiet video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 dmfc=3 consoleblank=0'

You will now need to flash the sdcard with the u-boot-matrix.imx (found in the 3rdparty/bootloader folder of the OpenElec tarball). Make sure you dd the u-boot-matrix.imx to your sdcard and not to some other attached drive/device!

dd if=u-boot-matrix.imx of=/dev/sdX bs=512 seek=2

This is what the manual instructions uses, though I used the above.

dd if=u-boot-matrix.imx of=/dev/sdX bs=440 count=1

For a micro sdcard you will need this dip switch positions on the Matrix:


For setting up an SATA SSD. Follow the manual installation guide through the SSD Trim Support. The only thing I can add, is since there is plenty of room, depending on what size SSD you have of course. You may want to make the first partition larger, though not necessarily necessary. Currently the System file is 104.7MB in size. 250MB partition per the instructions leaves you with a partition double that size. SSD partitions typically maintain optimum read speed when no more than 50% full. I went with 1GB simply because I do not need that other 750MB's in the second partition. I do store some media in the second partition, the most used, for the faster and smoother read speed and less power usage, but have a secondary USB rotational drive with a much larger body of media files. Of course NFS or SAMBA can be used off a server, that can be setup via the OpenElec/KODA settings.

There is only one file you need in the first partition


After following the Manual Installation Instructions and placing the System file in the first partition. Slip your sdcard in the slot, plug in your sata ssd drive, and boot.

I started with the 5.95.2 Beta. I just did the upgrade via the OpenElec Settings page and it worked fine. Though remember that you need to replace the OLD KERNEL with the NEW KERNEL on the SDCA

With 5.95.2 Beta my system fan after enabling it via systemd was failing. I simply did a cron job every 15 mins restarting it. Just updated to 5.95.3 so do not know if the cron job is still necessary.

SSH into OpenElec. I setup a private public key and turned off ssh password via the OpenElec settings.

cp ~/.config/imx6-soc-fan-monitor.conf.sample ~/.config/imx6-soc-fan-monitor.conf

If you want to change any parameters. I changed the high from 70 to 60.

nano ~/.config/imx6-soc-fan-monitor.conf
systemctl enable imx6-soc-fan-monitor
systemctl start imx6-soc-fan-monitor

Crontab I used, can be adjusted for what you think you need.

*/15 * * * * systemctl restart imx6-soc-fan-monitor

Additional Stuff:

To improve security, in the OpenElec and KODI settings, turn off any services you will not be using. Not only does it make your system more secure, but it reduces OS overhead. Yes your internal network should be secure and having services running does not necessarily introduce unnecessary risk. Yet, if some how, someone, does get access through OpenElec/KODI or some other device with in your network, it will reduce the things that an intruder can leverage. And may save you from clean installing a number of devices in comparison to one that may have fallen into the wrong hands.

Iptables, the Linux Firewall, is up and running out of the box on OpenElec. It is only necessary to load the rules you want.

Here is an nmap -F scan showing what ports are open and or filtered with everything off but ssh and web access. I use my android phone with the KODI control app with a password. rpcbind is open even though everything is off, but ssh and http via the OpenElec/KODI settings. Vulnerabilities have been found in rpcbind in the past, though currently not aware of any bad vulnerabilities.

nmap -F ipaddress

Not shown: 77 closed ports
7/tcp filtered echo
22/tcp open ssh
80/tcp open http
81/tcp filtered hosts2-ns
111/tcp open rpcbind
144/tcp filtered news
515/tcp filtered printer
990/tcp filtered ftps
1755/tcp filtered wms
1900/tcp filtered upnp
2049/tcp filtered nfs
3000/tcp filtered ppp
4899/tcp filtered radmin
5000/tcp filtered upnp
5190/tcp filtered aol
5357/tcp filtered wsdapi
5432/tcp filtered postgresql
6646/tcp filtered unknown
7070/tcp filtered realserver
8008/tcp filtered http
10000/tcp filtered snet-sensor-mgmt
32768/tcp filtered filenet-tms
49155/tcp filtered unknown
Nmap done: 1 IP address (1 host up) scanned in 1.59 seconds
Posts: 15
Joined: Wed Aug 06, 2014 11:43 pm

Re: OpenELEC 5.0.4

Postby SinOjos » Tue Jul 21, 2015 7:13 am

nmap -F with iptables rules from a computer with no allowed access:

Nmap done: 1 IP address (1 host up) scanned in 4.52 seconds

nmap -F with iptables rules from a computer with ssh access:

Not shown: 99 filtered ports
22/tcp open ssh
Nmap done: 1 IP address (1 host up) scanned in 2.10 seconds

nmap -F with iptables rules from computer with http access:

Not shown: 99 filtered ports
80/tcp open http
Nmap done: 1 IP address (1 host up) scanned in 2.20 seconds

There has been a lot of arguments over the years as to whether filtered (off) services really need to be protected. Fact is, running services do need to be protected. Obviously OpenElec keeps everything open, so that people can simply boot up and get everything working without any headaches. On your own lan, which should be secure, there really is no worry. But what if your lan does become insecure. Since Govs., and large corporations cannot seem to keep their networks secure, why would you think you can.

The answer is simple. Most people lock the doors and windows to their house, why? Simply because they know they cannot keep a determined prepared individual out 100% of the time. But they can keep the casual passerby out. The simple premise that most are looking for a quick easy gain. If you make it more difficult, they move on and find easier fish to fry. They generally will not spend hours/days/weeks/months/years to get into the average home lan, simply because there will be little in return for the time and expense expended. But if you allow them to walk right in, with little or no hurdles to breach, then they will walk right in and do anything they want.

Ultimately what security practices you take is entirely up to you. Spending a bit of time self educating and learning security basics will pay off ten fold down the line. OpenElec is Linux based, Linux has some of the best security tools available. Every thing you need to know is available via the web, the beauty of open source, it will only cost you the time to read the documents and apply the solutions.
Posts: 15
Joined: Wed Aug 06, 2014 11:43 pm

Re: OpenELEC 5.0.4

Postby vpeter » Tue Jul 21, 2015 5:18 pm

SinOjos Wrote:systemctl enable imx6-soc-fan-monitor
systemctl start imx6-soc-fan-monitor

Crontab I used, can be adjusted for what you think you need.

*/15 * * * * systemctl restart imx6-soc-fan-monitor
Doesn't fan daemon starts automatically? I saw in previous posts this problem but can't reproduce myself to fix it.

And thanks for such detailed post. I don't have any spare SATA HDD/SSD to test this bus. When I will find some time I will try with PCI tuner cards but I'm not sure if have correct adapter to use them. Seems I need some Mini PCI-E Adapter...
Btw: I got some equipment from TBS to work with.
You can help me buy new work notebook with paypal donation, after 8 years it's time to upgrade.
Posts: 427
Joined: Sun Jul 27, 2014 2:12 am
Location: Slovenia

Re: OpenELEC 5.0.4

Postby SinOjos » Mon Jul 27, 2015 4:50 am

When I installed 5.95.2 I had to cp imx6-soc-fan-monitor.conf.sample imx6-soc-fan-monitor.conf then systemctl enable imx6-soc-fan-monitor then systemctl start imx6-soc-fan-monitor.

It ran for awhile then failed, not sure how long until fail, but tried it a few times. I live in the desert and its hots, so wanted to make sure the fan was running. It has not failed with the cronjob running, can see it running when I walk by, its in my living room while I spend most of my time in my home office, its not running all the time, only when the temp gets up there. I suppose I could set up some kind of alert and take a closer look at what is happening and get rid of the 15 min cronjob or make it longer, but do not really care as it is working. When I have some free time I may look into it further. Simply to busy with other more important projects.

I updated to 5.95.3 via the openelec system interface, so I do not know if 5.95.3 has the fan monitor running or still needs to be manually enabled and started. I would think perhaps it needs to be enabled and started manually as the release is for other imx6 boards that do not have a fan. One of these days I will delete the cronjob and keep an eye on it to see if the fan monitor fails.

I really like the matrix mini pc, it is simply a shame that some things do not work as advertised, little or no documentation or incorrect documentation. The documentation from [url][/url] really helps a lot. As everything built for the matrix comes from there. If you take the time to read and follow the instructions from FreeScale you can modify and use there tools for installation, though I find doing things manually to be faster and easier.

For instance if you want to use the MFGTools-Updater, you can install any Linux root file system, to any disk drive. Sucks that it is windows only, reason why I simply do things the Linux way.

You can easily modify the Matrix provided installer which is the FreeScale MFGTools-Updater. Simply replace the matrix_rootfs.tar.bz2 with what ever Linux root file system you want to install, simply rename or remove matrix_rootfs.tar.bz2 and name the new root file system to matrix_rootfs.tar.bz2 . That will get you up and running fast. You can compile a new kernel if you want after you get up and running, or cross-compile from a workstation, or better yet set up a distributed cross compiling environment in a cluster. Provides for some timely compiling. Though if you compile with the Matrix mini pc alone, no distcc, it is not bad at all, especially if you place your compiling folder in ram. Of course there is not enough ram for some of the larger compiles, but 99% can be done totally from ram.

If you want to us the mfgtools-updter, and modify things, like filesystem type or disk to install to, or partitioning scheme, and such, modify ucl2.xml which has all the install configuration instructions. One of the things I never understood about the matrix os, is why they used ext3 when there are benefits to using ext4. That's easy to change simply open ucl2.xml and change all the ext3 references to ext4. But I much prefer to do a standard manual Linux install, it is much easier and faster, blows my mind with all the references to open source, yet they only provide a windblows installer, does not make much sense.

The Matrix mini pc is some nice hardware, it ran great running and compiling Gentoo. Never did get it to boot from sata, but boot from sdcard and have rootfs on sata achieves the same thing. Since sata ssd is plug and play, its a simple matter of plugging the sata ssd into your work station, partition, make your preferred file system, install the rootfs, make your sdcard for booting, kernel, uEnv.txt, install bootloader and your up and running. Much easier and faster than that stoopid mfgtools-updater windblows crap. I can install faster than it takes to do all the configuration settings in the ucl2.xml alone.

What is a real shame, is that since tbsdtv already has the majority of the work done, an update would be easy for them to do, like android 5.0, or to provide releases of any other Linux flavor. Unfortunately FreeScale only has patches for android 5.0, no 5.1 patches yet. If you go to the FreeScale website, you can download everything you need including the instructions for building android 5.0. Really tbsdtv should do 5.0, as 4.2 is really old.

I suppose they will never release another update for the Matrix mini pc. With the Matrix 2 available, once again nice hardware, but support will most probably be lacking. I just took a quick look at the tbsdtv update to 4.4. Once again they are using an install program. Why they are not using Android OTA updating, is beyond me. If they did that, a user would simply click on the update link in settings and it would download the update and install. All part of Android, there is absolutely no reason to be using an outside installer for updates.

If you want android 5.1, you should be able to find some releases for the Allwinner A80, as it is coming out on tablets and such. You may simply be better off building and compiling Android your self, getting it directly from Google, as it will have configuration specific files for the A80. Then you can do it any way you want, not to mention you could take advantage of OTA updating. Simply sync your local android git repository, compile, then OTA it to the device, and update.

I tell you, the tbsdtv people need to get off of doing Linux like Winblows does things, and start doing things the Linux way, rolling releases, and incrementally update things as they are available. Instead of this version crap once every four years.
Posts: 15
Joined: Wed Aug 06, 2014 11:43 pm

Re: OpenELEC 5.0.4

Postby laruf » Thu Dec 14, 2017 12:32 am

Hello all,

Since I experiment many latency issue with Libreelec, I decided to get back to Openelec. These are old realese, but was working well for me.

I was asking me (and it's my question to you guys ;-) How can I update the last Openelec release provide by vpeter (v 6) to the latest (v 8) ?

The automatic mode do not work for me.

Thanks for you help
Posts: 24
Joined: Thu Oct 09, 2014 9:03 pm


Return to Announcements

Who is online

Users browsing this forum: No registered users and 2 guests