Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have an old "lenovo m55e 9644" with debian 10 installed. I want to use it to backup some other systems.
I don't want it to stay on 24/7 though, I want it to turn itself on (or maybe via WOL), take a snapshot of the other systems and then shut itself down.
The issue I have is that instead of shutting down, it keeps rebooting itself and I don't understand why.
All I know is that this only happens when there is a USB key plugged in.
I can't remove the USB keys as that's where the OS is installed (mainly due to the low number of SATA ports).
At first I thought this might be caused by something in the BIOS so I disabled/changed everything I could, like:
Advanced: Legacy free
- changed from "disabled" to "enabled" (no difference)
Power: PCI Wake Up
- changed from "primary" to "disabled" (no difference)
Startup: Automatic Startup Sequence
- changed from "enabled" to "once" (no difference)
Advanced: Plug and Play OS
- changed from "no" to "yes" (no difference)
Power: ACPI BIOS RQ
- changed from "9" to "x11" (no difference)
I normally use "shutdown -h now" and what happens is that the power light goes off for just about a second, and then the machine turn itself back on.
Any idea of what I could check to debug this from the software side, please?
For example I wonder, which part of the OS would be making the machine reboot?
All I know is that this only happens when there is a USB key plugged in.
I can't remove the USB keys as that's where the OS is installed (mainly due to the low number of SATA ports).
How can you know? Do you boot from hard drive also? Which OS? Why can't you dual boot from hard drive?
Quote:
Originally Posted by ^andrea^
For example I wonder, which part of the OS would be making the machine reboot?
In other cases I'd usually say ACPI.
In this case I'd say systemd.
>> How can you know?
Take this with a pinch of salt if you like. I just remember having the same issue years ago,
when first inserting a USB key (I can't remember whether the OS was installed on the USB key back then).
>> Do you boot from hard drive also?
I've never experienced this issue when booting from a hard drive.
>> Which OS?
I would say most things I use at home are Debian/Ubuntu. I remember using this for proxmox with OpenVZ (no KVM, as it does not have hardware virtualization).
>> Why can't you dual boot from hard drive?
I'm not sure why you ask, sorry. I don't need to dual boot.
I just use this from the cli, no desktop environment installed.
Since the motherboard has only two SATA ports (which I want to use for 2 drives in raid1), I'm using multiple USB ports with mdadm (in raid1 also) for the OS.
Before anyone asks, I'm using "folder2ram" to prevent excessive writes to the USB keys.
I'm just done some further testing right now.
First of all I reset the BIOS to the default values, since nothing made any difference, and confirmed the issue was still there.
Then I booted another OS (SystemRescueCD 6.0.2 - Arch Linux 4.19.24-1-lts), from another USB key and with all the current USBs still plugged in and "shutdown -h now" worked!
The machine actually shut down.
So it seems to be a sofware "issue" or at least some difference between the two OSs.
Going back to the Debian 10 system, I've already tried to modify "GRUB_CMDLINE_LINUX_DEFAULT" in /etc/default/grub from:
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
to one of these in turn:
GRUB_CMDLINE_LINUX_DEFAULT="acpi=noacpi quiet"
GRUB_CMDLINE_LINUX_DEFAULT="acpi=noirq quiet"
GRUB_CMDLINE_LINUX_DEFAULT="acpi=off quiet"
None of them fixed the issue and one made the system unbootable (can't remember which one it was now).
If anyone knows what else I could try I'm all ears.
@ondoho - what settings do I need to investigate for systemd please? and maybe where are they?
Then I found this comment: https://forums.linuxmint.com/viewtop...95951#p1395951
Here is the comment in case the link stops working at some point:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[..]
# GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noacpi"
# GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX_DEFAULT="reboot=acpi"
# GRUB_CMDLINE_LINUX_DEFAULT="reboot=efi"
# GRUB_CMDLINE_LINUX_DEFAULT="reboot=pci"
# GRUB_CMDLINE_LINUX_DEFAULT="reboot=ahci"
GRUB_CMDLINE_LINUX=""
# GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
Originally, the 1st line worked with LM18.2. Then it stopped working.
For awhile, the 3rd line worked. Then it stopped working, running LM18.2.
Then the 2nd line worked. Then it stopped working, after upgrading from LM18.2 to LM18.3.
Now, the 3rd line is working again.
Try all of them, one at a time, then update-grub.
[..]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For me, the first one that worked is:
GRUB_CMDLINE_LINUX_DEFAULT="reboot=ahci quiet"
Let's see how long it will work for (according to other comments these options seem to be a bit temperamental with kernel changes).
Anyway, if anyone can shed some light on why "reboot=acpi" makes the system shutdown properly, it would be much appreciated.
I'm going to mark this as solved for now.
hold on, it worked 2/3 times in a row and then started failing again... maybe when I removed the USB keyboard, the VGA cable or the "quiet" option in the kernel.
Who knows. Or maybe it's just totally random.. lol :-D
>> How can you know?
Take this with a pinch of salt if you like. I just remember having the same issue years ago,
when first inserting a USB key (I can't remember whether the OS was installed on the USB key back then).
Sorry, but from my POV this completely invalidates your original statement.
I just don't remember experiencing this issue when booting from one of the internal SATA hard drives, but I do remember the issue when having a USB key in. That's all I remember.
Back then I did not investigate this far, now I'm doing my best to see whether I can get to a point where I can shut down the machine.
I'll post back with progress as soon as I find out something new
Thanks,
Andrea
PS: thanks for the resources elucches, I'm taking a look
The other night when I thought it was solved and then it wasn't, was because I had unplugged the VGA cable.
Go figure!
Here is what the machine looks like right now:
- Power cable
- VGA
- ethernet
- 2 USB keys (for the OS)
Nothing else, and nothing plugged at the front.
And here is the grub settings which has been consistently working (tried 4/5 times so far): GRUB_CMDLINE_LINUX_DEFAULT=""
Yes, with nothing in it. If I add "quiet" it breaks.
It did not break with "reboot=ahci" but now I realise it made no difference, so I removed it.
From my point of view, I can live with this.
I'll get a VGA dummy plug for now, and report back in case of problems.
Quick tip for the reader from the future.
When changing the grub params, you need to do a complete reboot before testing.
Like:
1) edit /etc/default/grub;
2) update settings with "update-grub";
3) do a full reboot, so that the new parameters get loaded;
4) then you can test the shutdown procedure.
Years ago, when I experienced the same issue, I had other USB sticks, so I don't think this is related to the USB sticks.
Drivers
That's very possible, I'm just not sure how to find what might be missing.
There is no GUI so I can't use Synaptic but this is what I get from the cli:
# apt-cache search lenovo
acpi-support - scripts for handling many ACPI events
aes2501-wy - userspace software for usb aes2501 fingerprint scanner
brightd - daemon which regulates brightness of LCDs dynamically
hdapsd - HDAPS daemon for various laptops with motion sensors
thinkfan - simple and lightweight fan control program
The only one which seems relevant to me is "acpi-support", so I installed it with all its dependencies
(acpi-support-base acpid libice6 libsm6 libxaw7 libxcursor1 libxfixes3 libxi6 libxmu6 libxrandr2 libxt6) but unfortunately made no difference.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.