Bug#504389: kind of a workaround
Tim Richardson
tim at tim-richardson.net
Wed Nov 5 11:56:13 UTC 2008
If I change /etc/init.d/splashy to do a sleep for a few seconds, gdm
shutdown works.
Below shows what happens in that pause which allows the activation of vt
8 to work without manually doing Alt-F8
Change I made to /etc/init.d/splashy
-----------------------------
stop)
check_to_enable
logger "splashy in shutdown mode. doing clear >/dev/tty8"
# avoid displaying ugly text at shutdown
clear >/dev/tty8
logger "splashy in shutdown mode. doing clear >/dev/tty1"
clear >/dev/tty1
logger "splashy in shutdown mode. doing sleep >/dev/tty8"
# I moved the sleep around to prove that it is "protecting"
splashy_chvt, not the two clear commands above
sleep 10
logger "splashy in shutdown mode. doing /sbin/splasy_chvt 8"
/sbin/splashy_chvt 8
---------------------------
this is the relevant extract from syslog which shows what happens during
the sleep, presumably linked to the change in gdm
---------------------------
Nov 5 22:40:05 u400 gdm[4080]: DEBUG: Running /sbin/shutdown -r now
"Rebooted via gdm."
Nov 5 22:40:05 u400 shutdown[5070]: shutting down for system reboot
Nov 5 22:40:05 u400 init: Switching to runlevel: 6
Nov 5 22:40:05 u400 gdm[4080]: DEBUG: gdm_final_cleanup
Nov 5 22:40:05 u400 gdm[4080]: DEBUG: gdm_display_unmanage: Stopping :0
(slave pid: 4089)
Nov 5 22:40:05 u400 gdm[4089]: DEBUG: term_quit: Final cleanup
Nov 5 22:40:05 u400 gdm[4089]: DEBUG: gdm_slave_quick_exit: Will kill
everything from the display
Nov 5 22:40:05 u400 gdm[4089]: DEBUG: gdm_server_stop: Server for :0
going down!
Nov 5 22:40:05 u400 gdm[4089]: DEBUG: gdm_server_stop: Killing server
pid 4101
Nov 5 22:40:06 u400 logger: splashy in shutdown mode. doing clear
>/dev/tty8
Nov 5 22:40:06 u400 logger: splashy in shutdown mode. doing clear
>/dev/tty1
Nov 5 22:40:06 u400 logger: splashy in shutdown mode. doing sleep
>/dev/tty8
Nov 5 22:40:06 u400 gdm[4089]: DEBUG: gdm_server_stop: Server pid 4101
dead
Nov 5 22:40:06 u400 gdm[4089]: DEBUG: gdm_slave_quick_exit: Killed
everything from the display
Nov 5 22:40:16 u400 logger: splashy in shutdown mode.
doing /sbin/splasy_chvt 8
---------------------------
sleep 1 instead of sleep 10 didn't work.
This is splashy_chvt
---------------------------
void
splashy_chvt (gint vt_no)
{
gint fd = g_open ("/dev/tty0", O_RDONLY | O_WRONLY);
if (fd < 0)
return;
if (!ioctl (fd, VT_ACTIVATE, vt_no))
ioctl (fd, VT_WAITACTIVE, vt_no);
close (fd);
}
---------------------------
it's not failing at (fd < 0), because it waits for the user to do ALT-F8
More information about the pkg-gnome-maintainers
mailing list