User Tools

Site Tools



en:bpi-r2:hdmi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:bpi-r2:hdmi [2018/05/25 12:57] franken:bpi-r2:hdmi [2023/06/08 17:06] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== HDMI ======
 +HDMI works with [[https://github.com/frank-w/BPI-R2-4.14/tree/4.16-hdmi|Kernel 4.16]] in some cases (1080p,1280x1024). Driver with fbdev was backported to 4.14 and ported to 4.19.in 5.0 hdmi works but fbdev does not.
  
 +Discussion in [[http://forum.banana-pi.org/t/hdmi-in-uboot-and-linux/4651|Forum]].
 +
 +Resolution can be set in BPI-BOOT/bananapi/bpi-r2/linux/uEnv.txt:
 +
 +  bootopts=vmalloc=496M debug=7 initcall_debug=0 video=1280x1024-32
 +
 +this resolution will be used for both virtual Console and [[X-Server]].
 +
 +more about this setting: [[https://nouveau.freedesktop.org/wiki/KernelModeSetting/]]
 +
 +to resize only font on Console this can be done:
 +
 +  setfont Uni3-TerminusBold32x16.psf.gz
 +
 +available fonts are in /usr/share/consolefonts/
 +
 +Thanks to ForumUser Alex R. aka "DeadMeat"
 +
 +Normally hdmi will be turned off if no monitor is connected (or switched off) while bootup. You can change this with a video-option:
 +
 +  video=HDMI-A-1:1280x1024-32@60D
 +
 +This keeps hdmi enabled and allow hotplug,but in my case there is a resolution-issue.
 +
 +http://forum.banana-pi.org/t/bpi-r2-hdmi-in-uboot-and-linux/4651/123
 +
 +===== DRM Debugging =====
 +
 +add "drm.debug=0x04" to bootopts in uEnv.txt (maybe 0x07 optionally with log_buf_len=1M)
 +
 +===== LIMA =====
 +
 +in 5.4 lima is merged to mainline-kernel and do need only some small changes for r2
 +
 +but it needs mesa compiled with some small changes too {{ :en:bpi-r2:mesa.patch |}}
 +
 +<code>
 +git clone --single-branch --branch mesa-19.3.2 https://gitlab.freedesktop.org/mesa/mesa.git mesa-source
 +cd mesa-source/
 +git checkout mesa-19.3.2
 +patch -p1 < mesa.patch
 +meson ./build --buildtype plain --libdir lib/arm-linux-gnueabihf --localstatedir /var/lib --prefix /usr --sysconfdir /etc --wrap-mode nodownload -Dplatforms=surfaceless,x11,drm -Dllvm=true -Dlmsensors=false -Dlibunwind=false -Dgallium-nine=false -Dgallium-va=false -Dgallium-vdpau=false -Dgallium-xa=false -Dgallium-xvmc=false -Dgallium-opencl=disabled -Dosmesa=none -Dbuild-tests=false -Dglx=dri -Dshared-glapi=true -Ddri3=true -Degl=true -Dgbm=true -Dgles1=false -Dgles2=true -Dglvnd=false -Dselinux=false -Dvalgrind=false -Ddri-drivers= -Dgallium-drivers=kmsro,lima
 +ninja -C build/
 +sudo ninja -C build/ install
 +</code>
 +
 +important for debian is "--libdir lib/arm-linux-gnueabihf" with only "lib" x-server crashes while loading with segmentation fault.
 +
 +maybe libdrm needs to be compiled too
 +
 +<code>
 +git clone --single-branch --branch libdrm-2.4.100 https://gitlab.freedesktop.org/mesa/drm.git
 +cd drm
 +git checkout libdrm-2.4.100
 +meson build/  --prefix=/usr
 +#meson --reconfigure  build/ --prefix /usr --libdir lib/arm-linux-gnueabihf -Damdgpu=false -Dradeon=false -Dnouveau=false
 +ninja -C build/
 +sudo ninja -C build/ install
 +#or install to a folder
 +mkdir install
 +DESTDIR=$(pwd)/install ninja -C build/ install
 +</code>
 +
 +==== usage ====
 +
 +while lima initialization hdmi display needs to connected (best at boottime). You can call initialization again by unloading+loading lima module (modprobe -r lima;modprobe lima)
 +
 +Xorg needs a little adjustment too,else you get this error (/var/log/Xorg.0.log):
 +
 +  (EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices
 +
 +just create /etc/X11/xorg.conf.d/40-serverflags.conf (there is no /etc/X11/xorg.conf by default) with the following content:
 +
 +  Section "ServerFlags"
 +        Option "AutoAddGPU" "off"
 +  EndSection
 +
 +==== disable glamore ====
 +
 +in case dri crashes on x startup with Sementation fault (because mesa is compiled for another kernel) you can disable it.
 +
 +first check /var/log/Xorg.0.log for something like this:
 +
 +<code>
 +[ 26.398] (II) Loading sub module "glamoregl"
 +[ 26.398] (II) LoadModule: "glamoregl"
 +[ 26.399] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
 +[ 26.424] (II) Module glamoregl: vendor="X.Org Foundation"
 +[ 26.424] compiled for 1.20.4, module version = 1.0.1
 +[ 26.424] ABI class: X.Org ANSI C Emulation, version 0.4
 +[ 26.829] (EE)
 +[ 26.830] (EE) Backtrace:
 +[ 26.830] (EE)
 +[ 26.830] (EE) Segmentation fault at address 0xbc
 +[ 26.830] (EE)
 +Fatal server error:
 +[ 26.830] (EE) Caught signal 11 (Segmentation fault). Server aborting
 +[ 26.830] (EE)
 +[ 26.831] (EE) 
 +</code>
 +
 +then create a file named /etc/X11/xorg.conf.d/00-noglamore.conf with following content:
 +
 +<code>
 +Section "Device"
 + Identifier "nogpu"
 + Driver "modesetting"
 + Option "Accelmethod" "none"
 +EndSection
 +
 +Section "Module"
 + Disable "glamoregl"
 +EndSection
 +</code>
 +
 +and then restart your display-manager (e.g. service lightdm restart)
 +
 +source: https://wiki.raptorcs.com/wiki/Troubleshooting/GPU