diff -Nru gnome-session-3.9.90/debian/changelog gnome-session-3.9.90/debian/changelog --- gnome-session-3.9.90/debian/changelog 2014-03-13 17:43:16.000000000 -0700 +++ gnome-session-3.9.90/debian/changelog 2015-03-06 10:49:31.000000000 -0800 @@ -1,3 +1,13 @@ +gnome-session (3.9.90-0ubuntu12.1) trusty; urgency=medium + + * debian/patches/git_add_disable_acceleration_option.patch: Backport + upstream patch to add a --disable_acceleration_check command-line option. + (LP: #1251281) + * debian/gnome-session-bin.user-session.upstart: Disable acceleration check + when launching a GNOME Flashback (Metacity) session. + + -- Ryan Tandy Fri, 06 Mar 2015 10:47:41 -0800 + gnome-session (3.9.90-0ubuntu12) trusty; urgency=medium * gnome-session-bin.user-session.upstart: Use XDG_CURRENT_DESKTOP diff -Nru gnome-session-3.9.90/debian/gnome-session-bin.user-session.upstart gnome-session-3.9.90/debian/gnome-session-bin.user-session.upstart --- gnome-session-3.9.90/debian/gnome-session-bin.user-session.upstart 2014-03-13 17:43:16.000000000 -0700 +++ gnome-session-3.9.90/debian/gnome-session-bin.user-session.upstart 2015-03-06 10:46:47.000000000 -0800 @@ -14,7 +14,10 @@ script unset UPSTART_EVENTS UPSTART_INSTANCE UPSTART_JOB -exec gnome-session --session=$DESKTOP_SESSION +case "$DESKTOP_SESSION" in + gnome-fallback) exec gnome-session --session=$DESKTOP_SESSION --disable-acceleration-check ;; + *) exec gnome-session --session=$DESKTOP_SESSION ;; +esac end script post-start exec initctl emit desktop-start DESKTOP_SESSION=$DESKTOP_SESSION diff -Nru gnome-session-3.9.90/debian/patches/add_disable_acceleration_check_option.patch gnome-session-3.9.90/debian/patches/add_disable_acceleration_check_option.patch --- gnome-session-3.9.90/debian/patches/add_disable_acceleration_check_option.patch 1969-12-31 16:00:00.000000000 -0800 +++ gnome-session-3.9.90/debian/patches/add_disable_acceleration_check_option.patch 2015-03-06 10:47:36.000000000 -0800 @@ -0,0 +1,115 @@ +From d44fe3181c82f4739fc37b745f6f0ac7b6f36efa Mon Sep 17 00:00:00 2001 +From: Mike DePaulo +Date: Sun, 9 Nov 2014 10:53:49 -0500 +Subject: [PATCH] Add new commandline option - disable-acceleration-check + +Some other lines were moved around so that debug logging will work +at the time of acceleration check. +--- + gnome-session/main.c | 78 ++++++++++++++++++++++++++++------------------------ + 1 file changed, 42 insertions(+), 36 deletions(-) + +--- a/gnome-session/main.c ++++ b/gnome-session/main.c +@@ -58,6 +58,7 @@ + static gboolean show_version = FALSE; + static gboolean debug = FALSE; + static gboolean please_fail = FALSE; ++static gboolean disable_acceleration_check = FALSE; + + static DBusGProxy *bus_proxy = NULL; + +@@ -288,6 +289,7 @@ + { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL }, + /* Translators: the 'fail whale' is the black dialog we show when something goes seriously wrong */ + { "whale", 0, 0, G_OPTION_ARG_NONE, &please_fail, N_("Show the fail whale dialog for testing"), NULL }, ++ { "disable-acceleration-check", 0, 0, G_OPTION_ARG_NONE, &disable_acceleration_check, N_("Disable hardware acceleration check"), NULL }, + { NULL, 0, 0, 0, NULL, NULL, NULL } + }; + +@@ -296,25 +298,6 @@ + gsm_util_init_error (TRUE, "%s", error->message); + } + +- /* Check GL, if it doesn't work out then force software fallback */ +- if (!check_gl (&error)) { +- gl_failed = TRUE; +- +- g_debug ("hardware acceleration check failed: %s", +- error? error->message : ""); +- g_clear_error (&error); +- if (g_getenv ("LIBGL_ALWAYS_SOFTWARE") == NULL) { +- g_setenv ("LIBGL_ALWAYS_SOFTWARE", "1", TRUE); +- if (!check_gl (&error)) { +- g_warning ("software acceleration check failed: %s", +- error? error->message : ""); +- g_clear_error (&error); +- } else { +- gl_failed = FALSE; +- } +- } +- } +- + bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +@@ -329,11 +312,6 @@ + exit (1); + } + +- if (show_version) { +- g_print ("%s %s\n", argv [0], VERSION); +- exit (0); +- } +- + /* Rebind stdout/stderr to the journal explicitly, so that + * journald picks ups the nicer "gnome-session" as the program + * name instead of whatever shell script GDM happened to use. +@@ -350,6 +328,37 @@ + } + #endif + ++ gdm_log_init (); ++ gdm_log_set_debug (debug); ++ ++ if (disable_acceleration_check) { ++ g_debug ("hardware acceleration check is disabled"); ++ } else { ++ /* Check GL, if it doesn't work out then force software fallback */ ++ if (!check_gl (&error)) { ++ gl_failed = TRUE; ++ ++ g_debug ("hardware acceleration check failed: %s", ++ error? error->message : ""); ++ g_clear_error (&error); ++ if (g_getenv ("LIBGL_ALWAYS_SOFTWARE") == NULL) { ++ g_setenv ("LIBGL_ALWAYS_SOFTWARE", "1", TRUE); ++ if (!check_gl (&error)) { ++ g_warning ("software acceleration check failed: %s", ++ error? error->message : ""); ++ g_clear_error (&error); ++ } else { ++ gl_failed = FALSE; ++ } ++ } ++ } ++ } ++ ++ if (show_version) { ++ g_print ("%s %s\n", argv [0], VERSION); ++ exit (0); ++ } ++ + if (gl_failed) { + gsm_fail_whale_dialog_we_failed (FALSE, TRUE, NULL); + gtk_main (); +@@ -362,9 +371,6 @@ + exit (1); + } + +- gdm_log_init (); +- gdm_log_set_debug (debug); +- + /* Set DISPLAY explicitly for all our children, in case --display + * was specified on the command line. + */ diff -Nru gnome-session-3.9.90/debian/patches/series gnome-session-3.9.90/debian/patches/series --- gnome-session-3.9.90/debian/patches/series 2014-03-13 17:43:16.000000000 -0700 +++ gnome-session-3.9.90/debian/patches/series 2015-03-06 10:47:09.000000000 -0800 @@ -11,3 +11,4 @@ #101_screen_lock_on_suspend.patch 103_kill_the_fail_whale.patch git_fix_wrong_unref_call.patch +add_disable_acceleration_check_option.patch