NixOS on ARM/Raspberry Pi 3: Difference between revisions
imported>Justinas No edit summary |
imported>Motiejusj HDMI output fully works with least 6.1.45 (nixos 23.05 as of writing), so these old workarounds are no longer necessary. |
||
| Line 242: | Line 242: | ||
See {{issue|66960}}. | See {{issue|66960}}. | ||
=== HDMI output issue with kernel | === HDMI output issue with kernel ~6.1 (NixOS 23.05 or NixOS unstable) === | ||
( | When using HDMI and hardware acceleration (e.g. Kodi), an application may fail to start and/or crash with a dmesg like: | ||
<pre> | |||
[232195.380745] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA: | |||
[232195.380751] [drm] kernel: 432kb BOs (1) | |||
[232195.380755] [drm] dumb: 69064kb BOs (14) | |||
[306160.152488] cma: cma_alloc: alloc failed, req-size: 142 pages, ret: -16 | |||
[306160.152498] [vc_sm_cma_ioctl_alloc]: dma_alloc_coherent alloc of 581632 bytes failed | |||
[306160.152501] [vc_sm_cma_ioctl_alloc]: something failed - cleanup. ret -12 | |||
[317686.623989] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA: | |||
[317686.623998] [drm] dumb: 74752kb BOs (16) | |||
</pre> | |||
A workaround is to increase the pre-allocated CMA space (which, as of writing, defaults to 65M): | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
{ config, pkgs, lib, ... }: | |||
{ | { | ||
boot. | boot.kernelParams = ["cma=320M"]; | ||
} | } | ||
</ | </nowiki>}} | ||