Showing posts with label bananapi. Show all posts
Showing posts with label bananapi. Show all posts

Saturday, February 13, 2016

Disabling Ubuntu Mate GUI on Startup

When you have already configured SSH in you BPI, you don't need GUI anymore unless you want to use your BPI as a media center. Turning off GUI enables a lot of resources because the xorg services is off.

to turn off GUI:
systemctl disable lightdm

to turn it on again:
systemctl enable lightdm

You can see that the xorg process itself is taking 25-45% of CPU usage.

another way to turning it off is by:

systemctl set-default multi-user.target --force 
systemctl disable lightdm.service --force
systemctl disable graphical.target --force 
systemctl disable plymouth.service --force

Sunday, February 7, 2016

Changing Banana Pi M1 Video Output

how to change banana pi m1 video output from hdmi to RCA 

So here it is, I get a banana pi m1 from my friend, and I don't have HDMI Monitors, so I try to plug the yellow RCA cable.
Surprisingly(yeah not surprising maybe), the video output is not the same with raspberry pi, where the default is you get video output on all port (e.g. RCA and HDMI). The default in Banana Pi is HDMI, either you boot in raspbian, ubuntu mate, etc. So you need to change the configuration file in the boot partition in SD Card.

Soo you think you can change the output by changing the cmdline? config.txt just like in raspberry pi?
no, you can't

you need to change the script.bin. You can find the script.bin in the root directory of your sd card if you are using ubuntu mate rom for banana pi. If you are using raspbian/bananian you can find the file in bananapi/script.bin

the file is binary, so you need to decode it first into a fex file. Convert it using this converter:

windows:
https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/fex-bin-convertor-windows

linux:
http://linux-sunxi.org/Sunxi-tools

mac:
http://lists.phcomp.co.uk/pipermail/arm-netbook/2012-May/003549.html

after decoding, you open the fex file, and find disp_init. The explanation of each field is as follows:

[disp_init]

  • disp_init_enable: 0 to disable; 1 to enable
  • disp_mode: Display mode to use:
modedisplay mode
0screen0(screen0, fb0)
1screen1(screen1, fb0)
2dualhead(screen0, screen1, fb0, fb1) (2 screens, 2 framebuffers)
3xinerama(screen0, screen1, fb0) (2 screens, one big framebuffer)
4clone(screen0, screen1, fb0) (2 screens, one standard framebuffer)
  • screen0_out_color_range: Output color range for HDMI (applies to both screen0/screen1 - there is no screen1_out_color_range):
typeoutput color range
016-255 Limited Range (Default)
10-255 Full Range - PC Level
216-235 Limited Range - Video Level
  • screen0_output_type: Output type for screen0:
  • screen1_output_type: Output type for screen1:
typeOutput type
0NONE
1LCD
2TV
3HDMI
4VGA
  • screen0_output_mode: Output mode for screen0:
  • screen1_output_mode: Output mode for screen1:
modeused for tv/hdmi outputused for vga output
0480i1680*1050
1576i1440*900
2480p1360*768
3576p1280*1024
4720p501024*768
5720p60800*600
61080i50640*480
71080i60
81080p24
91080p50
101080p601920*1080
11pal1280*720
14ntsc

This is my configuration:

  • composite tv/RCA/Yellow Cable/whatever you call it
  • HDMI is also on, so its like a clone display

[disp_init]
disp_init_enable = 1
disp_mode = 4
screen0_output_type = 3
screen0_output_mode = 1
screen1_output_type = 2
screen1_output_mode = 11
fb0_framebuffer_num = 2
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 1
fb1_framebuffer_num = 2
fb1_format = 10
fb1_pixel_sequence = 0
fb1_scaler_mode_enable = 1

For more info you can get it here:
http://linux-sunxi.org/Fex_Guide#disp_init_configuration

Now you can have the display of your banana pi in your tv!

Troubleshooting:

  1. if display dont come out, check the cable connection
  2. check if you edited the right file
  3. if the display is monochrome/black and white change the NTSC PAL configuration
  4. you can also turn off the EDID if the resolution is causing you problem