[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] fixed parameter passing via live.vars in 21xdriver



> in the meanwhile it's not a good idea performance wise to get yet
> another penalty in the default use case which is neither using
> live.vars nor xdriver.

The optimization logic in 21xdriver is still flawed. It breaks the
following use case:

You have put Debian Live on a USB flash drive and use persistency.
You boot it on system "1" with GPU "A". Because automatic hardware
detection does not work reliable on this system you have to use the boot
parameter xdriver=A. This adds the following line to
your /etc/X11/xorg.conf in the persistency layer:
	Driver	"A"
You shut down the system, go to system "2" with GPU "B". Here automatic
hardware detection works, you can just boot without fiddling with boot
parameters. Unfortunately, because of the flawed optimization logic in
21xdriver, dexconf is never called, driver "A" is still specified in
your /etc/X11/xorg.conf in the persistency layer and because of the
wrong driver option, X fails to start.

This is not a made-up example, I actually just run into exactly this
issue.

The attached patch fixes the problem.

Regards

Ronny

-- 
Ronny Standtke                 Fachhochschule Nordwestschweiz
Dozent Medienpädagogik / ICT   Pädagogische Hochschule
Telefon: +41 32 627 92 47      Obere Sternengasse 7
Mobil  : +41 79 786 81 82      4502 Solothurn
--- 21xdriver.orig	2009-07-01 19:42:48.000000000 +0200
+++ 21xdriver	2009-07-01 19:45:20.000000000 +0200
@@ -20,7 +20,7 @@
 
 # live-initramfs header
 
-if [ -n "${NOXAUTOCONFIG}" ] || [ ! -x /root/usr/bin/X ] || [ -z "${XDRIVER}" ]
+if [ -n "${NOXAUTOCONFIG}" ] || [ ! -x /root/usr/bin/X ]
 then
 	exit 0
 fi
@@ -37,10 +37,13 @@
 mount -o bind /proc /root/proc
 mount -o bind /dev /root/dev
 
-chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
+if [ -n "${XDRIVER}" ]
+then
+	chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
 set xserver-xorg/autodetect_video_card false
 set xserver-xorg/config/device/driver ${XDRIVER}
 EOF
+fi
 
 chroot /root dexconf
 

Reply to: