Jump to content

M9Plus 4k TV Box - An Exercise in Futility?


Naught McNoone

Recommended Posts

M9Plus 4k TV Box - An Exercise in Futility?

 

My apologies for the verbosity of this post.

 

I have an Android box marked M9 Plus 4k on the top. It was given to me, as a gift. There are no other markings on the box, and the user manual that came with it is all but useless. There is no web site listed, and no way to find out who made the thing. Tech specs are listed below.

 

After playing with the Android and a bunch of apps from Google, for about 3 months, I finally got around to doing the sensible thing, and switched it over to Linux. Specifically LibreELEC.

 

The only issue was the dtb.img file for the 1G Ethernet did not work properly, and I was forced to use the 100M version. This is a non issue. The LAN is working.

My USB media drive is attached directly to the box, and I have both SSH and SMB access from my desktop computer. (Xubuntu Bionic Beaver.)

 

So, a few weeks ago, I decided to retire my aging Seagate Dock Drive, which is running OpenWRT Linux. (Yes, I still use a Dock Drive!) It's main function is an auto backup device, using rsync, and it does the job. Not without some limitations.

 

I bumped up my media drive to a 3TB, with two partitions. 1 TB for my media, and 2 TB for my desktop and notebook backups. Everything was right with the device, almost.

 

LibreELEC is a very good operating system if all you want to do is convert your TV box from Android to Linux, and run Kodi. That is what it is designed for, and it does it very well.

 

However, as soon as I started to modify it to do other things, I ran into some issues. Most of it aggravating little things, which continually needed tweaking. The most common, of course, was that dependencies for the added packages were woefully out of date, or just not there.

 

I know that there is an Arm version of Ubuntu available, so I used DuckDuckGo to find "Arm S905 Ubuntu Linux", and it led me to this site! Wow!

 

If I understood it right, I could have Bionic Beaver on my TV box! (Maybe.) So I registered in the Forums, and spent an hour or two every day reading. After about a week of research, I was ready to spend a Saturday morning installing a current version of Ubuntu on my box. What could go wrong?

 

After experimenting with several dtb files, I found one that would take me through the boot process. I settled on the meson-gxbb-p200.dtb file, as it seemed the closest to my LibreELEC dtb.img.

 

So, here are the two main issues.

 

Video.

Neither the current Ubuntu, nor the Debian image, would sync properly with my LG 55" 4K television. Repeated boot attempts resulted in various video errors, ranging from no signal, to to 2160p that flickered in and out.

 

I eventually found an older image, that had an hdmi.sh file included in the boot.

 

That allowed me to force 1080p or 720p on my screen. I now had a stable screen, that I could read, (mostly.) The over scan on it made it impossible to see the command line. Even with the TV zoom feature at minimum, in 720p, I was still about 6 rows of text below the bottom of the screen.

 

Login and change password.

Even with the bad over scan, I can initiate the login for the older file. It's not the first time I have had to deal with this type of issue. All that is needed is to blind type "root", enter, "1234", enter. I was now logged in.

Next, because the first log in requires a change of password, I typed in "1234" again, then my new password, twice. I should now be at the command line in terminal, and a few carriage returns to bring the resulting text into view will verify that. Not going to happen.

 

The dreaded "authentication token manipulation error" appeared, and the subsequent CR's resulted in me being logged out, and now it was a guess as to where I was on the login screen.

It seems that the system was mounted in Read Only mode, and that even as root, it would not allow me to write the new password to the disk.

 

So, if you are still with me, here are the three questions I need answered.

 

1. Is there a way to modify the boot files on the SD card before the install boot, to force the system into a stable 1080p or 720p mode, preferably with a setting to reduce the over scan?

 

2. On the first boot to login, how do I get the system to mount in RW mode so it will accept my change in password?

 

3. Am I flogging a dead horse?

 

Cheers!

 

Naught.

 

-----------------------------------------------------------------------------------

Here are the images I have tried:

 

Armbian_5.67_Aml-s9xxx_Ubuntu_bionic_default_4.19.2_desktop_20181203.img

Armbian_5.67_Aml-s9xxx_Debian_stretch_default_4.19.6_desktop_20181207.img

Armbian_5.34_S9xxx_Ubuntu_xenial_4.9.40_mate_20171112.img (Worked with over scan.)

 

Here are the dtb.img files I have tried:

meson-gxbb-p200.dtb

gxbb_p200.dtb (Borrowed from ArchLinux image.)

gxbb_p200_2G_100M.dtb (Borrowed from working LibreELEC image.)

 

The Micro SD drive is a Lexar 300 C10 32GB HC1.

It has been tested and functions perfectly with LibreELEC

-----------------------------------------------------------------------------------

According to the (sparse) documentation that came with the box, here are the specs:

 

CPU Amlogic S905 Quad core Cortex A53 2.0GHz 64bit

GPU Penta-Core ARM Mali-450,comply with OpenGL ES 1.1/2.0 and OpenVG 1.1

RAM 2GB DDR3

ROM 16GB EMMC

Support MicroSD(TF) ,Up to 32GB

Wifi 802.11 b/g/n 2.4GHZ/5.8GHZ AP6330

Ethernet 10/100/1000M

 

-----------------------------------------------------------------------------------

The Android app "Hardware Info 4.2.6" gives me a little more detailed information:

 

AMLOGIC M9 PLUS

 

SYSTEM (Android 5.1.1)

Model: M9 PLUS

Manufacturer: amlogic

Device: p6330

Product: p6330

Brand: Android

Android Version: 5.1.1 (Lollipop)

API Level: 22

Build ID: LMY47V

Fingerprint: Android/p6330/p6330:5.1.1/LMY47V/20160224:userdebug/test-keys

 

DISPLAY (1920x1080)

Size: 1920x1080

Refresh Rate: 60 Hz

Default Orientation: Landscape

Physical Size: 13.77" (34.97 cm)

Logical Size: Large

Density: 240 dpi (High)

Pixels Per Inch: X: 159.9; Y: 160.42

 

PROCESSOR (AArch64)

Processor: AArch64 Processor rev 4 (aarch64)

Cores: 4

Max Frequency: 2016 MHz

Instruction Sets: armeabi-v7a, armeabi

SIMD Instructions: NEON

 

MEMORY (1811 MB)

System RAM: 1811 MB

JVM Max Memory: 192 MB

Internal Storage: 11770 MB

External Storage: 11770 MB (Emulated)

 

OPENGL 1.1 (Mali-450 MP)

 

GENERAL

Renderer: Mali-450 MP

Version: OpenGL ES-CM 1.1

Vendor: ARM

 

LIMITS

Texture Size: 4096x4096

Texture Units: 8

Viewport Size: 4096x4096

Modelview Stack Depth: 32

Projection Stack Depth: 32

Texture Stack Depth: 32

Lights: 8

 

Link to comment
Share on other sites

8 minutes ago, Tido said:

Thank you for your prompt reply and suggestions.

 

Yes, to the first one.

It is on of the threads that led me to try the older image because of the hdmi.sh script.

That is what gave me a stable screen, albeit with severe over scan.

It is also what lead to the RO mount of the system, instead of RW.

 

No, to the second.

I skimmed through it, mainly because of the topic.  I wish to run the system from the SD card, not burn it to the box, it's self.

This is to reduce the risk of bricking the box.  Also, if it would not work off of the SD, then why try writing it to the eMMC?

 

Cheers!

 

Naught.

Link to comment
Share on other sites

40 minutes ago, Naught McNoone said:

Thank you for your prompt reply and suggestions.

 

Yes, to the first one.

It is on of the threads that led me to try the older image because of the hdmi.sh script.

That is what gave me a stable screen, albeit with severe over scan.

It is also what lead to the RO mount of the system, instead of RW.

 

No, to the second.

I skimmed through it, mainly because of the topic.  I wish to run the system from the SD card, not burn it to the box, it's self.

This is to reduce the risk of bricking the box.  Also, if it would not work off of the SD, then why try writing it to the eMMC?

All startup and RO system problems are the result of bad media (or card reader). Try to run from USB.

Link to comment
Share on other sites

5 hours ago, Naught McNoone said:

Even with the bad over scan, I can initiate the login for the older file. It's not the first time I have had to deal with this type of issue. All that is needed is to blind type "root", enter, "1234", enter. I was now logged in.

Next, because the first log in requires a change of password, I typed in "1234" again, then my new password, twice. I should now be at the command line in terminal, and a few carriage returns to bring the resulting text into view will verify that. Not going to happen.

 

The dreaded "authentication token manipulation error" appeared, and the subsequent CR's resulted in me being logged out, and now it was a guess as to where I was on the login screen.

It seems that the system was mounted in Read Only mode, and that even as root, it would not allow me to write the new password to the disk.

 

This happened to me when I forgot to unmount the partitions of the SD Card before writing the armbian image on it using dd.

 

About the issue with the bad resolution, you may also try to run your personal dhcp server on your PC, connect the ethernet cable from your PC to the tv box and get a shell using ssh.

The following command uses dnsmasq to listen for DHCP packets on eth0 and assign an IP in the range 192.168.2.10 -> 192.168.2.20 when asked by the tvbox:

sudo dnsmasq -d --dhcp-range=192.168.2.10,192.168.2.20 -p 0 -i eth0 --except-interface=lo --bind-interfaces

 

Link to comment
Share on other sites

Thank you all for the advice.

 

Here is what I have learned so far.

 

On this particular box, none of the newer builds will initiate a boot.

 

The build Armbian_5.37_S9xxx_Ubuntu_xenial_3.14.29_mate_20171226.img, with the gxbb_p200_2G.dtb file, is the newest one, so far, that will give me a clean boot, and load a system.

 

All the Xenial versions seem to boot, and allow me to log in.  However, only the above one will do it without any issues.

 

The log in error may, or may not, have something to do with the wireless keyboard I am using.  Changing to a Logitech keyboard appears to have got me past the authentication token manipulation error.  But after setup, switching back to the mini keyboard seems to work just fine.

 

It works on a generic 8G USB stick (slow.)

Neither of my two available 32G SD cards will work.

It should be noted that both 32G SD's will load and run LibreELEC and ArchLinux (yuck!), but not any of the recent Debian or Ubuntu builds.

 

I will be in the big city tomorrow, where I can pick up a SanDisk 32G card.  But I some how doubt that that will make a difference.

 

I am inclined to think that the problem exists with the box it's self.

 

We shall see.

 

Cheers!

 

Naught.

 

Link to comment
Share on other sites

On 12/16/2018 at 3:24 PM, Tido said:

Are you using Etcher to burn?

Have you tried with 2 or more SDcards?  (we also have a nice section/collection for SDcards)

 

I use a simple CLI burn, where x = the assigned letter to the target SD or USB.

Make sure that none of the partitions on the device are mounted.

 

dd if=/<path to image file>/imagefile.img of=/dev/sdx  bs=4M

 

And, yes, I have tried a number of different SD cards and USB sticks.

 

Cheers!

 

Naught

Link to comment
Share on other sites

12 hours ago, Tido said:

dd  is fine for the backup, but an absolute no-go for burning. No go!

Why? I'm always using it while doing tests (and also at work, actually) burning SD cards and I encountered no problems so far. I have to admit although I'm using some particular flags to avoid cache (oflag=direct) and large block size (bs=512k).

The bad thing that is corrupting very often my burns is an already mounted partition which gets overwritten; I have to remember to unmount all partitions of the SD card before operating on it.

Link to comment
Share on other sites

After a couple of weeks tinkering with various images and dtb files, I have decided to put this project aside.

 

I suggest that whoever maintains the hardware compatibility list, to add this unit to the "Not Recommended" side.

 

For anyone else, out there, with an M9 Plus 4k, P6330 main board, and S905 A53 2.0GHz 64bit,  here is what I can tell you.

 

Xenial is the latest build that I could get to run on this unit.  Bionic will not boot, at all.

I have tried a SanDisk, Lexar, Kingston, and a generic 32GB Class 10 MicroSD, all with the same result.

 

The issue is most likely in the unit, it's self. 

I suspect that the main board is a cheap piece of sh** board, and that it has very minimal features enabled from the factory firmware.

I have concluded this, because it reports it's self as having a 1GB Ethernet, yet only 100MB drivers will load and work with it.

I can't complain, I got it for free!

 

In order to prevent over scan, you have to use one of the older images with the hdmi.sh script, to force it to 720p.

The older the image, the more stable it seems to be. 

The gxbb_p200_2G_100M.dtb file found in the older images is also the best choice.

I did not attempt to use wifi with the unit.  It is plugged into a 1G network switch.

 

Now, on the positive side.

The stupid box runs this perfectly with the 32GB generic (Staples No Name) micro SD.

LibreELEC-S905.arm-8.2-8.2.3.1-LePotato.img.gz

gxbb_p200_2G_100M.dtb

Go figure!

 

So, I restored my backup image of LibreELEC.

I will spend this weekend "Backing up" the BR/DVD/CD disks I got for Christmas onto my USB media drive, attached to it.

 

Happy New Year, to all.

Cheers!

 

Naught

 

Link to comment
Share on other sites

7 hours ago, Naught McNoone said:

The issue is most likely in the unit, it's self. 

I suspect that the main board is a cheap piece of sh** board, and that it has very minimal features enabled from the factory firmware.

 

That's what one would expect at a certain price point...

Link to comment
Share on other sites

15 hours ago, Naught McNoone said:

S905 A53

A quick look in this forum I found happy users with Kernel 3.14 with Amlogic S905 - your mileage may vary.

 

7 hours ago, sfx2000 said:

expect at a certain price point.

If you had read his comment, it was a gift... hmmm

 

Link to comment
Share on other sites

Spoiler

 

On 12/29/2018 at 6:38 PM, Naught McNoone said:

After a couple of weeks tinkering with various images and dtb files, I have decided to put this project aside.

 

I suggest that whoever maintains the hardware compatibility list, to add this unit to the "Not Recommended" side.

 

For anyone else, out there, with an M9 Plus 4k, P6330 main board, and S905 A53 2.0GHz 64bit,  here is what I can tell you.

 

Xenial is the latest build that I could get to run on this unit.  Bionic will not boot, at all.

I have tried a SanDisk, Lexar, Kingston, and a generic 32GB Class 10 MicroSD, all with the same result.

 

The issue is most likely in the unit, it's self. 

I suspect that the main board is a cheap piece of sh** board, and that it has very minimal features enabled from the factory firmware.

I have concluded this, because it reports it's self as having a 1GB Ethernet, yet only 100MB drivers will load and work with it.

I can't complain, I got it for free!

 

In order to prevent over scan, you have to use one of the older images with the hdmi.sh script, to force it to 720p.

The older the image, the more stable it seems to be. 

The gxbb_p200_2G_100M.dtb file found in the older images is also the best choice.

I did not attempt to use wifi with the unit.  It is plugged into a 1G network switch.

 

Now, on the positive side.

The stupid box runs this perfectly with the 32GB generic (Staples No Name) micro SD.

LibreELEC-S905.arm-8.2-8.2.3.1-LePotato.img.gz

gxbb_p200_2G_100M.dtb

Go figure!

 

So, I restored my backup image of LibreELEC.

I will spend this weekend "Backing up" the BR/DVD/CD disks I got for Christmas onto my USB media drive, attached to it.

 

Happy New Year, to all.

Cheers!

 

Naught

 

AFAIK, the problem usually is not related to the hardware itself. Some people reports that often these tvboxes are equipped with defective RAM or flash memories, which should be downclocked to work right, but it is common that they just work.

 

The boards follow more-or-less the chipmaker reference design, but it is very common to see some different chips to deal with Wifi, bluetooth, ethernet, PMU, RTC, etc...

As long as your box has a S905 SoC, you must use gxbb p200 device tree, otherwise the box won't boot at all!

Unfortunately, as I previously said, the peripheral chips are not always the same, so it is very common that the device boots but you don't get all the goodies from it (in your case, the gigabit ethernet), just because the ethernet/wifi/bluetooth/audio/whatever chip is not described in the device tree you used. Probably there isn't an already cooked device tree for your particular board, so you have to deal by yourself, but editing device trees requires deep hardware knowledge and is not at the reach of an average user.

 

I don't know if there is some armbian or community effort here, but device tree overlays are perfect for such job: you have the basic description of the SoC hardware in the main device tree, then every user manually add overlays for each piece of peripheral hardware of it's own board.

Edited by Tido
added spoiler
Link to comment
Share on other sites

  • Werner locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines