r-d-m fails if modules have been manually disabled

Bug #116981 reported by Matteo Z
2
Affects Status Importance Assigned to Milestone
Restricted Manager
Invalid
Undecided
Unassigned
restricted-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

r-d-m fails to determinate if current machine needs any restricted drivers if one has manually disabled restricted drivers by editing "/etc/default/linux-restricted-drivers-common".

I own a ATI card and usually build fglrx by my own, since I like having latest version. When I upgraded to feisty I had a look at the restricted driver manager wich didn't load the gui by saying "your hardware don't need any restricted drivers". Later on, I found that this was due to the fact that I manually disabled fglrx by editing "/etc/default/linux-restricted-drivers-common", this prevents fglrx.ko for being found in "ls /lib/modules/2.6.20-15-generic/volatile/".

With such setup, I get:
$ sudo restricted-manager --list
modinfo: could not open /lib/modules/2.6.20-15-generic/volatile/fglrx.ko: No such file or directory
modinfo: could not open /lib/modules/2.6.20-15-generic/volatile/fglrx.ko: No such file or directory

Related branches

Revision history for this message
Matteo Z (matteozandi) wrote :

Patch attached, diffed to version 0.20

After applying the patch, I get:
$ sudo ./restricted-manager --list
warning: not considering manually disabled modules: fglrx
modinfo: could not open /lib/modules/2.6.20-15-generic/volatile/fglrx.ko: No such file or directory

This is actually not a fix, but at least the user is warned.

The best fix, in my opinion, would be to create in DefaultHandler class a new method for enabling modules in case user requests it. Current approach (0.20) fails because if the module is disabled it is not considered at all and the program quits without informing the user in a proper way. This would require some more work, that I'm willing to take, if you guys thinks it is correct to do so.

Revision history for this message
Matteo Z (matteozandi) wrote :

see linked branch for a temporary fix

Revision history for this message
Matteo Z (matteozandi) wrote :

for testing purposes, I edited my /etc/default/linux-restricted-modules-common like so:

DISABLED_MODULES="fglrx nv"

now r-d-m answers

$ sudo ./restricted-manager --list
warning: not considering manually disabled modules: fglrx nvidia nvidia_new nvidia_legacy

Note that before, it would just say "your hardware doesn't need any restricted drivers", wich is obviously wrong.

I read posts on the forums of people who are having a really bad time trying to activate restricted modules, r-d-m can be very useful, but if a user has previously edited /etc/default/linux-restricted-modules-common (maybe he followed some dirty howto somewhere :) we should warn him that some modules are manually disabled.

A best fix would be: let r-d-m edit /etc/default/linux-restricted-modules-common if the user wants to activate a restricted module via r-d-m.

Please test it and let me know what you think

Revision history for this message
Matteo Z (matteozandi) wrote :

Warnings removed, now manually disabled modules are shown in the gui, check my branch

Screenshot attached

Let me know what you think

Matteo Z (matteozandi)
Changed in restricted-manager:
status: Unconfirmed → Rejected
Revision history for this message
Martin Pitt (pitti) wrote :

This was uploaded to Gutsy yesterday, thanks Matteo!

Changed in restricted-manager:
status: Unconfirmed → 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.