guidance-backends overwrites xorg.conf without confirmation or notification, if video card has changed since last boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kde-guidance (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
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 keeps my comments organized was entirely gone.
Here's my xorg.conf file, for reference; it has entries to make it work on multiple hardware configurations:
www.csc.
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/
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.
Additional note: why is this (kde-guidance) installed on Ubuntu (non-KDE) systems? If it's not just for KDE, then "kde-guidance" seems like a misnomer.
The offending section of the python file:
if previous_hardware is not None and previous_
# Run dpkg and configure the new hardware.
cmd = ['dpkg-
environ = os.environ.copy()
result = ExecWithCapture
for line in result.split('\n'):
Displayconfig is unmaintained and nonexistent in Intrepid, so this won't be fixed.
Although in your case it probably is fixed, since displayconfig is no longer around to muck up your xorg.conf. ;-)