# CRITICAL ERROR: Failed to set crtc: Permission denied

**URL:** <https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998>\
**Category:** Help\
**Created:** [January 26, 2021, 10:14pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998 "2021-01-26T22:14:48Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![uwe.hentzschel](https://community.info-beamer.com/letter_avatar_proxy/v3/letter/u/6a8cbe/32.png) [@uwe.hentzschel](https://community.info-beamer.com/u/uwe.hentzschel)\
**Post date:** [January 26, 2021, 10:14pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/1 "2021-01-26T22:14:48Z")

</div>

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](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:

```nohighlight
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

```

---

<div class="post-metadata">

**Author:** ![infobeamer-fw](https://community.info-beamer.com/user_avatar/community.info-beamer.com/infobeamer-fw/32/3_2.png) [@infobeamer-fw](https://community.info-beamer.com/u/infobeamer-fw)\
**Post date:** [January 26, 2021, 10:27pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/2 "2021-01-26T22:27:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![uwe.hentzschel](https://community.info-beamer.com/letter_avatar_proxy/v3/letter/u/6a8cbe/32.png) [@uwe.hentzschel](https://community.info-beamer.com/u/uwe.hentzschel)\
**Post date:** [January 26, 2021, 10:39pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/3 "2021-01-26T22:39:31Z")

</div>

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](https://info-beamer.com))  
Copyright © 2012-2020, Florian Wesch [fw@info-beamer.com](mailto: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](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](https://info-beamer.com/hosted)

±-------------------------------------------------+  
| Questions or feedback? Visit the community forum |  
| [https://info-beamer.com/community](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

---

<div class="post-metadata">

**Author:** ![infobeamer-fw](https://community.info-beamer.com/user_avatar/community.info-beamer.com/infobeamer-fw/32/3_2.png) [@infobeamer-fw](https://community.info-beamer.com/u/infobeamer-fw)\
**Post date:** [January 26, 2021, 10:54pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/4 "2021-01-26T22:54:12Z")

</div>

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

```nohighlight
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:

```nohighlight
dtoverlay=vc4-fkms-v3d

```

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

---

<div class="post-metadata">

**Author:** ![uwe.hentzschel](https://community.info-beamer.com/letter_avatar_proxy/v3/letter/u/6a8cbe/32.png) [@uwe.hentzschel](https://community.info-beamer.com/u/uwe.hentzschel)\
**Post date:** [January 27, 2021, 6:18am UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/5 "2021-01-27T06:18:05Z")

</div>

These are the entries in config.txt.

```nohighlight
[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?

---

<div class="post-metadata">

**Author:** ![infobeamer-fw](https://community.info-beamer.com/user_avatar/community.info-beamer.com/infobeamer-fw/32/3_2.png) [@infobeamer-fw](https://community.info-beamer.com/u/infobeamer-fw)\
**Post date:** [January 27, 2021, 3:05pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/6 "2021-01-27T15:05:12Z")

</div>

You can try to start info-beamer with environment variable

```auto
INFOBEAMER_PRIMARY_MODE=6

```

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

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

```

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

```auto
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?

---

<div class="post-metadata">

**Author:** ![uwe.hentzschel](https://community.info-beamer.com/letter_avatar_proxy/v3/letter/u/6a8cbe/32.png) [@uwe.hentzschel](https://community.info-beamer.com/u/uwe.hentzschel)\
**Post date:** [January 27, 2021, 7:59pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/7 "2021-01-27T19:59:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![infobeamer-fw](https://community.info-beamer.com/user_avatar/community.info-beamer.com/infobeamer-fw/32/3_2.png) [@infobeamer-fw](https://community.info-beamer.com/u/infobeamer-fw)\
**Post date:** [February 2, 2021, 11:38am UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/8 "2021-02-02T11:38:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![uwe.hentzschel](https://community.info-beamer.com/letter_avatar_proxy/v3/letter/u/6a8cbe/32.png) [@uwe.hentzschel](https://community.info-beamer.com/u/uwe.hentzschel)\
**Post date:** [February 2, 2021, 3:16pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/9 "2021-02-02T15:16:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![infobeamer-fw](https://community.info-beamer.com/user_avatar/community.info-beamer.com/infobeamer-fw/32/3_2.png) [@infobeamer-fw](https://community.info-beamer.com/u/infobeamer-fw)\
**Post date:** [February 2, 2021, 3:18pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/10 "2021-02-02T15:18:48Z")

</div>

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):

```nohighlight
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.

---

<div class="post-metadata">

**Author:** ![uwe.hentzschel](https://community.info-beamer.com/letter_avatar_proxy/v3/letter/u/6a8cbe/32.png) [@uwe.hentzschel](https://community.info-beamer.com/u/uwe.hentzschel)\
**Post date:** [February 2, 2021, 3:34pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/11 "2021-02-02T15:34:47Z")

</div>

I will try the Raspberry Pi OS Lite tonight.

---

<div class="post-metadata">

**Author:** ![infobeamer-fw](https://community.info-beamer.com/user_avatar/community.info-beamer.com/infobeamer-fw/32/3_2.png) [@infobeamer-fw](https://community.info-beamer.com/u/infobeamer-fw)\
**Post date:** [February 2, 2021, 3:36pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/12 "2021-02-02T15:36:13Z")

</div>

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

```nohighlight
[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)

```

---

<div class="post-metadata">

**Author:** ![uwe.hentzschel](https://community.info-beamer.com/letter_avatar_proxy/v3/letter/u/6a8cbe/32.png) [@uwe.hentzschel](https://community.info-beamer.com/u/uwe.hentzschel)\
**Post date:** [February 2, 2021, 8:28pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/13 "2021-02-02T20:28:03Z")

</div>

Great - I used Raspberry Pi OS Lite. As an example I tried [https://github.com/verschwoerhaus/info-beamer-vsh.git](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. 🙂 Thank you!

---

<div class="post-metadata">

**Author:** ![infobeamer-fw](https://community.info-beamer.com/user_avatar/community.info-beamer.com/infobeamer-fw/32/3_2.png) [@infobeamer-fw](https://community.info-beamer.com/u/infobeamer-fw)\
**Post date:** [February 2, 2021, 9:24pm UTC](https://community.info-beamer.com/t/critical-error-failed-to-set-crtc-permission-denied/998/14 "2021-02-02T21:24:58Z")

</div>

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 🙂
