I'm trying to get Kodi running on a Raspberry Pi 3B with NixOS. For some reason XServer will not start properly.
Below you can see a gist of the configuration, the boot log and a systemctl status to attempt to debug the issue.
I'm trying to get Kodi running on a Raspberry Pi 3B with NixOS. For some reason XServer will not start properly.
Below you can see a gist of the configuration, the boot log and a systemctl status to attempt to debug the issue.
{ config, pkgs, lib, ... }: | |
{ | |
services.xserver = { | |
enable = true; | |
desktopManager.kodi.enable = true; | |
displayManager.autoLogin = { | |
enable = true; | |
user = "kodi"; | |
}; | |
}; | |
users.users.kodi = { | |
isNormalUser = true; | |
}; | |
networking = { | |
firewall = { | |
allowedTCPPorts = [ 8080 ]; | |
allowedUDPPorts = [ 8080 ]; | |
}; | |
}; | |
} |
[ OK ] Stopped X11 Server. | |
Starting X11 Server... | |
[ OK ] Started X11 Server. | |
[ OK ] Stopped X11 Server. | |
Starting X11 Server. | |
[ OK ] Started X11 Server. | |
[ OK ] Stopped X11 Server. | |
[FAILED] Failed to start X11 Server. | |
See 'systemctl status display-manager.service' for details. |
[ixxie@nixos:~]$ sudo systemctl status display-manager.service | |
● display-manager.service - X11 Server | |
Loaded: loaded (/nix/store/83ddx1v8m5073sqkh796h3wf6dz3h0i1-unit-display-manager.service/display-manager.service; linked; vendor preset: enabled) | |
Active: failed (Result: exit-code) since Sun 2021-03-07 17:53:56 UTC; 21s ago | |
Process: 827 ExecStartPre=/nix/store/n2npp5kqjld4j9i4f0d2ak1gjl8m53mf-unit-script-display-manager-pre-start/bin/display-manager-pre-start (code=exited, status=0/SUCCESS) | |
Process: 829 ExecStart=/nix/store/9n22y66i6nf5mn8nr129lb0bic95j84d-unit-script-display-manager-start/bin/display-manager-start (code=exited, status=1/FAILURE) | |
Main PID: 829 (code=exited, status=1/FAILURE) | |
IP: 0B in, 0B out | |
CPU: 377ms | |
Mar 07 17:53:56 nixos systemd[1]: display-manager.service: Scheduled restart job, restart counter is at 3. | |
Mar 07 17:53:56 nixos systemd[1]: Stopped X11 Server. | |
Mar 07 17:53:56 nixos systemd[1]: display-manager.service: Start request repeated too quickly. | |
Mar 07 17:53:56 nixos systemd[1]: display-manager.service: Failed with result 'exit-code'. | |
Mar 07 17:53:56 nixos systemd[1]: Failed to start X11 Server. | |
Mar 07 17:53:56 nixos systemd[1]: display-manager.service: Triggering OnFailure= dependencies. | |
Mar 07 17:53:56 nixos systemd[1]: display-manager.service: Failed to enqueue OnFailure= job, ignoring: Unit plymouth-quit.service not found. |
In the wiki article about Kodi (https://nixos.wiki/wiki/Kodi) I found an approach to running Kodi with Wayland; with this approach boot seems to hang in a different way.
{ config, pkgs, lib, ... }: | |
{ | |
services.cage = { | |
enable = true; | |
user = "kodi"; | |
program = "${pkgs.kodi-wayland}/bin/kodi-standalone"; | |
}; | |
users.users.kodi = { | |
isNormalUser = true; | |
}; | |
networking = { | |
firewall = { | |
allowedTCPPorts = [ 8080 ]; | |
allowedUDPPorts = [ 8080 ]; | |
}; | |
}; | |
} |
[ OK ] Creater slice user-1002.slice. | |
Starting User Runtime Directory /run/user/1002... | |
[ OK ] Finished User Runtime Directory /run/user/1002. | |
Starting User Manager for UID 1002... | |
[ OK ] Started User Manager for UID 1002. | |
[ OK ] Started Session c1 of user Kodi. | |
Starting Authorization Manager... | |
[ OK ] Started Authorization Manager. |
{ config, pkgs, lib, ... }: | |
{ | |
boot = { | |
loader = { | |
grub.enable = false; | |
generic-extlinux-compatible.enable = true; | |
}; | |
kernelPackages = pkgs.linuxPackages_rpi3; | |
initrd.includeDefaultModules = false; | |
kernelParams = ["cma=32M"]; | |
}; | |
fileSystems = { | |
"/" = { | |
device = "/dev/disk/by-label/NIXOS_SD"; | |
fsType = "ext4"; | |
}; | |
}; | |
swapDevices = [ { device = "/swapfile"; size = 1024; } ]; | |
} |