[Bug 257809] [NEW] guidance-backends overwrites xorg.conf without confirmation or notification, if video card has changed since last boot

Dana Goyette DanaGoyette at gmail.com
Thu Aug 14 04:26:39 UTC 2008


Public bug reported:

Binary package hint: kde-guidance

Some laptops allow the user to choose between an integrated GPU (for
power savings) and a discrete GPU (for performance).  One of my friends
has such a laptop; I've set it up with a customized xorg.conf file,
tweaked with Device entries for both Intel and NVIDIA drivers, to make
the GPU switch as "transparent" as possible. On several occasions, I've
also booted my own system (with video and touchpad tweaks) in a USB
enclosure, connected to other computers.  Under both situations, I've
noticed the following behavior:

Upon booting with a different GPUs or computers, I was unpleasantly
surprised when I Xorg started without any of my settings... and
sometimes dropped back to failsafe mode.  I noticed the losing settings
when I ended up randomly, unexpectedly clicking things, due to Xorg
having lost my "disable tapping" setting.

I took a look in xorg.conf, and noted that something had trampled upon it, without confirmation, and without notification.  Most of my custom settings were gone, and all of the whitespace that makes my comments organized were entirely gone.
Here's my xorg.conf file, for reference; it has entries to make it work on multiple hardware configurations:
www.csc.calpoly.edu/~dgoyette/xorg.conf

I grepped around in various places to figure out what was overwriting xorg.conf, and identified the following script as the offender:
guidance-backends: /usr/share/python-support/guidance-backends/displayconfig-hwprobe.py
When I dpkg-divert i... so I dpkg-diverted it out of place, and have hence had no issues.

I understand the need for things to "just work" upon video card swap,
but this script seems 'evil' for not respecting any of my
settings....... and it didn't even make a working xorg.conf file!  I
booted with the Intel GPU, and the file it generated had only my
NVIDIA(!) section, with all whitespace removed, and with the Synaptics
section gone.  If it helps, I can let the script run again, and add the
created xorg.conf file to this bug report.

I believe this script should either be entirely removed, or should either leave the file alone, or prompt before overwriting it, if any of the following conditions are true:
1.  If the xorg.conf file already has a defined section for the current device (as it should ideally work without changing).
2.  If the xorg.conf file is heavily customized ("heavily" will need some definition), as advanced tweaks are there for a reason!

The mechanics of this prompting would need some work, though... perhaps
use the new usplash prompting interface?  If that's not feasible, please
make it leave xorg.conf alone  ... or at the very least, generate a
working configuration, and then TELL the user that the xorg
configuration file has been automatically regenerated.

The offending section of the python file:

    if previous_hardware is not None and previous_hardware!=hardware_config:
        # Run dpkg and configure the new hardware.
        syslog.syslog(syslog.LOG_INFO, "Graphics card hardware has changed. Reconfiguring xorg.conf using 'dpkg-reconfigure xserver-xorg'.")
        cmd = ['dpkg-reconfigure','xserver-xorg']
        environ = os.environ.copy()
        environ['DEBIAN_FRONTEND'] = 'noninteractive'
        #os.spawnvpe(os.P_WAIT, 'dpkg-reconfigure', cmd, environ)
        result = ExecWithCapture('/usr/sbin/dpkg-reconfigure', cmd, 0, '/', 0,1, -1, environ)
        for line in result.split('\n'):
            syslog.syslog(syslog.LOG_INFO,"dpkg-reconfigure:"+line)

** Affects: kde-guidance (Ubuntu)
     Importance: Undecided
         Status: New

-- 
guidance-backends overwrites xorg.conf without confirmation or notification, if video card has changed since last boot
https://bugs.launchpad.net/bugs/257809
You received this bug notification because you are a member of Kubuntu
Team, which is subscribed to kde-guidance in ubuntu.




More information about the kubuntu-bugs mailing list