Bug 19520 - Wrong display driver is loaded on Live system after dkms build/install
Summary: Wrong display driver is loaded on Live system after dkms build/install
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-10-04 00:29 CEST by Martin Whitaker
Modified: 2016-12-02 22:35 CET (History)
2 users (show)

See Also:
Source RPM: drakx-kbd-mouse-x11
CVE:
Status comment:


Attachments
Proposed fix. (672 bytes, text/plain)
2016-10-04 00:29 CEST, Martin Whitaker
Details
Proposed fix (with added comment) (828 bytes, text/plain)
2016-10-04 09:51 CEST, Martin Whitaker
Details

Description Martin Whitaker 2016-10-04 00:29:10 CEST
Created attachment 8488 [details]
Proposed fix.

When booting a Live system, service_harddrake detects what graphics hardware is present, and determines which display driver to use. It may optionally select a proprietary driver, in which case it will call dkms to build and install the driver. At the end of this process, /usr/sbin/dkms_autoload will be called, which in turns calls /usr/sbin/display_driver_helper to load the newly built driver. 

However, display_driver_helper reads /etc/X11/xorg.conf to determine what driver to load, and at that point xorg.conf hasn't been created by service_harddrake. display_driver_helper defaults to loading the non-proprietary driver in this case. This then causes service_harddrake to detect a driver change and request a reboot. On a Live system, this of course just starts the whole process again.

I think the easiest solution to this is to prevent display_driver_helper from auto-loading the driver after a dkms build/install if xorg.conf does not exist, and that is what the attached patch does. I've limited it to only apply to a Live system, as on an installed system the user may have chosen to operate without an xorg.conf file.
Comment 1 Martin Whitaker 2016-10-04 09:51:46 CEST
Created attachment 8490 [details]
Proposed fix (with added comment)

Attachment 8488 is obsolete: 0 => 1

Comment 2 Mageia Robot 2016-11-06 13:02:06 CET
commit e61963d811173bb572bb1ffe0d3ad1a8c265801d
Author: Martin Whitaker <mageia@...>
Date:   Tue Nov 1 08:52:57 2016 +0000

    Added patches to fix mga#19517 and mga#19520.
---
 Commit Link:
   http://gitweb.mageia.org/software/build-system/draklive-config/commit/?id=e61963d811173bb572bb1ffe0d3ad1a8c265801d

 Bug links:
   Mageia
      https://bugs.mageia.org/19517
      https://bugs.mageia.org/19520
Comment 3 Mageia Robot 2016-11-20 21:06:45 CET
commit b6a40abe0a9f4127a1def0ac5b5667e963eebd80
Author: Martin Whitaker <mageia@...>
Date:   Sat Nov 12 19:06:31 2016 +0000

    Temporarily add patches for mga#17223, mga#19517, mga#19520.
---
 Commit Link:
   http://gitweb.mageia.org/software/build-system/draklive-config/commit/?id=b6a40abe0a9f4127a1def0ac5b5667e963eebd80

 Bug links:
   Mageia
      https://bugs.mageia.org/17223
      https://bugs.mageia.org/19517
      https://bugs.mageia.org/19520
Comment 4 Thierry Vignaud 2016-12-01 17:26:45 CET
I've no strong opinion on that so if it fixes a real issue for you, go on

CC: (none) => thierry.vignaud

Comment 5 Mageia Robot 2016-12-02 22:34:10 CET
commit 4cf825b5fe01beaa41e9acbd1af53af52d94067b
Author: Martin Whitaker <mageia@...>
Date:   Fri Dec 2 21:31:48 2016 +0000

    Prevent dkms autoload of display driver on Live system before xorg.conf exists (mga#19520).
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx-kbd-mouse-x11/commit/?id=4cf825b5fe01beaa41e9acbd1af53af52d94067b
Comment 6 Martin Whitaker 2016-12-02 22:35:35 CET
Patch pushed.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.