Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: polikuo on August 18, 2023, 10:32:57 AM
-
Hi, all.
I've been poking around on PI3B lately (14.0 armv7)
Couldn't get graphics-KERNEL working, the screen always goes black when loaded.
Can reboot with the keyboard just fine, so I know the system doesn't freeze.
If I comment out dtoverlay=vc4-kms-v3d, then load the extension, nothing will happen.
Although I can probably do that and start compiling stuff, I'd rather not.
I've tried both older and newer rpi-vc.tcz from repo (14.0 armv7) and (14.0 armv7l)
Booting with base norestore
Replace graphics-armv7 with graphics-armv7l
None of them would keep the screen on once the graphics extension is loaded
Any suggestions ? I'm new to kernel modules debugging
config.txt in brief
initramfs rootfs-piCore-14.0.gz,modules-6.1.25-piCore-v7.gz followkernel
kernel kernel6125v7.img
cmdline cmdline.txt
disable_overscan=1
hdmi_force_hotplug=1
#hdmi_group=1
#hdmi_mode=4
hdmi_group=2
hdmi_mode=85
dtparam=audio=on
dtoverlay=vc4-kms-v3d
gpu_mem=256
lsmod differences
$ diff -u lsmod-6.1.25-piCore-v7.before.txt lsmod-6.1.25-piCore-v7.after.txt
--- lsmod-6.1.25-piCore-v7.before.txt
+++ lsmod-6.1.25-piCore-v7.after.txt
@@ -1,6 +1,11 @@
-Module Size Used by Not tainted
+Module Size Used by Tainted: G
+fixed 16384 0
i2c_bcm2835 16384 0
raspberrypi_hwmon 16384 0
-squashfs 53248 0
+snd 94208 3 snd_bcm2835,snd_pcm,snd_timer
+snd_bcm2835 28672 0
+snd_pcm 122880 1 snd_bcm2835
+snd_timer 36864 1 snd_pcm
+squashfs 53248 2
zram 28672 2
zsmalloc 28672 1 zram
-
dmesg differences
--- /mnt/mmcblk0p1/dmesg.before
+++ /mnt/mmcblk0p1/dmesg.after
@@ -259,3 +259,16 @@
[ 4.957557] smsc95xx 1-1.1:1.0 eth0: Link is Down
[ 16.810159] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 22.958626] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: none.
+[ 116.003869] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
+[ 116.021550] bcm2835_audio bcm2835_audio: card created with 4 channels
+[ 116.023816] bcm2835_audio bcm2835_audio: card created with 4 channels
+[ 116.882328] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
+[ 116.883764] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
+[ 116.883782] [vc_sm_connected_init]: start
+[ 116.912123] [vc_sm_connected_init]: installed successfully
+[ 117.069908] Console: switching to colour dummy device 80x30
+[ 117.087777] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
+[ 117.091788] [drm] forcing HDMI-A-1 connector on
+[ 117.092233] Registered IR keymap rc-cec
+[ 117.092452] rc rc0: vc4-hdmi as /devices/platform/soc/3f902000.hdmi/rc/rc0
+[ 117.092669] input: vc4-hdmi as /devices/platform/soc/3f902000.hdmi/rc/rc0/input4
-
You have a pi3, do not use the armv7l kernel/drivers
If you do not use the vc4 overlay, then the framebuffer should run as normal. However when you load the VC4 driver, the screen will turn black, the driver takes the hardware completely over, you need to startX for anything to display.
I have pi3's and pi4s running with and without the vc4 driver, and everything works as expected.
-
The problem may be the one cited at:
https://github.com/torvalds/linux/commit/d1c0b7de4dfa5505cf7a1d6220aa72aace4435d0 (https://github.com/torvalds/linux/commit/d1c0b7de4dfa5505cf7a1d6220aa72aace4435d0)
http://forum.tinycorelinux.net/index.php/topic,26080.0.html (http://forum.tinycorelinux.net/index.php/topic,26080.0.html)
The solution: load the snd-soc-hdmi-codec module (in alsa-modules) before vc4 (in graphiics-modules)
-
The solution: load the snd-soc-hdmi-codec module (in alsa-modules) before vc4 (in graphiics-modules)
Hi mortegai
Thanks for the input.
However, alsa-modules is a dependence of graphics-modules, which is loaded automatically
Anyway, I've found a solution without knowing why and would like some insight from experts. :)
The easy fix is, replace dtoverlay=vc4-kms-v3d with dtoverlay=vc4-fkms-v3d
Reboot with that setting, I can load graphics modules without going black.
I tried compiling V3DLib mentioned here (http://forum.tinycorelinux.net/index.php/topic,25728.0.html)
Most tests end like this
sudo ./obj/qpu-debug/bin/GCD
terminate called after throwing an instance of 'V3DLib::Exception'
what(): FATAL: Unable to enable QPUs. Check your firmware is latest.
Aborted
detectPlatform
sudo ./obj/qpu-debug/bin/detectPlatform
Platform : Raspberry Pi 3 Model B Rev 1.2
Model Number: BCM2837
Revision : a02082
This is a pi platform.
GPU: vc4 (VideoCore IV)
-
Hi polikuo
... Anyway, I've found a solution without knowing why and would like some insight from experts. :)
The easy fix is, replace dtoverlay=vc4-kms-v3d with dtoverlay=vc4-fkms-v3d ...
Just a wild guess, but maybe the f in vc4-fkms-v3d stands for framebuffer ?
-
I seem to recall it means fake or firmware kms and was the old way of doing things now superseded by fully open source kernel/mesa drivers?
-
Yes, its firmware, and the fkms driver is old, it was developed when the kms driver was not fully integrated.
I’m still not clear on what you are trying to do. Are you loading Xorg3d?
-
Hi Rich
Just a wild guess, but maybe the f in vc4-fkms-v3d stands for framebuffer ?
I guess that's a yes.
Hi Juanito
I seem to recall it means fake or firmware kms and was the old way of doing things now superseded by fully open source kernel/mesa drivers?
A bit of google search leads me to this post (https://forums.raspberrypi.com/viewtopic.php?p=1951931&sid=9f856f2c1b678417dd0719e7d04207d8#p1951931)
It also mentions
A lot of that stuff near the top of config.txt is for the older "fkms" driver and does nothing when using Bullseye's default "kms" driver (hdmi_force_hotplug, hdmi_group, hdmi_mode, hdmi_drive...).
Gotta mess around and see what happens.
Does vc4-kms-v3d work for you ? (the newer one, without f)
Hi Paul
I’m still not clear on what you are trying to do. Are you loading Xorg3d?
Me neither, I was loading extensions (Xorg-3d included) when the screen turned black.
Trying to figure things out and comparing my settings between armv7 and aarch64.
Searching the the forum to see if anything turns out being helpful.
They say hardware acceleration is a great idea, so I try it out.
Still looking for ways to properly configure it and test it out to see the differences.
-
Does vc4-kms-v3d work for you ?
Yes - although when booting directly into a gui it fails waiting for x more than half the time, presumably because the drivers are still loading and needs starting manually.