[BPI-R2] Hdmi in uboot and linux

Absolutely.

The card is OK, it’s a mechanical problem - ‘click&hold’ mechanism seems to be broken, so card slot can’t hold the card.

oh, thats very bad :frowning:

does the card hold inside or is it thrown out a bit?

can you send me the uEnv.txt, so that i can compare with my own?

#
## uEnv.txt
#
bpi=bananapi
board=bpi-r2
chip=mt7623n
service=linux
#
##
#
kernel=uImage
#
##
#
kaddr=0x84000000
rdaddr=0x86000000
#
##
#
#root=/dev/ram
root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200
bootopts=vmalloc=496M debug=7 initcall_debug=0
#
##
#
abootargs=setenv bootargs board=${board} console=${console} root=${root} service=${service} ${bootopts}
#
##
#
ahello=echo Banana Pi ${board} chip: $chip Service: $service
#
##
#
aboot=if fatload $device $partition $rdaddr ${bpi}/berryboot.img; then bootm $kaddr $rdaddr ; else bootm $kaddr; fi
#
##
#
aload_kernel=fatload $device $partition $kaddr ${bpi}/${board}/${service}/${kernel}
#
##
#
uenvcmd=run ahello abootargs aload_kernel aboot
#
## END
#
1 Like

you have the related settings set (in my uEnv missing):

console=tty1 fbcon=map:0

Probably it’s OS image related.

The card drops on any inaccurate movement.

got my cable, and i see fb-console-output (have not yet xserver installed)…

:+1:

only issue i have is that screen is not centered (login-prompt not visible), now i search a configuration option to fix this…most instructions are for grub :frowning:

IMG_20180524_cut

[16:50] root@bpi-r2:~# cat /sys/class/graphics/fb0/modes                                      
U:1920x1080p-0  
[16:51] root@bpi-r2:~# fbset -fb /dev/fb0 -g 1920 1080 1920 1080 16                           
ioctl FBIOPUT_VSCREENINFO: Invalid argument
[16:53] root@bpi-r2:~# echo U:1920x1080p-0 > /sys/class/graphics/fb0/mode                     
[16:53] root@bpi-r2:~# 

still no change

installed xserver-xorg and xinit

[16:57] root@bpi-r2:~# less /var/log/Xorg.0.log |grep EE                                      
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.                         
[   931.136] (EE) AIGLX: reverting to software rendering                                      
[   931.137] (EE) AIGLX error: dlopen of /usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so faile)
[   931.137] (EE) GLX: could not load software renderer                                       
[   931.729] (EE) Server terminated successfully (0). Closing log file.

after installing libgl1-mesa-dri

[17:02] root@bpi-r2:~# less /var/log/Xorg.0.log |grep EE                                      
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.                         
[  1319.003] (EE) AIGLX: reverting to software rendering                                      
[  1319.495] (EE) Server terminated successfully (0). Closing log file.

playing around with disp-options in uenv.txt from here [how to]the final solution of compulsive modification of HDMI output resolution, but also no success

it’s a long time ago i have configured last time a x-server manually :stuck_out_tongue:

my servers are headless, maybe only a vncserver, which have not to be configured, clients are all ubuntu

logs showing no real error as far as i see

Xorg.0.log (21,0 KB) dmesg.log (85,0 KB)

after installing lxde i got a graphical interface, still not correctly aligned, but a step further. Problem before is fixed (i guess missing displaymanager)

additionally i had to install “policykit-1”

the alignment-problem is also fixed by realigning-function of the TV…nothing to do on bpi-r2

Hello, Frank

As i know driver supports only 32bit color depth, so u probably should try

fbset -fb /dev/fb0 -g 1920 1080 1920 1080 32

If I get you right, You’ve finnaly solved your aligment problem by TV-settings? So now You have both framebuffer and Xserver?

Right,both working…but it will be nice to set the resolution of console (make font larger).

I need to know how to set Resolution (hdmi mode) in uboot (if cec fails). I will try out vga and dvi-adapters next days.

Hi, if the only reason is font size, You may try change font. For example:

setfont Uni3-TerminusBold28x14.psf.gz
setfont Uni3-TerminusBold32x16.psf.gz

These are really big :slight_smile:

Available fonts are in /usr/share/consolefonts/.

Imho after kenrel starts it overrides any previous settings on fb init. So the proper way is likely to deal with KMS settings. (Unless You need some predefined resolution in uboot, of course)

Btw, i’ve rebooted the kernel with modified uEnv.txt

bootopts=vmalloc=496M debug=7 initcall_debug=0 video=1600x900-32

And it hepld.

New photo by Alexander Ryabchenko

My monitor’s native resolution is 1920x1080, and it was successfully overrided by “video=” parameter. The only issue for me is that that parameter affects Xorg server too.

I’ve used this and this for example and explanation

1 Like

I will try these settings with 1024x768 (vga-adapter+15" monitor) and 1280x1024 (dvi+19"). There it is right to use it also for xserver

Have you found a way to boot with your damaged slot?

setfont works well, tried to set resolution to video=1280x720-32 (720p) but my tv seems not to support this…with “720x480-32” (tried 800x600, but also unsupported mode) i see large text on TV, so this setting works so far. Seems to be a Problem of TV not hdmi-driver or R2

hdmi->dvi works in my test with video=1280x1024-32 (native resolution of TFT)

hdmi->vga gives a fuzzy image on screen (800x600-32,native 1024x768 does not work)…but i guess it’s a adapter-/tft-Problem…these are quite old :slight_smile: IMG_20180525_112206_small

Mhm on raspberry3 same adapter with this monitor works with 1024x768 (hdmi-group=2,mode=16): IMG_20180525_115138_1024x768

I’ve found a service which can fix or replace it, but I can’t get there until weekend. For now I’ve applied temporary “there, I fixit”-style solution with a peace of duct tape :slight_smile:

Probably a driver issue, I’ll try to apply these modes, but anyway we need more testers.

Maybe wrong frequency (75 instead of 60hz)…how can i set frequency in video-param? Or can i set modes like on rpi?

anyway, i thinking about porting actual code to 4.16-main…in most cases hdmi works…

are you working on porting it to 4.14?

Added a HMDI-section in my wiki to summarize the infos we have collected so far

Please try 1024x768@60 or 1024x768-32@60, see second link that I’ve provided for proper synthax

Not yet, I took overtime at work, so, probably next week.

Unfortunately both will result in this: _20180525_1024

In comparision to rpi the hsync-value is wrong…sorry loaded wrong kernel last time so the fb0 disappeared

[13:32] root@bpi-r2:~# cat /sys/class/graphics/fb0/modes                                                                                                          
U:1024x768p-0                                                                                                                                                     
[13:33] root@bpi-r2:~# fbset -fb /dev/fb0 -g 1024 768 1024 768 32

but no effect

It’s looks strange, horisontal frequency is overclocked. Probably it’s not supported mode. Is there anything useful in dmesg?

I’m not sure about r2, but I’ve tested fbset command on my desktop with Radeon card and it actually changes only terminal size (cols and rows) but not resolution.

not really: dmesg-hdmi.txt (58,2 KB)

also with -32: dmesg-hdmi-32.txt (58,2 KB)

is there a command i can try to set KMS without rebooting and forcing that monitor recognize the change?

also with nomodeset i’m having hsync of 67.x hz, found a documentation where hsync can be set in drm-code: https://www.kernel.org/doc/html/v4.8/gpu/drm-kms.html

activated drm-debug which i have found somewhere: dmesg-hdmi-32-debug.txt (9,3 KB)

IMG_20180525_150914_800 IMG_20180525_151119_640