On Wed, 22 Apr 2020 00:48:29 +0200 Stephen Berman <stephen.ber...@gmx.net> wrote:
> the machine did power off. So this took longer than the 20 seconds > it took when calling shutdown immediately after logging in but > unlike when running emacs or startx it didn't hang indefinitely. And I thought it couldn't get any stranger. Obviously, I was wrong. :( I see that (my, older) emacs is linked against libmount. My best guess at this point is that both emacs and Xorg "look at" the cdrom and this is what triggers the infinite hang. However, if nothing "looks" at the cdrom, then the hang will be limited in duration. Nevertheless, at this point I believe that both the delay and hang are linked to the cdrom driver. What if you issue a command like: dd count=100 bs=1k if=/dev/cdrom of=/dev/null with and without a readable disk in your cd/dvd drive? After the above command is attempted/executed how does your shutdown proceed then? If it hangs forever, then I say that accessing the cdrom is what emacs and Xorg does that triggers the infinite hang. We could be looking at an interaction bug between your particular dvd drive's firmware and the kernel. For example, previous kernels sent the drive certain commands to close, etc. and newer kernels do it a different way, one that triggers a "bug" in the drive's firmware. Even if true, this does not mean that the kernel code should not be changed - there is a general policy of kernel developers to workaround such hardware issues whenever possible. The next test would be to see if the hang persists even if the drive is disconnected (or as Bruce suggested, trying a kernel without the cdrom driver). If that confirms it is the cdrom, then you have to bisect until you find the specific change in the driver that created the issue. 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