summaryrefslogtreecommitdiffstats
path: root/liveinit
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-03-03 21:27:28 +0100
committer Eric Hameleers <alien@slackware.com>2016-03-03 21:27:28 +0100
commit5069433b5de5127ba3b0e5c531de95b27537293a (patch)
tree0408129a5190681bb4530ba0430f699c31effe47 /liveinit
parentb1ac7c6f8259f0f0572b645158e8571700eaadc5 (diff)
downloadliveslak-5069433b5de5127ba3b0e5c531de95b27537293a.tar.gz
liveslak-5069433b5de5127ba3b0e5c531de95b27537293a.tar.xz
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.
Diffstat (limited to 'liveinit')
-rwxr-xr-xliveinit15
1 files changed, 15 insertions, 0 deletions
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 <<EOT > /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