uobikiemukot / yaft

yet another framebuffer terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to shutdown from yaft?

oimaasi opened this issue · comments

This may sound stupid, but I sincerely want to get some suggestion for this problem.
Normally, when in Linux console, I would type something like sudo shutdown now to turn off my computer, and it will show a bunch of system messages, then shutdown.

In yaft, after I launch the shutdown command, nothing shows up. Maybe because those system messages are not printed to the framebuffer, which is in control by the current user? In fact, if I type sudo poweroff, the machine will actually turns off itself after a few seconds. So I can confirm it is at least doing something in the background. However, my current Gentoo machine has a strange behavior which will ask for root password one more time to enter maintenance mode after the shutdown command. Nevertheless, as I mentioned above, I can see none of this message in yaft. In fact, the machine just appears dead. I can't even switch to tty2-6. Every time I have to long press the power button to force shutdown.

Is such behavior normal / as expected? Should I write a shutdown script to first exit yaft and then shutdown? How the developer shutdown his machine?
Thank you.

yaft takes the controll of VT switches and set the VT mode to be graphics at startup, this is the reason that you cannot see system message output to /dev/console while shutting down.

There are several solutions:

  1. set FORCE_TEXT_MODE = true in conf.h
  2. use shutdown or poweroff commands after exiting yaft
  3. switch to another tty (not controlled by yaft) and shutdown

Thank you for the suggestions.
The set FORCE_TEXT_MODE = true method solves my problem.