NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.45k stars 13.65k forks source link

HDMI display stucks on `Starting Kernel ...` on Raspberry Pi 3 Model B V1.2 #104609

Closed pinage404 closed 2 years ago

pinage404 commented 3 years ago

Describe the bug HDMI display stucks on Starting Kernel ...

To Reproduce I have two Raspberry Pi 3 Model B V1.2 :

I have two micro SD card :

Raspberry Pi 3 Model B V1.2 (black case) Raspberry Pi 3 Model B V1.2 (white case)
micro SD 4Go works well, did many generations together HDMI display stucks on Starting Kernel ... but SystemD's services work (SSH, PulseAudio, SpotifyD ...)
micro SD 32Go works well, display the initial prompt HDMI display stucks on Starting Kernel ...

Expected behavior The HDMI display should not be stuck whichever which Raspberry Pi I use

Screenshots Raspberry_Pi_3_Model_B_V1 2_black_case Raspberry_Pi_3_Model_B_V1 2_white_case

Notify maintainers

Metadata Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:

I don't know, it should be related to this : https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix

pinage404 commented 3 years ago

I don't want to be stuck infinitely

So, I'm going to use my first Pi to finalize my installation on the micro SD 32Go

But this does not solve the problem

alexvorobiev commented 3 years ago

I think you may be seeing this issue: https://github.com/NixOS/nixpkgs/issues/97064. That thread has a workaround.

cyounkins commented 3 years ago

If you are not getting any system services and the NIC lights are not coming on, you might be you're running into the 5.7 kernel-too-big issue. See #97064 and try boot.kernelPackages = pkgs.linuxPackages_5_4 to use 5.4.

I needed to set

  boot.kernelParams = [
    "console=tty0,115200n8"
  ];

to sometimes get more verbose boot output over HDMI. I frequently get bcm2835-power: Timeout waiting for grafx power OK in the journal, and I think that breaks it. More info for that here: https://github.com/raspberrypi/linux/issues/3046 and fix applied to the kernel: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e7b7daeb48e0bf5d8412d77f11069750ee7032bb I haven't verified but that kernel commit should be in 5.7 but not 5.4.

tmplt commented 3 years ago

I had the same problem recently. I had to boot.kernelPackages = pkgs.linuxPackages_4_19;. I never tried any more recent kernels.

samueldr commented 3 years ago

Can you try with the newest LTS kernel, 5.10? It is the kernel used by the current "unstable" generic SD images.

HDMI output is working on my end flawlessly, but again HDMI output sometimes can fail with hardware-specific issues :/.

pinage404 commented 3 years ago

I tryied with my raspberry pi who was working

Before adding setting this kernel i had nix-shell -p nix-info --run "nix-info -m"

Then i added to by configuration

{ pkgs, ... }:

{
  boot.kernelPackages = pkgs.linuxPackages_5_10;
}

Full configuration is here https://gitlab.com/pinage404/dotfiles/-/blob/8123e53bf0da837a0158304de82db6dd561027a4/nixos/machine/raspberry_pi_3_b_black/configuration.nix

And apply with nixos-rebuild boot && shutdown -r

But with the new kernel, it doesn't work (stucks on Starting Kernel ... and SSH does respond, i think it doesn't complete the boot)

cyounkins commented 3 years ago

@pinage404 You may be running into #97064 . See my comment above. You could try boot.kernelPackages = pkgs.linuxPackages_5_4 or if you cannot boot the system to rebuild, try the ESP partition from the 21.05 release (https://github.com/NixOS/nixpkgs/issues/97064#issuecomment-758818947)

domenkozar commented 3 years ago

It could also be you need to first update firmware: https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md

stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info

samueldr commented 2 years ago

I am closing this issue since it's stale, but mainly because the variables are now different enough (Raspberry Pi boot firmwares, U-Boot, default Linux kernel) that anyone newly facing this issue is more than likely facing a different issue. Furthermore, there may be confusion in this thread with suggestions about updating the EEPROM firmware on a board which does not have one.

But I'm closing with these first things you (yes you) should know and consider if you are facing this issue:

And finally, if you can't seem to get it working, I invite you to open an issue, refer to this issue (or any other closed issue you might think are relevant), and importantly:


@pinage404 this does not apply to you. Feel free to re-open this specific issue and discuss the specific situation you're now in.