Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] RPI Opengl - Wrong DRM connector? #3946

Closed
colesnicov opened this issue Apr 30, 2024 · 14 comments
Closed

[core] RPI Opengl - Wrong DRM connector? #3946

colesnicov opened this issue Apr 30, 2024 · 14 comments
Labels
platform: DRM/RPI DRM/Raspberry Pi platform

Comments

@colesnicov
Copy link

colesnicov commented Apr 30, 2024

Issue description

I got have a same display and have has same the problem like his one: https://www.reddit.com/r/raylib/comments/ykmke0/raylib_on_1280x400_hdmi_screen_w_fbconrotate3/

When I run core_basic_window, everything is fine, well almost. I had to edit the examples, change the size (width) of the window in them from 800 px to a smaller one. My display is in a vertical position, so it is 400 px wide. when I try to create a window in the program that is larger than the screen resolution, instead of one window, 4 small ones are displayed, which in addition slowly disappear in black, and then only some text and letters are visible... When I adjusted the window size to 400px, everything works. When I adjusted the window size to 300px, so everything works.

Here is the output at 300px width:

denis@raspberrypi:~/dev/raylib/examples $ ./core/core_basic_window 
INFO: Initializing raylib 5.1-dev
INFO: Platform backend: NATIVE DRM
INFO: Supported raylib modules:
INFO:     > rcore:..... loaded (mandatory)
INFO:     > rlgl:...... loaded (mandatory)
INFO:     > rshapes:... loaded (optional)
INFO:     > rtextures:. loaded (optional)
INFO:     > rtext:..... loaded (optional)
INFO:     > rmodels:... loaded (optional)
INFO:     > raudio:.... loaded (optional)
INFO: DISPLAY: No graphic card set, trying platform-gpu-card
INFO: DISPLAY: Failed to open platform-gpu-card, trying card1
INFO: DISPLAY: Failed to open graphic card1, trying card0
INFO: DISPLAY: Selected DRM connector mode 384x1280 (384x1280p@62)
INFO: DISPLAY: Upscaling required: Screen size (300x450) smaller than display size (384x1280)
INFO: DISPLAY: Device initialized successfully
INFO:     > Display size: 384 x 1280
INFO:     > Screen size:  300 x 450
INFO:     > Render size:  300 x 450
INFO:     > Viewport offsets: 0, 550
WARNING: GetCurrentMonitor() not implemented on target platform
WARNING: GetMonitorWidth() not implemented on target platform
WARNING: GetCurrentMonitor() not implemented on target platform
WARNING: GetMonitorHeight() not implemented on target platform
WARNING: SetWindowPosition() not available on target platform
INFO: GL: Supported extensions count: 59
INFO: GL: OpenGL device information:
INFO:     > Vendor:   Broadcom
INFO:     > Renderer: VC4 V3D 2.1
INFO:     > Version:  OpenGL ES 2.0 Mesa 23.2.1-1~bpo12+rpt3
INFO:     > GLSL:     OpenGL ES GLSL ES 1.0.16
INFO: GL: VAO extension detected, VAO functions loaded successfully
INFO: GL: NPOT textures extension detected, full NPOT textures supported
INFO: GL: DXT compressed textures supported
INFO: GL: ETC1 compressed textures supported
INFO: INPUT: Initialized input device /dev/input/event1 as keyboard
INFO: INPUT: Initialized input device /dev/input/event0 as mouse
WARNING: DRM: Failed to change keyboard mode, an SSH keyboard is probably used
INFO: PLATFORM: DRM: Initialized successfully
INFO: TEXTURE: [ID 1] Texture loaded successfully (1x1 | R8G8B8A8 | 1 mipmaps)
INFO: TEXTURE: [ID 1] Default texture loaded successfully
INFO: SHADER: [ID 1] Vertex shader compiled successfully
INFO: SHADER: [ID 2] Fragment shader compiled successfully
INFO: SHADER: [ID 3] Program shader loaded successfully
INFO: SHADER: [ID 3] Default shader loaded successfully
INFO: RLGL: Render batch vertex buffers loaded successfully in RAM (CPU)
INFO: RLGL: Render batch vertex buffers loaded successfully in VRAM (GPU)
INFO: RLGL: Default OpenGL state initialized successfully
INFO: TEXTURE: [ID 2] Texture loaded successfully (128x128 | GRAY_ALPHA | 1 mipmaps)
INFO: FONT: Default font loaded successfully (224 glyphs)
INFO: TIMER: Target time per frame: 16.667 milliseconds
INFO: TEXTURE: [ID 2] Unloaded texture data from VRAM (GPU)
INFO: SHADER: [ID 3] Default shader unloaded successfully
INFO: TEXTURE: [ID 1] Default texture unloaded successfully
INFO: Window closed successfully

But if I set the size to 400px, which is the physical resolution of my monitor, it's screwed,
here is the output:

denis@raspberrypi:~/dev/raylib/examples $ ./core/core_basic_window 
INFO: Initializing raylib 5.1-dev
INFO: Platform backend: NATIVE DRM
INFO: Supported raylib modules:
INFO:     > rcore:..... loaded (mandatory)
INFO:     > rlgl:...... loaded (mandatory)
INFO:     > rshapes:... loaded (optional)
INFO:     > rtextures:. loaded (optional)
INFO:     > rtext:..... loaded (optional)
INFO:     > rmodels:... loaded (optional)
INFO:     > raudio:.... loaded (optional)
INFO: DISPLAY: No graphic card set, trying platform-gpu-card
INFO: DISPLAY: Failed to open platform-gpu-card, trying card1
INFO: DISPLAY: Failed to open graphic card1, trying card0
INFO: DISPLAY: Selected DRM connector mode 1280x720 (1280x720p@100)
INFO: DISPLAY: Upscaling required: Screen size (400x450) smaller than display size (1280x720)
INFO: DISPLAY: Device initialized successfully
INFO:     > Display size: 1280 x 720
INFO:     > Screen size:  400 x 450
INFO:     > Render size:  400 x 450
INFO:     > Viewport offsets: 400, 0
WARNING: GetCurrentMonitor() not implemented on target platform
WARNING: GetMonitorWidth() not implemented on target platform
WARNING: GetCurrentMonitor() not implemented on target platform
WARNING: GetMonitorHeight() not implemented on target platform
WARNING: SetWindowPosition() not available on target platform
INFO: GL: Supported extensions count: 59
INFO: GL: OpenGL device information:
INFO:     > Vendor:   Broadcom
INFO:     > Renderer: VC4 V3D 2.1
INFO:     > Version:  OpenGL ES 2.0 Mesa 23.2.1-1~bpo12+rpt3
INFO:     > GLSL:     OpenGL ES GLSL ES 1.0.16
INFO: GL: VAO extension detected, VAO functions loaded successfully
INFO: GL: NPOT textures extension detected, full NPOT textures supported
INFO: GL: DXT compressed textures supported
INFO: GL: ETC1 compressed textures supported
INFO: INPUT: Initialized input device /dev/input/event1 as keyboard
INFO: INPUT: Initialized input device /dev/input/event0 as mouse
WARNING: DRM: Failed to change keyboard mode, an SSH keyboard is probably used
INFO: PLATFORM: DRM: Initialized successfully
INFO: TEXTURE: [ID 1] Texture loaded successfully (1x1 | R8G8B8A8 | 1 mipmaps)
INFO: TEXTURE: [ID 1] Default texture loaded successfully
INFO: SHADER: [ID 1] Vertex shader compiled successfully
INFO: SHADER: [ID 2] Fragment shader compiled successfully
INFO: SHADER: [ID 3] Program shader loaded successfully
INFO: SHADER: [ID 3] Default shader loaded successfully
INFO: RLGL: Render batch vertex buffers loaded successfully in RAM (CPU)
INFO: RLGL: Render batch vertex buffers loaded successfully in VRAM (GPU)
INFO: RLGL: Default OpenGL state initialized successfully
INFO: TEXTURE: [ID 2] Texture loaded successfully (128x128 | GRAY_ALPHA | 1 mipmaps)
INFO: FONT: Default font loaded successfully (224 glyphs)
INFO: TIMER: Target time per frame: 16.667 milliseconds
INFO: TEXTURE: [ID 2] Unloaded texture data from VRAM (GPU)
INFO: SHADER: [ID 3] Default shader unloaded successfully
INFO: TEXTURE: [ID 1] Default texture unloaded successfully
INFO: Window closed successfully

Environment

Raspberry PI 2B, Raspberry OS LITE

Code Example

I used sample examples. I just changed the width of the window from 800px to 400px or to 300px.

Append

I checked it now. 400px doesn't work but 300px does.

I'm wondering if it's not the fault of the 'underscan' (black border around the screen) that it detects wrongly? In raspi-config => Display Options => D1 Underscan I do not have compensation enabled.

P.S. https://www.reddit.com/r/raylib/comments/ykmke0/raylib_on_1280x400_hdmi_screen_w_fbconrotate3/ The file you refer to has already been edited a lot and I can't imagine what happened there.

@colesnicov
Copy link
Author

Heres photo: Screenshot of a bad detected GLES resolutions...

@colesnicov
Copy link
Author

Underscan is NOT that. Cause i've not installed X..

$sudo raspi-config 
/usr/bin/raspi-config: 428: xrandr: not found
/usr/bin/raspi-config: 457: xrandr: not found
/usr/bin/raspi-config: 460: xrandr: not found
/usr/bin/raspi-config: 461: xrandr: not found
sed: can't read /usr/share/dispsetup.sh: No such file or directory

@colesnicov
Copy link
Author

I was wondering where is the magic limit beyond which it falls, it's 384px, everything above the image is destroyed. Because I don't have a desktop installed, I can't set the screen. Editing underscan in config.txt did not help. There are 16 pixels that are probably doing something wrong somewhere. or I don't see.. Desktop OS detects the size well and displays the correct resolution....

@raysan5
Copy link
Owner

raysan5 commented Apr 30, 2024

@colesnicov thanks for the detailed report! I'm afraid I don't know what causes this issue, maybe it could be related to the driver or the display supported resolutions... I neither have the means to reproduce or track the issue...
Please, let me know if you keep investigating it.
Maybe @michaelfiber knows what could happen...

@colesnicov
Copy link
Author

@raysan5

Thanx. Sometimes, when the problem is unclear, a detailed analysis of the problem may be the only way to fix it...

The link I wrote in the first comment, did you deal with a gentleman there, I mean something similar? Which code/function in the code did you refer to?

I honestly don't know how all these DRM layers and layers work, even though I've read about it. I have no idea about that. I know more about FreeRtos than about Embedded Linux :/ But I think you might have the framebuffer trimming set up wrong?

Such things happened to me with (as an example) AVR + ssd1136 where I wrote beyond the limits of the buffer (physical display) and then the pixels appeared differently on the display..? Of course it was a mistake..

@michaelfiber
Copy link
Contributor

michaelfiber commented May 1, 2024

INFO: DISPLAY: Selected DRM connector mode 384x1280 (384x1280p@62)

This line in the successful test means that this is one of the supported modes that was found. It ends up all screwed up with the 400px size because it can't find a mode with a width that fits that. raylib is depending on libdrm to provide a list of available connector modes and libdrm isn't finding one with a width of 400.

You can use SetTraceLog to increase the logging to show you more output regarding what raylib is getting from DRM, including how many modes it is actually finding. It wouldn't shock me if it is only finding 1 mode (384x1280p@62).

I don't know exactly how DRM figures out the modes, I believe it uses a formula and reads information about the device to determine what resolutions are supported. If that belief is true, then it's possible something about the drivers for this device don't play well with that formula.

@michaelfiber
Copy link
Contributor

Actually it looks like the drm info should be coming from here: https://github.com/waveshare/linux-patch/blob/e9da5fc701b637f9379d89044005e3d15997802c/drivers/gpu/drm/panel/panel-waveshare-dsi.c#L98

And that looks correct...I guess? Not sure what's happening but I do believe this could be outside the realm of raylib.

@raysan5 raysan5 added the platform: DRM/RPI DRM/Raspberry Pi platform label May 1, 2024
@colesnicov
Copy link
Author

@michaelfiber

You can use SetTraceLog to increase the logging to show you more output regarding what raylib is getting from DRM, including how many modes it is actually finding. It wouldn't shock me if it is only finding 1 mode (384x1280p@62).

I set SetTraceLogLevel(0); and this what can i see:

denis@raspberrypi:~/dev/raylib/examples $ ./core/core_basic_window 
INFO: Initializing raylib 5.1-dev
INFO: Platform backend: NATIVE DRM
INFO: Supported raylib modules:
INFO:     > rcore:..... loaded (mandatory)
INFO:     > rlgl:...... loaded (mandatory)
INFO:     > rshapes:... loaded (optional)
INFO:     > rtextures:. loaded (optional)
INFO:     > rtext:..... loaded (optional)
INFO:     > rmodels:... loaded (optional)
INFO:     > raudio:.... loaded (optional)
INFO: DISPLAY: No graphic card set, trying platform-gpu-card
INFO: DISPLAY: Failed to open platform-gpu-card, trying card1
INFO: DISPLAY: Failed to open graphic card1, trying card0
TRACE: DISPLAY: Connectors found: 1
TRACE: DISPLAY: Connector index 0
TRACE: DISPLAY: Connector modes detected: 3
TRACE: DISPLAY: DRM mode connected
TRACE: DISPLAY: Searching exact connector mode for 384x450@60, selecting an interlaced mode is allowed: no
TRACE: DISPLAY: DRM Mode 0 400x1280@60 progressive
TRACE: DISPLAY: DRM Mode 1 1280x720@100 progressive
TRACE: DISPLAY: DRM Mode 2 384x1280@62 progressive
TRACE: DISPLAY: No DRM exact matching mode found
TRACE: DISPLAY: Searching nearest connector mode for 384x450@60, selecting an interlaced mode is allowed: no
TRACE: DISPLAY: DRM mode: 0 400x1280@60 progressive
TRACE: DISPLAY: DRM mode: 1 1280x720@100 progressive
TRACE: DISPLAY: DRM mode: 2 384x1280@62 progressive
INFO: DISPLAY: Selected DRM connector mode 384x1280 (384x1280p@62)
TRACE: DISPLAY: EGL configs available: 18
TRACE: DISPLAY: EGL matching configs available: 4
TRACE: DISPLAY: Using EGL config: 0
INFO: DISPLAY: Upscaling required: Screen size (384x450) smaller than display size (384x1280)
INFO: DISPLAY: Device initialized successfully
INFO:     > Display size: 384 x 1280
INFO:     > Screen size:  384 x 450
INFO:     > Render size:  384 x 450
INFO:     > Viewport offsets: 0, 830
WARNING: GetCurrentMonitor() not implemented on target platform
WARNING: GetMonitorWidth() not implemented on target platform
WARNING: GetCurrentMonitor() not implemented on target platform
WARNING: GetMonitorHeight() not implemented on target platform
WARNING: SetWindowPosition() not available on target platform
INFO: GL: Supported extensions count: 59
INFO: GL: OpenGL device information:
INFO:     > Vendor:   Broadcom
INFO:     > Renderer: VC4 V3D 2.1
INFO:     > Version:  OpenGL ES 2.0 Mesa 23.2.1-1~bpo12+rpt3
INFO:     > GLSL:     OpenGL ES GLSL ES 1.0.16
INFO: GL: VAO extension detected, VAO functions loaded successfully
INFO: GL: NPOT textures extension detected, full NPOT textures supported
INFO: GL: DXT compressed textures supported
INFO: GL: ETC1 compressed textures supported
INFO: INPUT: Initialized input device /dev/input/event1 as keyboard
INFO: INPUT: Initialized input device /dev/input/event0 as mouse
WARNING: DRM: Failed to change keyboard mode, an SSH keyboard is probably used
INFO: PLATFORM: DRM: Initialized successfully
INFO: TEXTURE: [ID 1] Texture loaded successfully (1x1 | R8G8B8A8 | 1 mipmaps)
INFO: TEXTURE: [ID 1] Default texture loaded successfully
INFO: SHADER: [ID 1] Vertex shader compiled successfully
INFO: SHADER: [ID 2] Fragment shader compiled successfully
INFO: SHADER: [ID 3] Program shader loaded successfully
INFO: SHADER: [ID 3] Default shader loaded successfully
INFO: RLGL: Render batch vertex buffers loaded successfully in RAM (CPU)
INFO: RLGL: Render batch vertex buffers loaded successfully in VRAM (GPU)
INFO: RLGL: Default OpenGL state initialized successfully
INFO: TEXTURE: [ID 2] Texture loaded successfully (128x128 | GRAY_ALPHA | 1 mipmaps)
INFO: FONT: Default font loaded successfully (224 glyphs)
INFO: TIMER: Target time per frame: 16.667 milliseconds
INFO: TEXTURE: [ID 2] Unloaded texture data from VRAM (GPU)
INFO: SHADER: [ID 3] Default shader unloaded successfully
INFO: TEXTURE: [ID 1] Default texture unloaded successfully
INFO: Window closed successfully

@colesnicov
Copy link
Author

Actually it looks like the drm info should be coming from here: https://github.com/waveshare/linux-patch/blob/e9da5fc701b637f9379d89044005e3d15997802c/drivers/gpu/drm/panel/panel-waveshare-dsi.c#L98

And that looks correct...I guess? Not sure what's happening but I do believe this could be outside the realm of raylib.

I don't develop on RPI, but for RPI (currently I'm testing, a little bit), so unfortunately I can't debug to see there. Laptop, I have a laptop for an incredible amount of money - I don't understand how it's possible, it doesn't cooperate with the HDMI output. Windows Yes, Ununtu No. ): So I can't even debug it on my laptop.

@colesnicov
Copy link
Author

colesnicov commented May 2, 2024

@michaelfiber maybe you're right. Maybe it's not LIBRAY's fault, but the waveshare adapter's fault. Only they (waveshare) don't have Issues enabled.

EDIT: But Desktop GUI does not have this problem.

@colesnicov
Copy link
Author

Here is dmesg listing:

denis@raspberrypi:~/dev/raylib/examples $ sudo dmesg
[    0.000000] Booting Linux on physical CPU 0xf00
[    0.000000] Linux version 6.6.28+rpt-rpi-v7 (debian-kernel@lists.debian.org) (gcc-12 (Raspbian 12.2.0-14+rpi1) 12.2.0, GNU ld (GNU Binutils for Raspbian) 2.40) #1 SMP Raspbian 1:6.6.28-1+rpt1 (2024-04-22)
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi 2 Model B Rev 1.1
[    0.000000] random: crng init done
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x1e400000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0x1e400000..0x2e3fffff (262144 KiB) map reusable linux,cma
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x0000000037ffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000037ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000037ffffff]
[    0.000000] percpu: Embedded 18 pages/cpu s41876 r8192 d23660 u73728
[    0.000000] pcpu-alloc: s41876 r8192 d23660 u73728 alloc=18*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Kernel command line: coherent_pool=1M snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyAMA0,115200 console=tty1 root=PARTUUID=662b4900-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=CZ cfg80211.ieee80211_regdom=CZ
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 227360
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 616752K/917504K available (11264K kernel code, 1476K rwdata, 3252K rodata, 1024K init, 607K bss, 38608K reserved, 262144K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 36366 entries in 107 pages
[    0.000000] ftrace: allocated 107 pages with 5 groups
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000002] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000024] Switching to timer-based delay loop, resolution 52ns
[    0.000534] Console: colour dummy device 80x30
[    0.000568] printk: console [tty1] enabled
[    0.001518] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001581] CPU: Testing write buffer coherency: ok
[    0.001679] pid_max: default: 32768 minimum: 301
[    0.001855] LSM: initializing lsm=capability,integrity
[    0.002140] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.002205] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.003582] cgroup: Disabling memory control group subsystem
[    0.004486] CPU0: update cpu_capacity 1024
[    0.004544] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
[    0.006276] RCU Tasks Rude: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.006515] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.006788] Setting up static identity map for 0x100000 - 0x10003c
[    0.007065] rcu: Hierarchical SRCU implementation.
[    0.007104] rcu:     Max phase no-delay instances is 1000.
[    0.008215] smp: Bringing up secondary CPUs ...
[    0.009805] CPU1: update cpu_capacity 1024
[    0.009829] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
[    0.011433] CPU2: update cpu_capacity 1024
[    0.011453] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
[    0.012765] CPU3: update cpu_capacity 1024
[    0.012784] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
[    0.012933] smp: Brought up 1 node, 4 CPUs
[    0.013109] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.013146] CPU: All CPU(s) started in HYP mode.
[    0.013172] CPU: Virtualization extensions available.
[    0.014937] devtmpfs: initialized
[    0.030859] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.031241] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.031319] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.044933] pinctrl core: initialized pinctrl subsystem
[    0.046515] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.050023] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.057367] audit: initializing netlink subsys (disabled)
[    0.057824] audit: type=2000 audit(0.050:1): state=initialized audit_enabled=0 res=1
[    0.058700] thermal_sys: Registered thermal governor 'step_wise'
[    0.059170] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.059250] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.059729] Serial: AMBA PL011 UART driver
[    0.067758] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.090562] raspberrypi-firmware soc:firmware: Attached to firmware from 2024-04-17T17:29:03, variant start
[    0.100595] raspberrypi-firmware soc:firmware: Firmware hash is 86ccc427f35fdc604edc511881cdf579df945fb4
[    0.115773] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
[    0.122830] bcm2835-dma 3f007000.dma-controller: DMA legacy API manager, dmachans=0x1
[    0.125216] SCSI subsystem initialized
[    0.125588] usbcore: registered new interface driver usbfs
[    0.125690] usbcore: registered new interface driver hub
[    0.125794] usbcore: registered new device driver usb
[    0.126390] pps_core: LinuxPPS API ver. 1 registered
[    0.126430] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.126499] PTP clock support registered
[    0.129229] clocksource: Switched to clocksource arch_sys_counter
[    0.130101] VFS: Disk quotas dquot_6.6.0
[    0.130216] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.130443] FS-Cache: Loaded
[    0.131956] CacheFiles: Loaded
[    0.146704] NET: Registered PF_INET protocol family
[    0.147332] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.151592] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.151690] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.151748] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.151895] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    0.152260] TCP: Hash tables configured (established 8192 bind 8192)
[    0.152495] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.152608] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.152951] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.153907] RPC: Registered named UNIX socket transport module.
[    0.153965] RPC: Registered udp transport module.
[    0.153993] RPC: Registered tcp transport module.
[    0.154019] RPC: Registered tcp-with-tls transport module.
[    0.154046] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.155635] Trying to unpack rootfs image as initramfs...
[    0.189425] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    1.722291] Freeing initrd memory: 10340K
[    2.036287] Initialise system trusted keyrings
[    2.036841] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    2.036996] zbud: loaded
[    2.038207] NFS: Registering the id_resolver key type
[    2.038290] Key type id_resolver registered
[    2.038320] Key type id_legacy registered
[    2.038385] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.038424] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    2.039621] Key type asymmetric registered
[    2.039672] Asymmetric key parser 'x509' registered
[    2.039836] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    2.039887] io scheduler mq-deadline registered
[    2.039918] io scheduler kyber registered
[    2.040016] io scheduler bfq registered
[    2.043542] simple-framebuffer 3e812000.framebuffer: framebuffer at 0x3e812000, 0x1f4000 bytes
[    2.043621] simple-framebuffer 3e812000.framebuffer: format=a8r8g8b8, mode=1280x400x32, linelength=5120
[    2.051512] Console: switching to colour frame buffer device 160x25
[    2.060139] simple-framebuffer 3e812000.framebuffer: fb0: simplefb registered!
[    2.068070] bcm2835-rng 3f104000.rng: hwrng registered
[    2.070987] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    2.091380] brd: module loaded
[    2.104589] loop: module loaded
[    2.108074] Loading iSCSI transport class v2.0-870.
[    2.112716] usbcore: registered new interface driver lan78xx
[    2.115227] usbcore: registered new interface driver smsc95xx
[    2.117601] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    2.848333] Core Release: 2.80a
[    2.850710] Setting default values for core params
[    2.853009] Finished setting default values for core params
[    3.055653] Using Buffer DMA mode
[    3.057966] Periodic Transfer Interrupt Enhancement - disabled
[    3.060398] Multiprocessor Interrupt Enhancement - disabled
[    3.062780] OTG VER PARAM: 0, OTG VER FLAG: 0
[    3.065143] Dedicated Tx FIFOs mode

[    3.068579] WARN::dwc_otg_hcd_init:1072: FIQ DMA bounce buffers: virt = 9e504000 dma = 0xde504000 len=9024
[    3.073076] FIQ FSM acceleration enabled for :
               Non-periodic Split Transactions
               Periodic Split Transactions
               High-Speed Isochronous Endpoints
               Interrupt/Control Split Transaction hack enabled
[    3.083572] dwc_otg: Microframe scheduler enabled

[    3.083772] WARN::hcd_init_fiq:457: FIQ on core 1

[    3.087846] WARN::hcd_init_fiq:458: FIQ ASM at 8089085c length 36

[    3.091990] WARN::hcd_init_fiq:496: MPHI regs_base at b8810000
[    3.096172] dwc_otg 3f980000.usb: DWC OTG Controller
[    3.098352] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    3.100592] dwc_otg 3f980000.usb: irq 89, io mem 0x00000000
[    3.102770] Init: Port Power? op_state=1
[    3.104849] Init: Power Port (0)
[    3.107225] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    3.109490] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.111736] usb usb1: Product: DWC OTG Controller
[    3.113856] usb usb1: Manufacturer: Linux 6.6.28+rpt-rpi-v7 dwc_otg_hcd
[    3.115929] usb usb1: SerialNumber: 3f980000.usb
[    3.118944] hub 1-0:1.0: USB hub found
[    3.121138] hub 1-0:1.0: 1 port detected
[    3.124098] dwc_otg: FIQ enabled
[    3.124114] dwc_otg: NAK holdoff enabled
[    3.124123] dwc_otg: FIQ split-transaction FSM enabled
[    3.124143] Module dwc_common_port init
[    3.124590] usbcore: registered new interface driver usb-storage
[    3.127151] mousedev: PS/2 mouse device common for all mice
[    3.132042] sdhci: Secure Digital Host Controller Interface driver
[    3.134224] sdhci: Copyright(c) Pierre Ossman
[    3.136615] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.140385] ledtrig-cpu: registered to indicate activity on CPUs
[    3.142995] hid: raw HID events driver (C) Jiri Kosina
[    3.145298] usbcore: registered new interface driver usbhid
[    3.147466] usbhid: USB HID core driver
[    3.155487] Initializing XFRM netlink socket
[    3.157683] NET: Registered PF_PACKET protocol family
[    3.159956] Key type dns_resolver registered
[    3.162432] Registering SWP/SWPB emulation handler
[    3.207070] registered taskstats version 1
[    3.209514] Loading compiled-in X.509 certificates
[    3.227929] Key type .fscrypt registered
[    3.230019] Key type fscrypt-provisioning registered
[    3.243024] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    3.245812] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2
[    3.248207] printk: console [ttyAMA0] enabled
[    4.389132] Indeed it is in host mode hprt0 = 00021501
[    4.390496] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    4.405567] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    4.451586] sdhost: log_buf @ 9044ebd2 (de503000)
[    4.506870] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    4.517136] of_cfs_init
[    4.522013] of_cfs_init: OK
[    4.527493] clk: Disabling unused clocks
[    4.540956] Freeing unused kernel image (initmem) memory: 1024K
[    4.550481] mmc0: host does not support reading read-only switch, assuming write-enable
[    4.550549] Run /init as init process
[    4.555663] mmc0: Host Software Queue enabled
[    4.563011]   with arguments:
[    4.563018]     /init
[    4.565328] mmc0: new high speed SDHC card at address 1234
[    4.568919]   with environment:
[    4.568924]     HOME=/
[    4.574554] mmcblk0: mmc0:1234 SA08G 7.21 GiB
[    4.575581]     TERM=linux
[    4.592789]  mmcblk0: p1 p2
[    4.599107] mmcblk0: mmc0:1234 SA08G 7.21 GiB
[    4.599354] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    4.615396] Indeed it is in host mode hprt0 = 00001101
[    4.869760] usb 1-1: New USB device found, idVendor=0424, idProduct=9514, bcdDevice= 2.00
[    4.880383] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    4.891525] hub 1-1:1.0: USB hub found
[    4.897946] hub 1-1:1.0: 5 ports detected
[    5.239367] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    5.382713] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00, bcdDevice= 2.00
[    5.393760] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    5.415716] smsc95xx v2.0.0
[    5.616137] SMSC LAN8700 usb-001:003:01: attached PHY driver (mii_bus:phy_addr=usb-001:003:01, irq=199)
[    5.633983] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:fe:82:97
[    5.969290] usb 1-1.2: new low-speed USB device number 4 using dwc_otg
[    6.142150] usb 1-1.2: New USB device found, idVendor=1a2c, idProduct=2c27, bcdDevice= 1.10
[    6.153620] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    6.163903] usb 1-1.2: Product: USB Keyboard
[    6.171146] usb 1-1.2: Manufacturer: USB
[    6.191953] input: USB USB Keyboard as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:1A2C:2C27.0001/input/input0
[    6.270779] hid-generic 0003:1A2C:2C27.0001: input,hidraw0: USB HID v1.10 Keyboard [USB USB Keyboard] on usb-3f980000.usb-1.2/input0
[    6.298748] input: USB USB Keyboard Consumer Control as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.1/0003:1A2C:2C27.0002/input/input1
[    6.317527] EXT4-fs (mmcblk0p2): mounted filesystem a5343e26-ea31-47e7-a3e0-ae56c9afa37a ro with ordered data mode. Quota mode: none.
[    6.380069] input: USB USB Keyboard System Control as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.1/0003:1A2C:2C27.0002/input/input2
[    6.397935] hid-generic 0003:1A2C:2C27.0002: input,hidraw1: USB HID v1.10 Device [USB USB Keyboard] on usb-3f980000.usb-1.2/input1
[    6.519333] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
[    6.660921] usb 1-1.3: New USB device found, idVendor=7392, idProduct=7811, bcdDevice= 2.00
[    6.673516] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    6.684853] usb 1-1.3: Product: 802.11n WLAN Adapter
[    6.693829] usb 1-1.3: Manufacturer: Realtek
[    6.701994] usb 1-1.3: SerialNumber: 00e04c000001
[    6.819297] usb 1-1.5: new full-speed USB device number 6 using dwc_otg
[    6.962649] usb 1-1.5: New USB device found, idVendor=0712, idProduct=0009, bcdDevice= 2.00
[    6.974972] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    6.986051] usb 1-1.5: Product: WaveShare
[    6.993756] usb 1-1.5: Manufacturer: WaveShare
[    7.001696] usb 1-1.5: SerialNumber: 000000000089
[    7.030043] input: WaveShare WaveShare as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:0712:0009.0003/input/input3
[    7.046697] hid-generic 0003:0712:0009.0003: input,hidraw2: USB HID v1.11 Device [WaveShare WaveShare] on usb-3f980000.usb-1.5/input0
[    7.321996] systemd[1]: System time before build time, advancing clock.
[    7.629403] NET: Registered PF_INET6 protocol family
[    7.639654] Segment Routing with IPv6
[    7.646333] In-situ OAM (IOAM) with IPv6
[    7.775600] systemd[1]: systemd 252.17-1~deb12u1+rpi1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[    7.818151] systemd[1]: Detected architecture arm.
[    7.881994] systemd[1]: Hostname set to <raspberrypi>.
[    8.174895] uart-pl011 3f201000.serial: no DMA platform data
[    9.606150] systemd[1]: Queued start job for default target multi-user.target.
[    9.665895] systemd[1]: Created slice system-getty.slice - Slice /system/getty.
[    9.684538] systemd[1]: Created slice system-modprobe.slice - Slice /system/modprobe.
[    9.703253] systemd[1]: Created slice system-serial\x2dgetty.slice - Slice /system/serial-getty.
[    9.722727] systemd[1]: Created slice system-systemd\x2dfsck.slice - Slice /system/systemd-fsck.
[    9.740647] systemd[1]: Created slice user.slice - User and Session Slice.
[    9.755495] systemd[1]: Started systemd-ask-password-console.path - Dispatch Password Requests to Console Directory Watch.
[    9.774331] systemd[1]: Started systemd-ask-password-wall.path - Forward Password Requests to Wall Directory Watch.
[    9.793811] systemd[1]: Set up automount proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point.
[    9.815047] systemd[1]: Reached target cryptsetup.target - Local Encrypted Volumes.
[    9.831338] systemd[1]: Reached target integritysetup.target - Local Integrity Protected Volumes.
[    9.849601] systemd[1]: Reached target paths.target - Path Units.
[    9.864729] systemd[1]: Reached target slices.target - Slice Units.
[    9.879535] systemd[1]: Reached target swap.target - Swaps.
[    9.893537] systemd[1]: Reached target veritysetup.target - Local Verity Protected Volumes.
[    9.911494] systemd[1]: Listening on systemd-fsckd.socket - fsck to fsckd communication Socket.
[    9.929393] systemd[1]: Listening on systemd-initctl.socket - initctl Compatibility Named Pipe.
[    9.948438] systemd[1]: Listening on systemd-journald-audit.socket - Journal Audit Socket.
[    9.966157] systemd[1]: Listening on systemd-journald-dev-log.socket - Journal Socket (/dev/log).
[    9.984166] systemd[1]: Listening on systemd-journald.socket - Journal Socket.
[   10.003207] systemd[1]: Listening on systemd-udevd-control.socket - udev Control Socket.
[   10.020037] systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kernel Socket.
[   10.037128] systemd[1]: dev-hugepages.mount - Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages).
[   10.099974] systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File System...
[   10.125359] systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File System...
[   10.149962] systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File System...
[   10.168557] systemd[1]: auth-rpcgss-module.service - Kernel Module supporting RPCSEC_GSS was skipped because of an unmet condition check (ConditionPathExists=/etc/krb5.keytab).
[   10.203524] systemd[1]: Starting fake-hwclock.service - Restore / save the current clock...
[   10.235812] systemd[1]: Starting keyboard-setup.service - Set the console keyboard layout...
[   10.263885] systemd[1]: Starting kmod-static-nodes.service - Create List of Static Device Nodes...
[   10.293137] systemd[1]: Starting modprobe@configfs.service - Load Kernel Module configfs...
[   10.326147] systemd[1]: Starting modprobe@dm_mod.service - Load Kernel Module dm_mod...
[   10.357177] systemd[1]: Starting modprobe@drm.service - Load Kernel Module drm...
[   10.386975] systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Module efi_pstore...
[   10.416518] systemd[1]: Starting modprobe@fuse.service - Load Kernel Module fuse...
[   10.438224] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@redhat.com
[   10.446795] systemd[1]: Starting modprobe@loop.service - Load Kernel Module loop...
[   10.469763] systemd[1]: systemd-fsck-root.service - File System Check on Root Device was skipped because of an unmet condition check (ConditionPathExists=!/run/initramfs/fsck-root).
[   10.532943] systemd[1]: Starting systemd-journald.service - Journal Service...
[   10.564930] systemd[1]: Starting systemd-modules-load.service - Load Kernel Modules...
[   10.568184] fuse: init (API version 7.39)
[   10.600455] systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems...
[   10.630598] systemd[1]: Starting systemd-udev-trigger.service - Coldplug All udev Devices...
[   10.709017] systemd[1]: Mounted dev-mqueue.mount - POSIX Message Queue File System.
[   10.752667] systemd[1]: Mounted sys-kernel-debug.mount - Kernel Debug File System.
[   10.772131] systemd[1]: Mounted sys-kernel-tracing.mount - Kernel Trace File System.
[   10.790343] systemd[1]: Finished fake-hwclock.service - Restore / save the current clock.
[   10.809939] systemd[1]: Finished kmod-static-nodes.service - Create List of Static Device Nodes.
[   10.830743] systemd[1]: modprobe@configfs.service: Deactivated successfully.
[   10.843532] systemd[1]: Finished modprobe@configfs.service - Load Kernel Module configfs.
[   10.862941] systemd[1]: modprobe@dm_mod.service: Deactivated successfully.
[   10.875066] systemd[1]: Finished modprobe@dm_mod.service - Load Kernel Module dm_mod.
[   10.894092] systemd[1]: modprobe@drm.service: Deactivated successfully.
[   10.907755] systemd[1]: Finished modprobe@drm.service - Load Kernel Module drm.
[   10.929386] systemd[1]: modprobe@efi_pstore.service: Deactivated successfully.
[   10.929633] EXT4-fs (mmcblk0p2): re-mounted a5343e26-ea31-47e7-a3e0-ae56c9afa37a r/w. Quota mode: none.
[   10.934325] systemd[1]: Finished modprobe@efi_pstore.service - Load Kernel Module efi_pstore.
[   10.982270] systemd[1]: modprobe@fuse.service: Deactivated successfully.
[   10.994450] systemd[1]: Finished modprobe@fuse.service - Load Kernel Module fuse.
[   11.012417] systemd[1]: modprobe@loop.service: Deactivated successfully.
[   11.024173] systemd[1]: Finished modprobe@loop.service - Load Kernel Module loop.
[   11.042379] systemd[1]: Finished systemd-modules-load.service - Load Kernel Modules.
[   11.058691] systemd[1]: Started systemd-journald.service - Journal Service.
[   11.346507] systemd-journald[219]: Received client request to flush runtime journal.
[   11.425267] systemd-journald[219]: File /var/log/journal/68836615beb34dc795159f6e6df93494/system.journal corrupted or uncleanly shut down, renaming and replacing.
[   14.416372] input: WaveShare WaveShare as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:0712:0009.0003/input/input4
[   14.420569] hid-multitouch 0003:0712:0009.0003: input,hidraw2: USB HID v1.11 Device [WaveShare WaveShare] on usb-3f980000.usb-1.5/input0
[   14.574986] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[   14.576632] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[   14.576676] [vc_sm_connected_init]: start
[   14.582447] [vc_sm_connected_init]: installed successfully
[   14.612202] mc: Linux media interface: v0.10
[   14.867835] rpi-gpiomem 3f200000.gpiomem: window base 0x3f200000 size 0x00001000
[   14.879620] rpi-gpiomem 3f200000.gpiomem: initialised 1 regions as /dev/gpiomem
[   14.892973] videodev: Linux video capture interface: v2.00
[   15.001233] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[   15.013234] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[   15.029867] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[   15.031170] bcm2835_audio bcm2835_audio: card created with 8 channels
[   15.038882] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[   15.099055] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[   15.105394] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[   15.109540] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[   15.110565] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[   15.110655] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[   15.110717] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[   15.110772] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[   15.110800] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[   15.136428] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[   15.137629] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[   15.139041] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[   15.139882] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[   15.139950] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[   15.140002] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[   15.140027] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[   15.140049] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[   15.149542] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[   15.173863] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[   15.205318] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[   15.205435] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[   15.217979] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[   15.218142] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[   15.407447] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[   15.407551] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[   15.439774] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[   15.439878] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[   15.465393] bcm2835-codec bcm2835-codec: Device registered as /dev/video31
[   15.465491] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image
[   16.199904] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   16.284429] Loaded X.509 cert 'benh@debian.org: 577e021cb980e0e820821ba7b54b4961b8b4fadf'
[   16.307602] Loaded X.509 cert 'romain.perier@gmail.com: 3abbc6ec146e09d1b6016ab9d6cf71dd233f0328'
[   16.322184] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   16.325400] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[   16.899992] Console: switching to colour dummy device 80x30
[   16.906691] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[   16.969395] Registered IR keymap rc-cec
[   16.969835] rc rc0: vc4-hdmi as /devices/platform/soc/3f902000.hdmi/rc/rc0
[   16.970270] input: vc4-hdmi as /devices/platform/soc/3f902000.hdmi/rc/rc0/input5
[   16.999812] input: vc4-hdmi HDMI Jack as /devices/platform/soc/3f902000.hdmi/sound/card1/input6
[   17.009582] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[   17.010446] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
[   17.011118] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4])
[   17.011704] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4])
[   17.012281] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
[   17.012767] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[   17.042856] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[   17.173715] vc4-drm soc:gpu: [drm] The core clock cannot reach frequencies high enough to support 4k @ 60Hz.
[   17.173782] vc4-drm soc:gpu: [drm] Please change your config.txt file to add hdmi_enable_4kp60.
[   17.222257] Console: switching to colour frame buffer device 50x80
[   17.246767] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
[   17.872512] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SS
[   18.280025] rtl8192cu: Chip version 0x10
[   18.594521] rtl8192cu: Board Type 0
[   18.595121] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[   18.595301] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   18.596325] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   18.609828] usbcore: registered new interface driver rtl8192cu
[   20.533791] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   20.550768] smsc95xx 1-1.1:1.0 eth0: Link is Down
[   21.192322] rtl8192cu: MAC auto ON okay!
[   21.250435] rtl8192cu: Tx queue select: 0x05
[   23.815299] wlan0: authenticate with 86:b8:b8:34:0c:b4
[   23.815423] wlan0: 80 MHz not supported, disabling VHT
[   23.828657] wlan0: send auth to 86:b8:b8:34:0c:b4 (try 1/3)
[   23.833361] wlan0: authenticated
[   23.839310] wlan0: associate with 86:b8:b8:34:0c:b4 (try 1/3)
[   23.866500] wlan0: RX AssocResp from 86:b8:b8:34:0c:b4 (capab=0x411 status=0 aid=2)
[   23.873164] wlan0: associated
[   24.029103] cryptd: max_cpu_qlen set to 1000
[   27.342390] systemd[667]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set

I think I won't get any more information from it. But I'll check out forum.raspberry.com

@colesnicov
Copy link
Author

Sorry for 'spamming' but here is my config.txt:

denis@raspberrypi:~/dev/raylib/examples $ cat /boot/firmware/config.txt 
# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Additional overlays and parameters are documented
# /boot/firmware/overlays/README

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Disable compensation for displays with overscan
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=1

# pokusil jsem se upravit rozdeleni pameti..
gpu_mem=128


[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]
hdmi_group=2
hdmi_mode=87
hdmi_timings=400 0 100 10 140 1280 10 20 20 2 0 0 0 60 0 43000000 3
display_rotate=3

@gabriel-marques
Copy link
Contributor

Hello,

The problem is in the function FindNearestConnectorMode() at line

static int FindNearestConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced)
{
TRACELOG(LOG_TRACE, "DISPLAY: Searching nearest connector mode for %ux%u@%u, selecting an interlaced mode is allowed: %s", width, height, fps, allowInterlaced? "yes" : "no");
if (NULL == connector) return -1;
int nearestIndex = -1;
for (int i = 0; i < platform.connector->count_modes; i++)
{
const drmModeModeInfo *const mode = &platform.connector->modes[i];
TRACELOG(LOG_TRACE, "DISPLAY: DRM mode: %d %ux%u@%u %s", i, mode->hdisplay, mode->vdisplay, mode->vrefresh,
(mode->flags & DRM_MODE_FLAG_INTERLACE)? "interlaced" : "progressive");
if ((mode->hdisplay < width) || (mode->vdisplay < height))
{
TRACELOG(LOG_TRACE, "DISPLAY: DRM mode is too small");
continue;
}
if ((mode->flags & DRM_MODE_FLAG_INTERLACE) && (!allowInterlaced))
{
TRACELOG(LOG_TRACE, "DISPLAY: DRM shouldn't choose an interlaced mode");
continue;
}
if (nearestIndex < 0)
{
nearestIndex = i;
continue;
}
const int widthDiff = abs(mode->hdisplay - width);
const int heightDiff = abs(mode->vdisplay - height);
const int fpsDiff = abs(mode->vrefresh - fps);
const int nearestWidthDiff = abs(platform.connector->modes[nearestIndex].hdisplay - width);
const int nearestHeightDiff = abs(platform.connector->modes[nearestIndex].vdisplay - height);
const int nearestFpsDiff = abs(platform.connector->modes[nearestIndex].vrefresh - fps);
if ((widthDiff < nearestWidthDiff) || (heightDiff < nearestHeightDiff) || (fpsDiff < nearestFpsDiff)) {
nearestIndex = i;
}
}
return nearestIndex;
}

@colesnicov, you are trying to create a screen of 400x450 px but there is no exact matching DRM Mode for this resolution so we try to find the nearest matching resolution.

From the log you show, we can see that there is 3 DRM modes for your screen.

  • DRM Mode 0 400x1280@60
  • DRM Mode 1 1280x720@100
  • DRM Mode 2 384x1280@62

So it starts a loop over all available DRM Modes and stores at the end of the first loop the mode 0 (the one you want) as the selected one.

Then it tests DRM Mode 1 and in order to know which DRM Mode is the nearest it does a substraction of all members (respectively : width, height and refresh rate).

So for DRM Mode 0 (selected Mode) we have:

selected nearest Width diff: 400 - 400 = 0
selected nearest Height diff: 1280 - 450 = 830

and for DRM Mode 1 we have:

new Width diff: 1280 - 400 = 880
new Height diff: 720 - 450 = 270

And if one of the new diff is smaller than nearest diff (270 < 830 in our case) it will change the nearest DRM Mode. So the new nearest DRM Mode is the 1.

Then the upscaling will mess with the display I suppose.

Just to be sure, try to create a window of 400 x 1011 and the selected DRM Mode should be 400x1280

If you really want to have a resolution of 400x450, you will have to modifiy this function or to set the DRM Mode on the connector yourself. But still, it will upscale to the fullscreen anyway

@colesnicov
Copy link
Author

That's exactly what I 'missed'.. That it takes up the whole screen anyway. I don't actually create a window, in this case, but a canvas... Okay, that would do, I need it in full mode, otherwise I don't need such a large display... So, no bad framebuffer, not that there isn't enough RAM, just bad parameters I chose.

so in the future, in the case of DRM, choose the window size as close as possible to the screen size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: DRM/RPI DRM/Raspberry Pi platform
Projects
None yet
Development

No branches or pull requests

4 participants