-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raspberry Pi 4: No HDMI console output after upgrade from 21.11 ceaca998029 #179701
Comments
I tried switching my monitor from HDMI-0 to HDMI-1 and found the missing output. When rebooting with HDMI-1, I see the bootloader output, but then nothing from the kernel until the login prompt appears. I'm guessing the kernel output is still being sent to HDMI-0 until it switches to a framebuffer mode. So, I can change the outputs as a workaround, but it would still be nice to understand what changed and how to fix it properly. |
Besides bisecting the changes, I also don't have a good suggestion here. :( |
Using HDMI-1 instead of HDMI-0 is also working for me. The default Raspberry Pi OS doesn't need this workaround. Some raspberry pi resources [0, 1] suggest setting [0] https://forums.raspberrypi.com/viewtopic.php?t=34061 |
Has anyone found a reliable work around for this? None of the mentioned ideas are working for me, and I can't even use the last working image, it's not compatible with Pi4B I just received. I see console output for a while, then the monitor turns off and I see double green flashes for a while. But nothing further happens. |
@ryanbrooker perhaps try #191095 (comment)? |
Thanks for the tip @RyanGibb. I'm trying to follow this guide at: https://nixos.org/guides/installing-nixos-on-a-raspberry-pi.html I'm not sure where I would update that nixos configuration after creating the image on the SD card as described in the guide? |
I see! I wasn't aware of this guide. It's a shame that the most recent working build your directed to doesn't seem to work. I had a dig around and it looks like it's a little over 2 years old: https://hydra.nixos.org/build/134721359. (I'm not sure whether this is intentional or not). Can I ask how familiar you are with NixOS? Are you using it on any other machines? |
This is my maiden voyage with NixOS. I use nix for packages on my Macs, but I've never used NixOS before. The Pi is working with Raspbian. But I bought it for tinkering. :) Oh, and I've tried the latest build from Hydra (about to try the one mentioned in the actual guide). In case it's not clear above, I've also tried the "working" build suggested and it is not compatible with the current Pi4Bs. |
So normally you would be able to modify the Nixos configuration on the SD image on the Pi itself, but in this case the lack of display output is preventing that. You could try and SSH in, but that would require a SSH server up and running as well as a network connection -- which might require WiFi authentication if you don't have an easily available ethernet connection -- which also requires a configuration change. It's the chicken and the egg! Fortunately we can pre-compile a custom SD image instead of having to modify it on the Pi directly. Basically what the default SD image is building is defined here: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/sd-card/sd-image.nix You can build this yourself with:
So if you modify
Glad to hear it it :-) The reason I ask about your familiarity with nixos is it's also possible to define such an image in your own nixos configuration. My example, using Nix flakes, is here with this fix. I also have an SSH server, authenticated keys, and WiFi connections authenticated through this. But given that this is your first system I would just try the above initially. |
Brilliant. Thanks so much for the information. I'll let you know the outcome. :) |
You're welcome, and good luck! |
It seems that I need to do the build on a linux machine? I found something called darwin.builder that suggests it can be a build runner for linux builds on macOS, but I can't get it to work. |
Ah yes, that could be an issue. I've gotten architecture cross compilation working but not OS cross compilation. This is the relevant manual sections: https://nixos.org/manual/nixpkgs/stable/#chap-cross Can you share the error messages? And is your mac aarch64 or x86_64? If you have access to a linux box, it might be easier to build the image on that. |
Thanks for the link. My Mac is |
This is the error I see, even with
|
That looks like exactly what we need! It looks like it runs a linux VM as a (local) remote builder.
Hmm, it looks like your not using the Linux VM as a remote builder for some reason... When you say |
Looks like |
I have The log message(s) look like this:
So that makes me think nix knows about the builder. |
It couldn't be because it needs to run as sudo could it? I ran into that as described here: NixOS/nix#1572 (comment). Also, it's worth testing the connectivity as described here with:
Otherwise I'm not too sure how to debug this with the old CLI. I know with the new CLI that you can use
And add |
Also, I should have said this sooner, but have you tried the other HDMI port and/or another (low resolution) monitor? |
Looking into the details of your other comment (thank you again), but yeah I've tried the only two monitor options I have and both HDMI ports. |
Ok. This doesn't work… but I think this passing the builder description for
However, this does work:
I have listed my user in |
Turns out, this almost works:
It starts building, and then:
nix log contains:
I think it may be time to install nix on the raspberry pi's standard install, and then build the nixos image there. |
Okay, so, I don't think Also, I noticed that NB there shouldn't be any cross compilation (from Nix's perspective here) as our virtualization If the above doesn't work out I'd encourage you to try the flake option above (the new CLI has a better UX imo). I'm also happy to build this image for you and share the binary which might be a lot easier! |
Thank you again for your help. Part of this is to aid my understanding/learning. So I'm happy to keep trying, though I appreciate the offer. Re the
If I include the arch it thinks it's part of the key path and fails. However, on the Now we're getting close. I think it's all working as far as the
Which appears to be this issue (link to preposed solution that I haven't tried yet): |
Whoa. I added the overlay in that link and bam. It compiled! |
Strange...
Magic! Let me know if it boots on the Pi okay. |
It boots, but the manual and the installation guide suggest I should have been automatically logged in. However, there is a login prompt and I have no idea what the login details are! I tried |
Ah, I think you need This is defined here (and the nixos user here). That's my bad, it looks like what we really wanted was https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix, which imports https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/sd-card/sd-image-aarch64.nix. |
Yep. I worked it out. Just copying the new image across to my SD card now… I'm in. Awesome. Thank you so much or your guidance. I learned a lot, including more places to look for info and answers. Cheers. 🎉 |
You're welcome! Glad I could help :) |
@ryanbooker Would you consider writing up a gist on the full sequence to set up a builder on Mac and create a working bootable NixOS image for RPi 4? It's a little hard to piece together from this thread. Thank you. |
I would be very interested in the write up as well. I spent way to much time on this little thing already. Unbelievable that high resolution monitors (1080p+) are still such a big problem with it. I'm trying to get my rpi4 up and running with a 1440p one here. |
One other alternative is using GitHub Actions to build the image. This is example is for a Pi 3 but builds an image and uploads it as a release artifact: https://github.com/n8henrie/nixos-btrfs-pi Similar idea but builds an x86_64 NixOS rescue image that I can download from anywhere and throw on a USB: https://github.com/n8henrie/nixos-rescue |
Describe the bug
If I do a
nixos-rebuild switch && reboot
or boot from the latestnixos-sd-image-22.05.1241.5ec2af9f483-aarch64-linux.img.zst
, I no longer get a login prompt/shell and the monitor goes into power saving mode.Steps To Reproduce
Steps to reproduce the behavior:
nixos-sd-image-21.11.335677.ceaca998029-aarch64-linux.img.zst
nixos-generate-config && nixos-rebuild switch && reboot
(System comes back up fine)nix-channel --update && nixos-rebuild switch
(Note that console font size changes but otherwise things seem ok)reboot
No Signal
Expected behavior
I expect to see a login prompt after boot, or at least console output showing an error. When booting from the latest installer I expect to see a
bash
shell prompt.Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
This is a minimal config with no xserver enabled. If I enable openssh, it seemed to take a really long time before accepting connections, but eventually it did and I was able to get these errors from
dmesg
nvd diff
shows these changes betweenceaca998029
and891016b5cf1
(sorry this was after including my standard configuration [on both sides], so includes some irrelevant packages):Notify maintainers
Not sure. @blitz @samueldr maybe know something?
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: