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 revision Previous revision
Next revision
Previous revision
en:bpi-r2:hdmi [2019/02/26 19:08]
frank [HDMI]
en:bpi-r2:hdmi [2020/05/29 08:15] (current)
frank [usage]
Line 6: Line 6:
 Resolution can be set in BPI-BOOT/​bananapi/​bpi-r2/​linux/​uEnv.txt:​ Resolution can be set in BPI-BOOT/​bananapi/​bpi-r2/​linux/​uEnv.txt:​
  
-    ​bootopts=vmalloc=496M debug=7 initcall_debug=0 video=1280x1024-32+  ​bootopts=vmalloc=496M debug=7 initcall_debug=0 video=1280x1024-32
  
 this resolution will be used for both virtual Console and [[X-Server]]. this resolution will be used for both virtual Console and [[X-Server]].
Line 14: Line 14:
 to resize only font on Console this can be done: to resize only font on Console this can be done:
  
-    ​setfont Uni3-TerminusBold32x16.psf.gz+  ​setfont Uni3-TerminusBold32x16.psf.gz
  
 available fonts are in /​usr/​share/​consolefonts/​ available fonts are in /​usr/​share/​consolefonts/​
Line 31: Line 31:
  
 add "​drm.debug=0x04"​ to bootopts in uEnv.txt (maybe 0x07 optionally with log_buf_len=1M) 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
en/bpi-r2/hdmi.1551204532.txt.gz · Last modified: 2019/02/26 19:08 by frank