diff --git a/gdm-plymouth-vt1.patch b/gdm-plymouth-vt1.patch new file mode 100644 index 0000000..08694f2 --- /dev/null +++ b/gdm-plymouth-vt1.patch @@ -0,0 +1,66 @@ +Index: gdm-3.12.2/daemon/main.c +=================================================================== +--- gdm-3.12.2.orig/daemon/main.c ++++ gdm-3.12.2/daemon/main.c +@@ -33,6 +33,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -308,6 +310,23 @@ block_sigusr1 (void) + sigprocmask (SIG_BLOCK, &mask, NULL); + } + ++static void ++jump_to_vt (int vt_number) ++{ ++ int fd; ++ ++ fd = open ("/dev/tty0", O_RDWR | O_NOCTTY); ++ if (ioctl (fd, VT_ACTIVATE, vt_number) < 0) { ++ g_debug ("Gdm: couldn't initiate jump to VT %d: %m", ++ vt_number); ++ } else if (ioctl (fd, VT_WAITACTIVE, vt_number) < 0) { ++ g_debug ("Gdm: couldn't finalize jump to VT %d: %m", ++ vt_number); ++ } ++ close(fd); ++} ++ ++ + int + main (int argc, + char **argv) +@@ -317,6 +336,7 @@ main (int argc, + GError *error = NULL; + int ret; + gboolean res; ++ gboolean plymouth_running = FALSE; + static gboolean do_timed_exit = FALSE; + static gboolean print_version = FALSE; + static gboolean fatal_warnings = FALSE; +@@ -400,6 +420,8 @@ main (int argc, + + g_chdir ("/"); + ++ plymouth_running = g_access("/run/plymouth/pid", F_OK) == 0; ++ + main_loop = g_main_loop_new (NULL, FALSE); + + g_unix_signal_add (SIGTERM, on_shutdown_signal_cb, main_loop); +@@ -429,6 +451,11 @@ main (int argc, + g_printerr ("%s\n", error->message); + g_clear_error (&error); + } ++ ++ if (plymouth_running) { ++ jump_to_vt (1); ++ } ++ + return ret; + } + diff --git a/gdm.changes b/gdm.changes index d2b88e1..f872a52 100644 --- a/gdm.changes +++ b/gdm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 27 16:43:48 UTC 2014 - fcrozat@suse.com + +- Add gdm-plymouth-vt1.patch: switch back to VT1 when terminating + gdm, if plymouth was running at startup [bnc#881676]. + ------------------------------------------------------------------- Mon Jun 23 09:57:12 UTC 2014 - dimstar@opensuse.org diff --git a/gdm.spec b/gdm.spec index c5ad50a..76a889e 100644 --- a/gdm.spec +++ b/gdm.spec @@ -60,6 +60,8 @@ Patch34: gdm-default-wm.patch Patch35: gdm-xauthlocalhostname.patch # PATCH-FIX-UPSTREAM gdm-look-at-runlevel.patch bnc540482 bgo599180 vuntz@opensuse.org -- Look at the current runlevel before managing the display again, so we don't do this when shutting down or rebooting Patch40: gdm-look-at-runlevel.patch +# PATCH-FIX-UPSTREAM gdm-plymouth-vt1.patch bnc#881676 fcrozat@suse.com -- switch to VT1 when quitting if gdm was starting with plymouth running +Patch41: gdm-plymouth-vt1.patch BuildRequires: check-devel # needed for directory ownership BuildRequires: dconf @@ -193,6 +195,7 @@ translation-update-upstream %patch34 -p1 #patch35 -p1 %patch40 -p1 +%patch41 -p1 %build NOCONFIGURE=1 sh autogen.sh