I'm using an old laptop of mine as a media server, as such the lid is almost always closed. There is no display other than the lid hooked up. I have configured Ubuntu to not suspend or shut down if the lid is closed while it is booted and that works fine. However, if I remote in and trigger a reboot then the system does not reboot properly, it just shuts down, if the lid is closed. The lid must be open to reboot the system. How might I change this behavior? Ideally I'd like to be able to trigger a reboot from anywhere that I can SSH into the system from.
I cannot directly answer your question but might be able to point you in the right direction. ACPI is likely involved. A quick test would be to boot without it by adding
acpi=off to your grub kernel line.
Conversely, you might need to tweak an ACPI script to make
reboot not actually do the equivalent
shutdown -h now
Likely also a good time to learn more about ACPI, it's actually pretty neat. http://manpages.ubuntu.com/manpages/bionic/man8/acpid.8.html