API breakage in guidance causes jockey to crash on startup

Bug #214914 reported by legobuff on 2008-04-10
This bug affects 4 people
Affects Status Importance Assigned to Milestone
jockey (Ubuntu)
Critical
Martin Pitt
kde-guidance (Ubuntu)
Critical
Martin Pitt

Bug Description

I go to System -> Admin and click on "Hardware Drivers". The normal screen never appears and i am asked to submit this report.

ProblemType: Crash
Architecture: i386
Date: Wed Apr 9 22:14:10 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/jockey-gtk
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: nvidia
Package: jockey-gtk 0.3.3-0ubuntu7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/jockey-gtk
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
 LANG=en_US.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/jockey-gtk']
SourcePackage: jockey
Title: jockey-gtk crashed with AttributeError in enabled()
Uname: Linux 2.6.24-15-generic i686
UserGroups:

Related branches

legobuff (jamie-wallingford) wrote :
Dustin Kirkland  (kirkland) wrote :

Confirmed. I've got the same thing on multiple systems. All require nvidia proprietary drivers.

Changed in jockey:
importance: Undecided → High
status: New → Confirmed
Dustin Kirkland  (kirkland) wrote :

Changing to critical and milestoning for Hardy, as it currently has 72 duplicates, and it does not appear possible to load restricted drivers into Hardy at the moment.

Changed in jockey:
assignee: nobody → pitti
importance: High → Critical
milestone: none → ubuntu-8.04

I got this on system with ATI prop. driver.

Dustin Kirkland  (kirkland) wrote :

@Martin-

This seems to be a rather critical bug and given your traveling situation, I took the liberty to incorporate the one-line fix suggested by another user. I'm attaching a debdiff that could perhaps be sponsored by someone else this weekend.

In the mean time, I've also published an updated package to my PPA that affect users can use/test:
https://launchpad.net/~kirkland/+archive

And I've also got a bzr branch with the fix committed here:
https://code.launchpad.net/~kirkland/jockey/kirkland.214914

:-Dustin

Dustin Kirkland  (kirkland) wrote :

Don't know if it matters, but I forgot to click the "patch" checkbox. Uploading same debdiff again...

Silvio Sisto (sistoviejo) wrote :

I have the same problem.
I have nvidia video and broadcomm wireless.

i can confirm, i have an nvidia ;)

roots (roots) wrote :

um , dustin, as for your above statement "it does not appear possible to load restricted drivers into Hardy at the moment" i want to note that i was able to activate/load restricted nvidia drivers via enabling the desktop eyecandy under system-->prefs-->appearance, where after choosing the respective option the user is prompted to have ubuntu automatically install the restricted drivers. confirming that, the drivers were loaded fine and are still working. however, as i already posted a dup of this bug, i'm facing the same jockey-gtk problem when trying to play with the drivers via system-->admin-->hardware drivers.

ubuntu hardy testing
jockey-gtk 0.3.3-0ubuntu7
nividia restricted drivers (geforce 8800gtx)
compiz enabled

Hello

For those who haven't made it, the solution has been given by twist2b:

Found fix:
actual fix for almost ALL jockey issues:
" Changing line 60 in /usr/lib/python2.5/site-packages/jockey/xorg_driver.py from
self.xorg_conf = xorgconfig.readConfig(OSLib.inst.xorg_conf_path)
to
self.xorg_conf = xorgconfig.readConfig(OSLib.inst.xorg_conf_path)[0] "

So,
$ sudo gedit /usr/lib/python2.5/site-packages/jockey/xorg_driver.py

find line 60 and add the [0] at the end.

It solves everything. Without a reboot, i could open the hardware
drivers window, but i still had problem with sound. After a reboot
everything is just working well.

roots a écrit :
> um , dustin, as for your above statement "it does not appear possible to
> load restricted drivers into Hardy at the moment" i want to note that i
> was able to activate/load restricted nvidia drivers via enabling the
> desktop eyecandy under system-->prefs-->appearance, where after choosing
> the respective option the user is prompted to have ubuntu automatically
> install the restricted drivers. confirming that, the drivers were loaded
> fine and are still working. however, as i already posted a dup of this
> bug, i'm facing the same jockey-gtk problem when trying to play with the
> drivers via system-->admin-->hardware drivers.
>
> ubuntu hardy testing
> jockey-gtk 0.3.3-0ubuntu7
> nividia restricted drivers (geforce 8800gtx)
> compiz enabled
>
>

yes i know it does fix it - many thanks for that quick hack to twist2b. however i wanted to further contribute to debugging... ;-)

zaghloul (ozaghloul) wrote :

No Nvidia, running at ATI laptop here with the same error.

PY (pyrenaut) wrote :

thanks for the solution and to twist2be !!!
the fix works very well

whitlack (whitlack) wrote :

I have the same problem.

Fixed confirmed as functioning. Nice to see it up and running again ;-)

PY ha scritto:
> thanks for the solution and to twist2be !!!
> the fix works very well
>

Same problem for me, I've an 1280x1024 LCD screen and nVidia drivers doesn't work in 2.6.24-16 kernel, now I'm running 800x600 in VESA mode.

Tom Harris (tom-harris) wrote :

I'm changing this to "In Progress" now we have a working patch

Changed in jockey:
status: Confirmed → In Progress
dino99 (9d9) wrote :

Same that Morgan
Hardy 2.6.24-15 & P5wdh & En8500gt (asus)
I have modified line 60 and i do reboot twice before restricted Nvidia driver can be loaded, then my lcd is not recognised (iisonic im19f) and xorg displayed in 800*600 vesa mode. So , i can say that doesn't really work.

Result of modifying line 60 only stop jockey crash but no more.

Bruce R (bm007a0030) wrote :

My E2160 rig can't load 2.6.24-16 due to not recognising my DVB-T chip (which earlier kernels have no problem with), so my EnvyNG and then Restricted driver failures were with kernel 2.6.24-12
Not being the experts that you guys obviously are, I'll just wait for re-enabling Updates and meanwhile go back to 7.10 and its more versatile kernel etc. So, have fun !

Moritz Reiter (schallstrom) wrote :

I can confirm the fix by twist2b.

bishboria (bishboria) wrote :

I can also confirm twist2b's fix.

ktulu77 (ktulu-highwaytoacdc) wrote :

I add this bug too and the fix works well ^^

jesvem (jesusvm) wrote :

I had the same problem.
The fix is perfect.

crashfourit (crashfourit) wrote :

Fix confirmed. Nice...

phil (beany) wrote :

twist2b fix confirmed. perfect.

keulieminogue (superkeule) wrote :

I hope the errorreport is here ok... i also have problems

Here the code from the terminal

Traceback (most recent call last):
  File "/usr/bin/jockey-gtk", line 300, in <module>
    sys.exit(u.run())
  File "/usr/lib/python2.5/site-packages/jockey/ui.py", line 266, in run
    self.ui_init()
  File "/usr/bin/jockey-gtk", line 93, in ui_init
    self.update_tree_model()
  File "/usr/bin/jockey-gtk", line 240, in update_tree_model
    is_enabled = handler.enabled()
  File "/usr/share/jockey/handlers/nvidia.py", line 50, in enabled
    devices = self.xorg_conf.getSections('device')
AttributeError: 'tuple' object has no attribute 'getSections'

Same bug here with the daily LiveCD of april 12.

Yann SLADEK (yann-sladek) wrote :

Same bug and fix works perfectly

Martin Pitt (pitti) wrote :

This happened due to an uncommunicated and unapproved API change in guidance-backends:

kde-guidance (0.8.0svn20080103-0ubuntu13) hardy; urgency=low

  * Added kubuntu_30_displayconfig_no_xorg_correct_detection.patch
    so we will detect the hardware automatically and write a xorg.conf
    if none is present on startup.

 -- Andreas Wenning <email address hidden> Thu, 10 Apr 2008 00:59:19 +0200

This breaks jockey, displayconfig-gtk, ubiquity-frontend-mythbuntu, and possibly a few other programs. Python APIs should not break, since we do not have something like SONAMEs for them. They should do even less so right before a release.

I'll revert this change now. Andreas, please do not do something like this without coordination again!

Martin Pitt (pitti) wrote :

Uploaded. I'll self-approve this due to the urgency.

Changed in kde-guidance:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kde-guidance - 0.8.0svn20080103-0ubuntu14

---------------
kde-guidance (0.8.0svn20080103-0ubuntu14) hardy; urgency=low

  * Disable kubuntu_30_displayconfig_no_xorg_correct_detection.patch. It
    breaks the API, and the previous change did not even state a bug number.
    This broke jockey, displayconfig-gtk, and other reverse dependencies and
    is absolutely inappropriate right before a release. (LP: #214914 and a
    magnitude of 100 duplicates)

 -- Martin Pitt <email address hidden> Sat, 12 Apr 2008 18:17:24 +0200

Changed in kde-guidance:
status: Fix Committed → Fix Released

This patch did fix a milestoned bug. It'd be good if we can restore it in
a non-api breaking way.

i wonder why this package is fixed in "kde-guidance" since it also occurs under Gnome?!

Adal Alom Rodríguez (arpia49) wrote :

apt-get update
apt-get upgrade

After the update, it works fine.

I think the bug should be marked as solved.

Dustin Kirkland  (kirkland) wrote :

Martin-

I don't have kde-guidance installed, and I'm still seeing this problem. Please see the debdiff/bzr-branch/ppa-package I posted earlier for jockey.

:-Dustin

Changed in jockey:
assignee: nobody → pitti
importance: Undecided → Critical
milestone: none → ubuntu-8.04
status: New → Triaged
whitlack (whitlack) on 2008-04-13
Changed in jockey:
status: Triaged → Fix Released
Changed in jockey:
status: Fix Released → In Progress
Martin Pitt (pitti) wrote :

Dustin, kde-guidance is the source package. It produces guidance-backends, which is needed and used by jockey, mythbuntu, displayconfig-gtk, etc.

Scott: I don't doubt that it was important to fix. But it did not have any bug # in the changelog, so I could not even (quickly) find where to look. Passing an additional flag to the caller can happen without breaking the API, e. g. as a new attribute of the result object, or a new function, etc.

Changed in jockey:
milestone: ubuntu-8.04 → none
status: In Progress → Invalid

On Sun, 13 Apr 2008 10:47:09 -0000 Martin Pitt <email address hidden>
wrote:
...
>Scott: I don't doubt that it was important to fix. But it did not have
>any bug # in the changelog, so I could not even (quickly) find where to
>look. Passing an additional flag to the caller can happen without
>breaking the API, e. g. as a new attribute of the result object, or a
>new function, etc.

Agreed and I wasn't being critical of you reverting the patch. That was
obviously the right thing to do given the magnitude of the problem.

If the new argument were given a correct default so the function would work
with one or two arguments then the api problem could be avoided. This
change was the last step to getting displayconfig working on no xorg.con
systems. It would be of significant benifit to Kubuntu is we could get a
corrected version uploaded. Unfortunately, I offline until Wednesday and
can't tend to it personally.

Scott Kitterman [2008-04-13 12:48 -0000]:
> If the new argument were given a correct default so the function would work
> with one or two arguments then the api problem could be avoided.

Right, it could get another argument "check_exists = False" or so.

> This change was the last step to getting displayconfig working on
> no xorg.con systems.

If everything it does is to check whether the file exists, wouldn't a
mere os.path.exists() be much less hassle and more obvious/explicit?

It's a bit more complex as displayconfig was not designed to work without a
xorg.conf. If, on the first pass one is created it will exist, but be
correct. One the second go 'round it will dtrt and get the correct
configs. It's a hack, but a working one (modulo the api breakage). There
are also cases where xorg.conf can exist, but be empty, so a mere existence
test is not sufficient.

Hm, sounds like the returned readConfig() object could have an .is_empty() method which checks for that perhaps?

Last night I uploaded a revised version of the original patch that goes to
great care to support the current api. Hopefully it's taken care of.

Mark (markus-markpeterson) wrote :

Did an update today and it has fixed the problem.

  • unnamed Edit (189 bytes, application/pgp-signature; name=signature.asc)

vradovic-

Are you totally apt-get updated/upgraded? This bug should have been
fixed a couple of days ago.

:-Dustin

I have downloaded the latest of everything and the bug is no longer an issue.

> From: <email address hidden>> To: <email address hidden>> Date: Fri, 18 Apr 2008 00:06:26 +0000> Subject: Re: [Bug 214914] Re: jockey-gtk crashed with AttributeError in enabled()> > vradovic-> > Are you totally apt-get updated/upgraded? This bug should have been> fixed a couple of days ago.> > :-Dustin> > > > ** Attachment added: "unnamed"> http://launchpadlibrarian.net/13544859/unnamed> > -- > jockey-gtk crashed with AttributeError in enabled()> https://bugs.launchpad.net/bugs/214914> You received this bug notification because you are a direct subscriber> of a duplicate bug.> > Status in Source Package "jockey" in Ubuntu: Invalid> Status in Source Package "kde-guidance" in Ubuntu: Fix Released> > Bug description:> I go to System -> Admin and click on "Hardware Drivers". The normal screen never appears and i am asked to submit this report.> > ProblemType: Crash> Architecture: i386> Date: Wed Apr 9 22:14:10 2008> DistroRelease: Ubuntu 8.04> ExecutablePath: /usr/bin/jockey-gtk> InterpreterPath: /usr/bin/python2.5> NonfreeKernelModules: nvidia> Package: jockey-gtk 0.3.3-0ubuntu7> PackageArchitecture: all> ProcCmdline: /usr/bin/python /usr/bin/jockey-gtk> ProcEnviron:> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin> LANG=en_US.UTF-8> SHELL=/bin/bash> PythonArgs: ['/usr/bin/jockey-gtk']> SourcePackage: jockey> Title: jockey-gtk crashed with AttributeError in enabled()> Uname: Linux 2.6.24-15-generic i686> UserGroups:

Hello Dustin,
This is Craig,
And I am current as of yesterday afternoon. I don't know if it is still a problem, but will let you know.

Craig

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Dustin Kirkland
Sent: Thursday, April 17, 2008 9:06 PM
To: <email address hidden>
Subject: Re: [Bug 214914] Re: jockey-gtk crashed with AttributeError in enabled()

vradovic-

Are you totally apt-get updated/upgraded? This bug should have been
fixed a couple of days ago.

:-Dustin

** Attachment added: "unnamed"
   http://launchpadlibrarian.net/13544859/unnamed

--
jockey-gtk crashed with AttributeError in enabled()
https://bugs.launchpad.net/bugs/214914
You received this bug notification because you are a direct subscriber
of the bug.

The original behavior of this Bug has been fixed but I cannot start Extra Visual Effects ,i.e. compiz. Nothing happens when I select this option.

Scott Kitterman (kitterman) wrote :

So that would be a different bug. I'd suggest filing that one as a new bug.

twist2b (takuachronicler) wrote :

Glad to see people noticed my fix. Good news is ubuntu administration saw the error... so its fixed..... other errors have nothing to do with this one.....

twist2b (takuachronicler) wrote :

Now that I'm home, I can explain the "other" errors in more detail

If you need help PM me at "<email address hidden>"

Now, if your xorg is crashing, it is because the graphics card and drivers are communicating incorrectly. Hardy has a nice feature were you can reset your xorg in recovery mode. Resets to AVI drivers... you cant go wrong there. You can again try installing your drivers and see if it communicates correctly.

remember jockey is NOT xorg, they are just related. :)

again. I only came here to discuss my own issues. If you have a known issue elsewhere and think I can help. PM me.

g.bruno (g-bruno) wrote :

Got the same problem with my GeForce4 MX440 which worked well under Ubuntu 7.10. I attach the xorg.conf form Ubuntu 7.10.

I applied the bug fix mentioned above by Briceparent - without a reboot I find no changes.

Greetings

G. Bruno (Germany)

g.bruno (g-bruno) wrote :

After rebooting twice (!), the "hardware driver" window opened correctly with the mentioned bug fix. But I wonder why it shows only one driver (nvidia), while in the corresponding package many drivers are listed. Perhaps because the other hardware is missing?

Furthermore, although enabled, the nvidia driver does not work: I get only a low resolution (800x600) and can change it by "System-Einstellungen-Bildschirmauflösung" (Settings - screen resolution). And the x-nvidia-config- tool does not work either: drver not active or so.

Is this a problem of jockey-gtk or of the nvidia-driver?

Thanks for helping me.

G.Bruno (Germany)

Update from Ubuntu 7.10 to 8.04 (32 Bit)

DavidGN (davidgn) wrote :

I'm seeing this bug in 8.10.

Eduardo (eduardoperezval) wrote :

I have this bug in Ubuntu 8.10 Alpha6. After the installation, the tab shows "Restricted Drivers Available", and, when you click, this error.

Martin Pitt (pitti) wrote :

Guys, pretty please stop using this bug report for any further discussion. This one had a very particular and well understood reason, and it *is* fixed. Please file new crash/bug reports for problems in current hardy (8.04.1) and intrepid.

There are > 100 subscribers to this bug, no reason to spam them all with unrelated reports.

Thank you!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers