From 031ef0a5310bedd260aeb1a92c5b74ff7417a0d7 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 14 Jan 2017 20:47:39 +0000 Subject: Disable Wayland in GDM when nowayland option is detected on boot cmdline. Unless Wayland fails catastrophically, GDM doesn't fall back to Xorg automatically. This provides a way to force the use of Xorg. --- files/50gdm-disable-wayland.xsetup | 20 ++++++++++++++++++++ files/50gdm-nokms-disable-wayland.xsetup | 6 ------ 2 files changed, 20 insertions(+), 6 deletions(-) create mode 100755 files/50gdm-disable-wayland.xsetup delete mode 100755 files/50gdm-nokms-disable-wayland.xsetup (limited to 'files') diff --git a/files/50gdm-disable-wayland.xsetup b/files/50gdm-disable-wayland.xsetup new file mode 100755 index 0000000..dbfa33e --- /dev/null +++ b/files/50gdm-disable-wayland.xsetup @@ -0,0 +1,20 @@ +#!/bin/sh + +disable=0 + +# disable Wayland if the user asks us to. +if /bin/grep -q nowayland /proc/cmdline; then + disable=1 +fi + +# nokmsboot implies we are using a driver that won't work with Wayland, +# which prevents autologin working (mga#20079). +if [ -e /run/mgalive ]; then + if /bin/grep -q nokmsboot /proc/cmdline; then + disable=1 + fi +fi + +if [ $disable -eq 1 -a -f /etc/X11/gdm/custom.conf ]; then + sed -i 's/#WaylandEnable=false/WaylandEnable=false/' /etc/X11/gdm/custom.conf +fi diff --git a/files/50gdm-nokms-disable-wayland.xsetup b/files/50gdm-nokms-disable-wayland.xsetup deleted file mode 100755 index 6232353..0000000 --- a/files/50gdm-nokms-disable-wayland.xsetup +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -if [ -e /run/mgalive -a -f /etc/X11/gdm/custom.conf ]; then - if /bin/grep -q nokmsboot /proc/cmdline; then - sed -i 's/#WaylandEnable=false/WaylandEnable=false/' /etc/X11/gdm/custom.conf - fi -fi -- cgit v1.2.1