CM-FX6: Android: Operating instructions

From Compulab Mediawiki
Jump to: navigation, search


Most CM-FX6 supported features are operated using normal Android controls.
This page contains information about features and services, which are less straight-forward to operate, or are less widely known.

Operating instructions

Display configuration

By default CM-FX6 is configured to use HDMI display with 1080p resolution.
This setting can be overridden by providing alternate boot arguments to the Android/Linux kernel.

  • Connect to the serial console as explained in the Development section.
  • Press ENTER to stop the countdown.
setenv videomode video=mxcfb0:dev=hdmi,if=RGB24,1920x1080M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off    # default video mode (HDMI)
setenv videomode video=mxcfb0:dev=dvi,if=RGB24,1920x1080M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off     # DVI display with 1080p resolution
setenv videomode video=mxcfb0:dev=dvi,if=RGB24,1280x1024M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off     # DVI display with 1280x1024 resolution
setenv videomode video=mxcfb0:dev=lcd,if=RGB666,SCF04-WVGA video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off       # DataImage 480x800 LCD
setenv videomode video=mxcfb0:dev=lcd,if=RGB24,KD050C-WVGA video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off       # Startek 800x480 LCD
  • Type in boot to proceed to kernel boot overriding default video mode.

Handling memory shortage

Devices with small amount of physical memory (~512MB) might experience memory shortage expressed by system processes being killed and restarted repeatedly, resulting in performance lag.
In this case, freeing up some memory reserved for graphics sub-system might turn out useful, e.g. by degrading screen resolution to 720p and lowering GPU-reserved memory below default 192MB, by appropriately setting videomode bootloader variable:

setenv videomode video=mxcfb0:dev=hdmi,if=RGB24,1280x720M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off gpumem=64M

Accessing Bootloader Variables from Android

CM-FX6 Android is packed with fw_printenv and fw_setenv u-boot tools, that allow viewing and setting U-Boot environment variables from Android, as opposed to U-Boot console.
For instance, display configuration settings could be overridden from Android:

  • Connect ADB to CM-FX6
  • On PC workstation, issue
$ adb root
Admolition note.png In case ADB is connected via USB, detach / re-attach USB cable.
  • Display videomode setting
$ adb shell fw_printenv videomode
  • Set videomode to DVI
$ adb shell fw_setenv videomode video=mxcfb0:dev=dvi,if=RGB24,1920x1080M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off
  • Reboot CM-FX6

Automatic suspend when inactive

By default, CM-FX6 is configured to stay awake while connected to the power.
In order to change this behavior, proceed to Settings->Developer options, uncheck Stay awake ... while charging to enable the device going to suspended state.

Admolition note.png If Developer options item is hidden, re-introduce it proceeding to Settings->About tablet and clicking on Build number 7 times consequently.

ON/OFF button

ON/OFF button suspends and resumes CM-FX6 operation (i.e. sends to sleep / wakes up), whenever suspend is not disabled manually, or by Android policy.
Pressing and holding the ON/OFF button for more than 5 seconds, will unconditionally power the module down. This operation is pretty much equivalent to unplugging the power supply, so it should really be considered the last resort.

Graceful shutdown

Due to specifics of i.MX6 SoC hardware, the ON/OFF button cannot be used to bring up the Android Power off menu.
CM-FX6 pre-configures GPIO 29 (P18, pin 2 on SB-FX6 base board) as GPIO Power Button. As GPIO 29 has an internal pull-up resistor, it can be momentarily connected to the ground to produce a power button press. Short press will behave identically to short press on ON/OFF button, whereas long press will bring up the Power off menu allowing graceful shutdown.

Physical HOME button

GPIO 205 (GPIO7_13) is pre-programmed as hadware HOME key.


CM-FX6 Android package permits full root access.
The su utility will switch a user to root not requiring any credentials or password.
In order to harden system security one might replace su implementation or remove it altogether.

Start-up script

/system/etc/ script is run upon system boot by Android init process with root permissions.
As system partition is mounted 'read-only', one should remount system 'rw', prior to attempting to edit the script.


Normal Android behavior is to prioritize network interfaces (in descend order):

  • Ethernet
  • Wi-Fi
  • 3G [not supported]

Whenever higher-priority network interface is available, the lower-priority interfaces will be torn down.

Audio sink selection

CM-FX6 may use either one of the following audio devices:

  • HDMI - default when HDMI video is selected, and totally inaccessible otherwise
  • analog - default when DVI video is selected
  • S/PDIF

Audio sink selection should be done with a designated application, e.g. SoundAbout, available via Google Play Store.

audio device sink name
HDMI Aux Digital (HDMI)
analog Speaker
S/PDIF Wired Headphones

Admolition note.png If after making the selection with SoundAbout nothing happens, restart the application.