summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-01-14 20:47:39 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-01-14 20:47:39 +0000
commit031ef0a5310bedd260aeb1a92c5b74ff7417a0d7 (patch)
tree2fd39403eb8a3e71191a372047b281e8b054a86d
parent1374edd7aa42f7e4abd38c01abac15e10915d17f (diff)
downloaddraklive-config-031ef0a5310bedd260aeb1a92c5b74ff7417a0d7.tar
draklive-config-031ef0a5310bedd260aeb1a92c5b74ff7417a0d7.tar.gz
draklive-config-031ef0a5310bedd260aeb1a92c5b74ff7417a0d7.tar.bz2
draklive-config-031ef0a5310bedd260aeb1a92c5b74ff7417a0d7.tar.xz
draklive-config-031ef0a5310bedd260aeb1a92c5b74ff7417a0d7.zip
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.
-rw-r--r--config/live.cfg2
-rwxr-xr-xfiles/50gdm-disable-wayland.xsetup20
-rwxr-xr-xfiles/50gdm-nokms-disable-wayland.xsetup6
3 files changed, 21 insertions, 7 deletions
diff --git a/config/live.cfg b/config/live.cfg
index 1509992..e836a0d 100644
--- a/config/live.cfg
+++ b/config/live.cfg
@@ -40,7 +40,7 @@ my $_l = {
# enable root access to display to allow MCC and draklive-install to be run from the desktop
[ 'files/gnome-enable-root-gui.desktop', '/etc/xdg/autostart/gnome-enable-root-gui.desktop', { mode => 0644 } ],
# disable Wayland when we know it won't work (workaround for mga#20079)
- [ 'files/50gdm-nokms-disable-wayland.xsetup', '/etc/X11/xsetup.d/50gdm-nokms-disable-wayland.xsetup', { mode => 0755 } ],
+ [ 'files/50gdm-disable-wayland.xsetup', '/etc/X11/xsetup.d/50gdm-disable-wayland.xsetup', { mode => 0755 } ],
),
# blacklist pata_acpi
[ 'files/blacklist_ide.conf', '/etc/modprobe.d/blacklist_ide.conf', { mode => 0644 } ],
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