CRITICAL ERROR: Failed to set crtc: Permission denied

It’s my first try on RPI4. I have downloaded https://info-beamer.com/jump/download/player/info-beamer-pi-1.0.1.b40a5f-buster-fkms.tar.gz and use ’ info-beamer -install-hevc’.
Wenn start info-beamer like:

./info-beamer samples/image

I got this error:

root@raspberrypi:/home/pi/Info-beamer/info-beamer-pi# ./info-beamer samples/image
Info Beamer PI 1.0.1.b40a5f~buster-fkms (https://info-beamer.com)
Copyright (c) 2012-2020, Florian Wesch <fw@info-beamer.com>

FKMS release for the Pi4. Be sure to read what has changed
compared to the classic info-beamer pi version on earlier
Pi models by running `info-beamer -fkms`.

info-beamer for the raspberry pi is free for private use. If you
would like to make use of this software in a commercial way, you
must buy a license which will support the continued development.
See https://info-beamer.com/pi for more information.  Thank you!

You might also take a look at info-beamer hosted.  It's the best
platform to run your info-beamer code. It does all the hard work
for you: installation, maintenance, asset delivery, management..
That way you can focus on the content. Learn more at:

https://info-beamer.com/hosted

 +--------------------------------------------------+
 | Questions or feedback? Visit the community forum |
 | https://info-beamer.com/community for assistence.|
 +--------------------------------------------------+

[main.c] root node is image
[mmalvideo.c] RPI HEVC decoding enabled
[main.c] loading nodes
[image] [kernel] Using MMAL video implementation
[image] update +beamer.png (search)
[image] update +node.lua (search)
CRITICAL ERROR: Failed to set crtc: Permission denied

The log output isn’t sufficient to figure out what might be going on. Can you run info-beamer with the environment variable INFOBEAMER_LOG_LEVEL=3 set? This will produce a more verbose output that might help.

Thank you for your interest! He is the log file.

root@raspberrypi:/home/pi/Info-beamer/info-beamer-pi# ./info-beamer samples/image
Info Beamer PI 1.0.1.b40a5f~buster-fkms (https://info-beamer.com)
Copyright © 2012-2020, Florian Wesch fw@info-beamer.com

FKMS release for the Pi4. Be sure to read what has changed
compared to the classic info-beamer pi version on earlier
Pi models by running info-beamer -fkms.

info-beamer for the raspberry pi is free for private use. If you
would like to make use of this software in a commercial way, you
must buy a license which will support the continued development.
See https://info-beamer.com/pi for more information. Thank you!

You might also take a look at info-beamer hosted. It’s the best
platform to run your info-beamer code. It does all the hard work
for you: installation, maintenance, asset delivery, management…
That way you can focus on the content. Learn more at:

https://info-beamer.com/hosted

±-------------------------------------------------+
| Questions or feedback? Visit the community forum |
| https://info-beamer.com/community for assistence.|
±-------------------------------------------------+

[watchdog.c] software watchdog installed. 15 seconds timeout
[main.c] chdir /home/pi/Info-beamer/info-beamer-pi/samples
[main.c] root node is image
[main.c] running as euid/egid 0/0
[main.c] luajit version: LuaJIT 2.1.0-beta3~f0e865
[main.c] linux version: 5.4.83-v7l+ #1379 SMP Mon Dec 14 13:11:54 GMT 2020 armv7l
[main.c] firmware version: Jan 8 2021 14:31:16 Copyright © 2012 Broadcom version 194a85abd768c7334bbadc3f1911c10a7d18ed14 (clean) (release) (start)
[main.c] bootloader version: Sep 3 2020 13:11:43 version c305221a6d7e532693cc7ff57fddfc8649def167 (release) timestamp 1599135103 update-time 0 capabilities 0x00000000
[main.c] pi version: 00c03112
[main.c] pi model: Raspberry Pi 4 Model B Rev 1.2
[main.c] config: arm_freq=1500 audio_pwm_mode=514 config_hdmi_boost=5 core_freq=500 core_freq_min=200 disable_commandline_tags=2 disable_l2cache=1 disable_overscan=1 display_hdmi_rotate=-1 display_lcd_rotate=-1 enable_gic=1 force_eeprom_read=1 force_pwm_open=1 framebuffer_ignore_alpha=1 framebuffer_swap=1 gpu_freq=500 gpu_freq_min=250 init_uart_clock=0x2dc6c00 lcd_framerate=60 mask_gpu_interrupt0=1024 mask_gpu_interrupt1=0x10000 max_framebuffers=2 over_voltage_avs=-42500 pause_burst_frames=1 program_serial_random=1 total_mem=4096 hdmi_force_cec_address:0=65535 hdmi_force_cec_address:1=65535 hdmi_pixel_freq_limit:0=0x11e1a300 hdmi_pixel_freq_limit:1=0x11e1a300
[main.c] environ: INFOBEAMER_LOG_LEVEL=3
[main.c] memory: arm=832M gpu=192M
[main.c] file descriptor limit: 1024
[surface.c] DRM device /dev/dri/card0
[surface.c] connectors: 1
[surface.c] encoders: 1
[surface.c] crtcs: 1
[surface.c] found 1 attached devices
[surface.c] Connector 0:
[surface.c] detected HDMI 0 display 2 device PHL PHL_346B1C
[surface.c] 3440x1440@30.000 Custom 0
[surface.c] physical size 800x330mm
[surface.c] vv— T = tvservice match, D = drm match
[surface.c] T 0, 3440x1440: 29.99Hz name: 3440x1440, clock: 159870 (flag:0x9 phsync nvsync)
[surface.c] 1, 2560x1080: 59.98Hz name: 2560x1080, clock: 230000 (flag:0x9 phsync nvsync)
[surface.c] 2, 2560x1080: 60.00Hz name: 2560x1080, clock: 198000 (flag:0x5 phsync pvsync)
[surface.c] 3, 2560x1080: 59.94Hz name: 2560x1080, clock: 197802 (flag:0x5 phsync pvsync)
[surface.c] 4, 2560x1080: 50.00Hz name: 2560x1080, clock: 185625 (flag:0x5 phsync pvsync)
[surface.c] 5, 1720x1440: 59.94Hz name: 1720x1440, clock: 209750 (flag:0x6 nhsync pvsync)
[surface.c] 6, 1920x1080: 60.00Hz name: 1920x1080, clock: 148500 (flag:0xa nhsync nvsync)
[surface.c] 7, 1920x1080: 60.00Hz name: 1920x1080, clock: 148500 (flag:0x5 phsync pvsync)
[surface.c] 8, 1920x1080: 59.94Hz name: 1920x1080, clock: 148352 (flag:0x5 phsync pvsync)
[surface.c] 9, 1920x1080: 30.00Hz name: 1920x1080i, clock: 74250 (flag:0x15 phsync pvsync interlace)
[surface.c] 10, 1920x1080: 29.97Hz name: 1920x1080i, clock: 74176 (flag:0x15 phsync pvsync interlace)
[surface.c] 11, 1920x1080: 50.00Hz name: 1920x1080, clock: 148500 (flag:0x5 phsync pvsync)
[surface.c] 12, 1920x1080: 25.00Hz name: 1920x1080i, clock: 74250 (flag:0x15 phsync pvsync interlace)
[surface.c] 13, 1680x1050: 59.88Hz name: 1680x1050, clock: 119000 (flag:0x9 phsync nvsync)
[surface.c] 14, 1280x1024: 75.02Hz name: 1280x1024, clock: 135000 (flag:0x5 phsync pvsync)
[surface.c] 15, 1280x1024: 60.02Hz name: 1280x1024, clock: 108000 (flag:0x5 phsync pvsync)
[surface.c] 16, 1440x900: 59.90Hz name: 1440x900, clock: 88750 (flag:0x9 phsync nvsync)
[surface.c] 17, 1280x720: 60.00Hz name: 1280x720, clock: 74250 (flag:0x5 phsync pvsync)
[surface.c] 18, 1280x720: 59.94Hz name: 1280x720, clock: 74176 (flag:0x5 phsync pvsync)
[surface.c] 19, 1280x720: 50.00Hz name: 1280x720, clock: 74250 (flag:0x5 phsync pvsync)
[surface.c] 20, 1024x768: 75.03Hz name: 1024x768, clock: 78750 (flag:0x5 phsync pvsync)
[surface.c] 21, 1024x768: 70.07Hz name: 1024x768, clock: 75000 (flag:0xa nhsync nvsync)
[surface.c] 22, 1024x768: 60.00Hz name: 1024x768, clock: 65000 (flag:0xa nhsync nvsync)
[surface.c] 23, 832x624: 74.55Hz name: 832x624, clock: 57284 (flag:0xa nhsync nvsync)
[surface.c] 24, 800x600: 75.00Hz name: 800x600, clock: 49500 (flag:0x5 phsync pvsync)
[surface.c] 25, 800x600: 72.19Hz name: 800x600, clock: 50000 (flag:0x5 phsync pvsync)
[surface.c] 26, 800x600: 60.32Hz name: 800x600, clock: 40000 (flag:0x5 phsync pvsync)
[surface.c] 27, 800x600: 56.25Hz name: 800x600, clock: 36000 (flag:0x5 phsync pvsync)
[surface.c] 28, 720x576: 50.00Hz name: 720x576, clock: 27000 (flag:0xa nhsync nvsync)
[surface.c] 29, 720x480: 60.00Hz name: 720x480, clock: 27027 (flag:0xa nhsync nvsync)
[surface.c] 30, 720x480: 59.94Hz name: 720x480, clock: 27000 (flag:0xa nhsync nvsync)
[surface.c] 31, 640x480: 75.00Hz name: 640x480, clock: 31500 (flag:0xa nhsync nvsync)
[surface.c] 32, 640x480: 72.81Hz name: 640x480, clock: 31500 (flag:0xa nhsync nvsync)
[surface.c] 33, 640x480: 66.67Hz name: 640x480, clock: 30240 (flag:0xa nhsync nvsync)
[surface.c] 34, 640x480: 60.00Hz name: 640x480, clock: 25200 (flag:0xa nhsync nvsync)
[surface.c] 35, 640x480: 59.94Hz name: 640x480, clock: 25175 (flag:0xa nhsync nvsync)
[surface.c] 36, 720x400: 70.08Hz name: 720x400, clock: 28320 (flag:0x6 nhsync pvsync)
[surface.c] selected 0 as primary mode
[surface.c] crtc:87(0) → encoder:88 → connector:89
[surface.c] set up 1 displays
[surface.c] display #0 (dispmanx 2): 3440x1440+0,0
[surface.c] GBM device: drm (open took 0.53s)
[surface.c] DRM display initialized to 3440x1440 across 1 displays
[surface.c] framerate is 29.985371
[surface.c] Loading GL subsystem took 0.00s
[surface.c] found format in config 0 (30392160): fourcc=AR24!
[surface.c] display configs matching: 8. using config 30392160
[surface.c] max texture size: 4096x4096
[surface.c] GL surface 3440x1440 (interval 1/29.985 fps) into 3440x1440+0,0
[threadpool.c] submitting 0x442bb9((nil))
[threadpool.c] submitting 0x442db1((nil))
[video.c] initializing video subsystem
[mmalvideo.c] RPI HEVC decoding enabled
[threadpool.c] 4 cores detected
[threadpool.c] using 12 pool threads
[threadpool.c] running vsync-poll 0x442bb9((nil))
[threadpool.c] running vsync-flip 0x442db1((nil))
[main.c] loading nodes
[image] [kernel] features: extended-type, external-userlib, nested-nodes, openfile, paused-video, rawvideo, subimage-draw
[image] [kernel] bundled modules: inspect, json, matrix2d, struct, tagmapper, utf8, zip
[image] [kernel] Using MMAL video implementation
[image] update +beamer.png (search)
[image] update +node.lua (search)
[image] [kernel] node code updated. booting …
[image] [kernel] flushed vm. collected 44kb. 120kb in use
[image] [kernel] loading bundled userlib.lua (‘info-beamer -d userlib’)
[image] [userlib] loading bundled module ‘struct’
[image] loading image/node.lua
[image] loading image/beamer.png
[threadpool.c] submitting 0x43c931(0x20669f8)
[threadpool.c] running img-load 0x43c931(0x20669f8)
[image.c] [0x20669f8/image/beamer.png] looks like 820x456 RGBA png
[image] [kernel] node booted. 160kb in use
[surface.c] gbm planes: 1
[surface.c] plane 0 stride:13760 handle:1 offset:0
[surface.c] set up drm frame buffer 98
[surface.c] placing framebuffer 98 on display 0 @ 0.007251
CRITICAL ERROR: Failed to set crtc: Permission denied

Can you check /boot/config.txt? Maybe you have

dtoverlay=vc4-kms-v3d

in there. This mode (Full KMS) is currently not supported. Only Fake KMS is for now. For that, the line must be:

dtoverlay=vc4-fkms-v3d

If that’s not it, we might try another video mode.

These are the entries in config.txt.

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
dtoverlay=vc4-fkms-v3d
gpu_mem=256

What video mode can i try now?

You can try to start info-beamer with environment variable

INFOBEAMER_PRIMARY_MODE=6

This should set 1920x1080 - see the line in your previous output:

 [surface.c] 6, 1920x1080: 60.00Hz name: 1920x1080, clock: 148500 (flag:0xa nhsync nvsync)

If that also doesn’t work, you might try:

INFOBEAMER_DRM_DEVICE=/dev/dri/card1

If neither helps, I’m beginning to run out of ideas. Is that a fresh RaspbianOS install using the latest release?

Yes that is the latest and greatest version of RaspbianOS.
Sorry but both versions bring the same bug.
A the moment i have a RPI3 but how can i help to solve the problem?

I’ll run info-beamer on a recent Raspberry Pi OS to see if I can reproduce the issue.

Cool - Thanks ! I hope the mistake are not in front of the notebook. :slight_smile:

Got it running: I’ve installed the latest lite OS release. I then installed the required dependencies (some missing in the included info-beamer README.txt. I’ll add them):

apt-get install libdrm2 libgbm1 libgles2-mesa libegl1-mesa \
                libevent-2.1-6 libavformat58 \
                libpng16-16 libfreetype6 libavresample4

The included samples in samples all work correctly. What doesn’t work at the moment is HEVC decoding: I guess the constant reworks to include HEVC decoding into the official FFMPEG release and exposing the decoder using the official V4L2 (video 4 linux 2) API broke the approach used in info-beamer. This is something that needs to be handled in some future release, but I’m getting tired of the current sad state of HEVC on the Pi4. I’ll wait for an official announcement before touching this undocumented pile of **** again.

Meanwhile, the most likely reason it didn’t work for you is that you have X running somewhere. Reason for that is, that only one process can be DRM master. When you run X, it gets exclusive access and info-beamer gets “Permission denied” when trying to open the display. I guess the error message should be improved. I’ll see what I can do.

I will try the Raspberry Pi OS Lite tonight.

Improved the error message for a future release: You’ll then see:

[main.c] root node is shader
[main.c] It looks like you only have 76MB of GPU memory reserved.
[main.c] Please provide at least 192MB. See the README.txt on how to do this.
[surface.c] info-beamer is not DRM master, but needs to be.
[surface.c] Most likely reason is that you have X running.
[surface.c] Terminate the X server and try again.
CRITICAL ERROR: Cannot setup DRM device(s)

Great - I used Raspberry Pi OS Lite. As an example I tried https://github.com/verschwoerhaus/info-beamer-vsh.git and everything is perfect. I’m from rpi3 and X hasn’t been a problem so far. I learned something. :slight_smile: Thank you!

That package also perfect works using info-beamer hosted using Add package and entering its github url. No need to mess with Raspberry Pi OS :slight_smile: