Warn and ask before clobbering manually edited xorg.conf

Bug #92690 reported by Matt Zimmerman
2
Affects Status Importance Assigned to Milestone
restricted-manager (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: restricted-manager

On my system, disabling the nvidia driver reverted to the ati driver(!) rather than nv. It seemed to dump a new configuration based on debconf values, which in my case were out of date because I had hand-edited my configuration file. I had switched from an ATI card to an NVIDIA card, and updated my configuration file by hand rather than using dpkg-reconfigure. This means that the debconf values were for ATI, and I assume restricted-manager just generated a configuration based on those.

I expect this would probably affect other users with hand-edited configuration files. restricted-manager must either preserve those changes (preferred), or refuse to change the config file if it has been hand-edited (minimally).

Revision history for this message
Martin Pitt (pitti) wrote :

I'll go with refusing to edit manually changed configurations for beta. dexconf and dpkg-reconfigure xserver-xorg clobber xorg.conf and only rely on debconf data, so fixing this to parse and modify xorg.conf is indeed a lot of work.

Changed in restricted-manager:
assignee: nobody → pitti
importance: Undecided → High
status: Unconfirmed → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :

We could consider using the dislayconfig module from guidance for the editing of the xorg.conf file. It seems to do a reasonable job to edit a xorg.conf file without overwriting users customizations. Its python and used in kde-guidance as their default xorg configuration tools since dapper (maybe even before).

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Michael, I filed this as bug 92836.

Revision history for this message
Martin Pitt (pitti) wrote :

 restricted-manager (0.10) feisty; urgency=low
 .
   * RestrictedManager/{fglrx,nvidia}.py: Call dpkg-reconfigure xserver-xorg
     instead of dexconf directly, to take advantage of its special magic. This
     also takes care of writing backup files, so disable our own backup file
     writing. (LP: #91036)
   * RestrictedManager/{fglrx,nvidia}.py: Set the 'seen' flags of the modified
     debconf questions, to reduce the chance of dpkg-reconfigure clobbering
     them.
   * RestrictedManager/{fglrx,nvidia}.py: Add some logging to
     /var/log/restricted-manager.log to debug currently open bugs. This will be
     removed again later.
   * restricted-manager: If there are no applicable handlers at all, display an
     info message box that the hardware does not need any restricted drivers
     and exit. (LP: #92485)
   * restricted-manager, RestrictedManager/core.py: Move reboot notification
     function into core.notify_reboot_required(), so that we can use in the
     handlers, too.
   * RestrictedManager/{fglrx,nvidia}.py: Trigger reboot notification on
     enabling, too. (LP: #92684)
   * Add modalias_override/fglrx_supported: Script to parse supported product
     IDs out of /usr/lib/xorg/modules/drivers/fglrx_drv.so. Thanks to Johan
     Kiviniemi!
   * RestrictedManager/modalias.append: Replace the 'catch all ATI graphics
     cards' line with the product ID list generated by fglrx_supported, so that
     the fglrx driver is not offered any more on models it doesn't support.
     (LP: #92498)
   * Renamed RestrictedManager/nvidia.py to RestrictedManager/xorg_driver.py
     and replaced the few nvidia-specific bits with ctor argument variables.
   * Reimplement nvidia.py and fglrx.py as XorgDriver subclasses, since they
     shared 95% of code.
   * RestrictedManager/xorg_driver.py: Set xserver-xorg/autodetect_video_card
     to false when enabling a driver, so that xserver-xorg's postinst does not
     clobber our freshly selected restricted driver. Enable it again when
     disabling the restricted driver.
   * po/POTFILES.in: Add missing fglrx.py and xorg_driver.py.
   * restricted-manager, RestrictedManager/core.py: Add new DefaultHandler
     method can_change() which checks if r-m can change this driver at all. If
     not, show an error message with an explanation.
   * RestrictedManager/xorg_driver.py: Add can_change() which checks for a
     modified xorg.conf. (LP: #92690)

Changed in restricted-manager:
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.