From 5069433b5de5127ba3b0e5c531de95b27537293a Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Thu, 3 Mar 2016 21:27:28 +0100 Subject: liveinit: add 'nga' boot parameter to disable glamor 2D acceleration. X.Org in a QEMU VM will refuse to start if glamor is used for 2D acceleration. --- liveinit | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'liveinit') diff --git a/liveinit b/liveinit index 6df6d0d..10b9f4e 100755 --- a/liveinit +++ b/liveinit @@ -59,6 +59,10 @@ LOCALHD=0 # Perhaps we need to blacklist some kernel module(s): BLACKLIST="" +# QEMU X.Org needs glamor acceleration disabled, +# otherwise don't mess with the defaults: +GLAMORACCEL=1 + INITRD=$(cat /initrd-name) WAIT=$(cat /wait-for-root) KEYMAP=$(cat /keymap) @@ -635,6 +639,17 @@ EOPW sed -i -e "s/^\(127.0.0.1\t*\)@DARKSTAR@.*/\1${LIVE_HOSTNAME}.example.net ${LIVE_HOSTNAME}/" /mnt/overlay/etc/hosts fi + # Disable glamor 2D acceleration (QEMU needs this): + if [ $GLAMORACCEL -eq 0 ]; then + cat < /mnt/overlay/etc/X11/xorg.conf.d/20-noglamor.conf +Section "Device" + Identifier "modesetting" + Driver "modesetting" + Option "AccelMethod" "none" +EndSection +EOT + fi + # Blacklist kernel modules if requested: if [ ! -z "$BLACKLIST" ]; then mkdir -p /mnt/overlay/etc/modprobe.d -- cgit v1.2.3