File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 408
408
# Include nv_tegra_release, just so we can tell what version our NixOS machine was built from.
409
409
environment . etc . "nv_tegra_release" . source = "${ pkgs . nvidia-jetpack . l4t-core } /etc/nv_tegra_release" ;
410
410
411
+ # For some unknown reason the libnvscf.so library has a dlopen call to a hard path:
412
+ # `/usr/lib/aarch64-linux-gnu/tegra-egl/libEGL_nvidia.so.0`
413
+ # This causes loading errors for libargus applications and the nvargus-daemon
414
+ # Errors will look like this:
415
+ # SCF: Error NotSupported: Failed to load EGL library
416
+ # To fix this create a symlink to the correct EGL lib at the above directory.
417
+ systemd . services . create-libegl-symlink =
418
+ let
419
+ linkEglLib = pkgs . writeShellScriptBin "link-egl-lib" ''
420
+ ${ lib . getExe' pkgs . coreutils "mkdir" } -p /usr/lib/aarch64-linux-gnu/tegra-egl
421
+ ${ lib . getExe' pkgs . coreutils "ln" } -s /run/opengl-driver/lib/libEGL_nvidia.so.0 /usr/lib/aarch64-linux-gnu/tegra-egl/libEGL_nvidia.so.0
422
+ '' ;
423
+ in
424
+ {
425
+ enable = true ;
426
+ description = "Create a symlink for libEGL_nvidia.so.0 at /usr/lib/aarch64-linux-gnu/tegra-egl/" ;
427
+ unitConfig = {
428
+ ConditionPathExists = "!/usr/lib/aarch64-linux-gnu/tegra-egl/libEGL_nvidia.so.0" ;
429
+ } ;
430
+ serviceConfig = {
431
+ type = "oneshot" ;
432
+ ExecStart = lib . getExe linkEglLib ;
433
+ } ;
434
+ wantedBy = [ "multi-user.target" ] ;
435
+ } ;
436
+
437
+
411
438
# https://developer.ridgerun.com/wiki/index.php/Xavier/JetPack_5.0.2/Performance_Tuning
412
439
systemd . services . jetson_clocks = mkIf cfg . maxClock {
413
440
enable = true ;
You can’t perform that action at this time.
0 commit comments