On Wed, 15 Apr 2020 10:41:27 +0200
Stephen Berman <[email protected]> wrote:

> But if I run another program before shutdown (the two cases I've tried
> are startx and emacs in the tty), then shutdown does not power off
> the machine.


This is a most perplexing problem!

I found this:

https://forums.developer.nvidia.com/t/system-seems-locked-while-rebooting-with-linux-5-2-1-and-nvidia-drivers-430-34-or-430-26/78262

which may, or may not, be related to your problem. However, it does
demonstrate that video driver bugs (in the kernel) can cause
such a problem.

Now, clearly there will be many other processes running on your
system even after a cold start. Even a bash prompt is a running
process.

Emacs might not be as clean a "console"" test as you might think - it
might trigger the starting of some video related kernel functions even
when running outside of X.

Try something like

more text_file.txt

so that you get a more prompt in that tty. Can you shutdown
with something as simple as more running?

If *any* running command, which was started by you, triggers the
problem, then perhaps it could be some type of permissions/user
issue related to a kernel bug. Namely, if your username starts
a process (perhaps anything other than a shell), then the kernel
seems to be unable to kill that process, and most strangely, all
this seems to be linked to the CDROM.

Another angle is that emacs (and Xorg) "look" at the CDROM
and that is what triggers it. If the more test allows for
a clean shutdown, than what about commands that try to
access the cdrom:

dd count=10 bs=1k if=/dev/cdrom of=/dev/null

Does running that result in shutdown failures (even after
the the dd command finishes/fails)?

What if your emacs process is then killed *before* you try to
shutdown, can you shutdown then? If not, my guess is that any
process that ever "looks" at the cdrom triggers the problem.

Another thing to try - does the problem persist if the CDROM is
physically disconnected from the system (e.g., its SATA cable
disconnected and then the system powered up)? If the system
just hangs at some other point, then that is good evidence that
something other than the CDROM driver/SCSI system is to blame.


  Cheers,

  Mike

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to