# Weird issue with laptop and reboot



## thedude22 (Jul 12, 2021)

I just did a fresh install on my thinkpad laptop.  Pretty much everything works great except for one issue.

If I reboot the machine, it will hang every time.  If I do a shutdown and power on it works every time.

It hangs at the manufacturer splash screen.  I guess that's what it's called.  The screen with the Lenovo logo where it says which buttons to press to enter the setup etc..  It appears to happen before the freebsd kernel is loaded.  The freebsd splash screen with the little daemon never shows up. 

Has anyone had this problem before?  Is there a resolution?

I am running a zfs mirror across 2 ssds as the root partition if that matters.


----------



## SirDice (Jul 12, 2021)

thedude22 said:


> It hangs at the manufacturer splash screen.


This appears to imply it does shutdown correctly and 'hangs' at the POST when rebooting. There might be a BIOS/UEFI option to turn off the manufacturer splash, typically called "quiet" boot. Turn that off so you can see the actual POST messages.


----------



## sko (Jul 12, 2021)

I highly suspect yet another broken BIOS/EFI implementation.
I've seen this behavior on various desktop systems at work, especially on ASRock and ACER systems. The UEFIs of ASRocks variants of the Intel NUCs ("BeeBox") are exceptionally annoying and broken; e.g. generating a new EFI boot entry at every cold boot and completely freezing at reboots, requiring a hard reset (holding the power button for >5secs). Often this behavior is even reproducible with other non-Windows-OS even on live-images.
Nagging the support of the vendor is usually completely hopeless, so I just avoid their products like the plague they are...

Things you could try that come to my head that worked for me on some broken systems:
- CSM/legacy boot options and combinations of the available EFI/legacy/CSM options
- removing all secure boot keys additionally to disabling secure boot (this sometimes also solved other EFI boot issues for me)
- adding one non-working boot option (e.g. CD-ROM) before the actual disk or EFI entry you want to boot
- always booting to the EFI console and then booting manually (which still is annoying, but better than a completely frozen system...)


----------



## thedude22 (Jul 12, 2021)

I don't see quiet boot. I have a boot mode setting, which has 2 options, quick or diagnostics. I set it to diagnostics but it doesn't show anything but a frozen cursor.

EFI is kind of annoying.  It still has a bunch of old OSes I installed on the computer years ago.  I guess I'm just stuck with it.  Unfortunate.  Maybe I can reinstall the OS with only legacy mode enabled?  Would that work?


----------



## sko (Jul 12, 2021)

Legacy boot should work (at least on the FreeBSD side) if you have written the MBR bootstrap code to the disk e.g. by choosing "BIOS + EFI boot" during setup. You can still write that bootcode to the disk with the `gpart bootcode` command (see gpart(8) examples).
OTOH booting via legacy mode doesn't necessarily guarantee that it will prevent the UEFI from freezing at reboot, but it's definately worth a try.


----------



## thedude22 (Jul 13, 2021)

meh. doesn't work.

I'll just have to shutdown instead of rebooting. it's only a minor annoyance.

are there any laptop brands you find are pretty good about this kind of stuff? I'll be in the market for a new one before too long.


----------



## richardtoohey2 (Jul 13, 2021)

I don't have quite the same thing, but similar.  Lenovo Thinkpad X1 Carbon 4th generation (running OpenBSD).  Do updates, reboot, it hangs but on the X window screen - see the mouse pointer X but it won't move.  Power down and start up again - works fine.  But every single time I do a reboot, it will hang on the X screen.

Might be an X thing, or an OpenBSD thing, but just the "works on power up but not reboot" struck a chord.


----------



## sko (Jul 13, 2021)

richardtoohey2
This has nothing to do with BIOS/UEFI, but I remember occasional X hangs after reboot from the 'early days' of the drm/i915 driver on FreeBSD, so I suspect it's also simply a driver issue in your case. But although I currently have 10+ OpenBSD systems running, I've never used X (and/or any special graphics drivers) on OpenBSD, so that topic is completely beyond my knowledge.


----------



## thedude22 (Jul 14, 2021)

hmm. I am using i915. maybe I'll try switching it off. but I doubt it's that. it seems to hang before the kernel is even loaded


----------



## richardtoohey2 (Jul 15, 2021)

What *exact* machine have you got?


----------



## sko (Jul 15, 2021)

thedude22 said:


> hmm. I am using i915. maybe I'll try switching it off. but I doubt it's that. it seems to hang before the kernel is even loaded


The hint to graphic drivers was only regarding the X hang problem from richardtoohey2. Your problem is at the BIOS/UEFI, so it has nothing to do with any drivers as they can't even interfere at this stage...


----------



## George (Jul 15, 2021)

Maybe you find a setting in `sysctl -a |grep reboot` and `sysctl -a |grep poweroff`


----------



## sko (Jul 16, 2021)

George said:


> Maybe you find a setting in `sysctl -a |grep reboot` and `sysctl -a |grep poweroff`


good catch - hw.acpi.handle_reboot might be worth a try!


----------



## thedude22 (Jul 16, 2021)

```
~$ sysctl -a | grep reboot
kern.panic_reboot_wait_time: 15
kern.vt.kbd_reboot: 1
hw.acpi.handle_reboot: 1
hw.acpi.disable_on_reboot: 0
hw.syscons.kbd_reboot: 1
```

I tried disabling hw.acpi.handle_reboot.  It made it hang in the terminal after the "Rebooting" message.

I tried enabling hw.acpi.disable_on_reboot.  It didn't make any difference.  I have no idea what any of these settings do, and not enough time to look them all up.

It's not a big deal.  I don't really need to reboot ever anyway.  And if I do I can just power down and power back on.


----------



## thedude22 (Jul 16, 2021)

richardtoohey2 said:


> What *exact* machine have you got?


It's a Lenovo Thinkpad Yoga 14.  They were sold at best buy a few years ago.  That's all I know.


----------



## richardtoohey2 (Jul 16, 2021)

Searching for freezes on logo screen for Lenovo laptops gives a lot of matches but mostly about Windows.

There’s this sort of thing about BIOS updates: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1890415

NOT related to what you are seeing just lots of discussion about BIOS updates fixing some things and making others worse etc. But maybe worth checking out if any BIOS updates available if you haven’t already. But updates may make things worse so you might be better off just living with it (as I do with my different issue on my laptop that means I can’t restart it).


----------



## grahamperrin@ (Jul 19, 2021)

thedude22 said:


> … Lenovo Thinkpad Yoga 14. …





thedude22 said:


> … it says which buttons to press to enter the setup etc.. …



Do the buttons work in this situation? 



thedude22 said:


> … I can just power down and power back on.



Sure, however if (through the splash screen dialogue) you can locate and boot from the required file, we might be a step closer to understanding why there's not yet automated use of the file. 



thedude22 said:


> … zfs mirror across 2 ssds as the root partition if that matters.



Possibly.


----------



## thedude22 (Jul 20, 2021)

No the buttons don't work.  The whole thing freezes up.  Can't load the bios or anything.  It's a hard lockup.


----------

