PDA

View Full Version : [ubuntu] 302.17 nvidia-current package failure



VinDSL
June 17th, 2012, 09:08 AM
Tried to install 302.17 nvidia-current from the Edgers PPA, but it's returning with a package failure dialog.

Has to do with a python quirk error -- no 'writeFile' function in the parser, blah, blah, blah.

Anybody else having this problem?

Guess I'll downgrade to 302.11, if I can't figure out a workaround...

dino99
June 17th, 2012, 09:18 AM
Hello Vin,

i have installed it without issue here on 8500gt & i386 system, but with xorg 1.12 from edgers too.

so maybe purge these packages then reinstall them.

note: always had trouble using cairo from edgers, so i use the stock one.

VinDSL
June 17th, 2012, 09:29 AM
Interesting!

Here's the dialog I'm seeing:


Selecting previously unselected package nvidia-current.
(Reading database ... 444875 files and directories currently installed.)
Unpacking nvidia-current (from .../nvidia-current_302.17-0ubuntu1~xedgers~quantal1_i386.deb) ...
Processing triggers for man-db ...
Setting up nvidia-current (302.17-0ubuntu1~xedgers~quantal1) ...
update-alternatives: using /usr/lib/nvidia-current/ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in auto mode.
update-alternatives: warning: skip creation of /usr/lib32/libOpenCL.so because associated file /usr/lib32/nvidia-current/libOpenCL.so (of link group i386-linux-gnu_gl_conf) doesn't exist.
update-alternatives: warning: skip creation of /usr/lib32/vdpau/libvdpau_nvidia.so.1 because associated file /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.1 (of link group i386-linux-gnu_gl_conf) doesn't exist.
update-alternatives: warning: skip creation of /usr/lib32/libvdpau_nvidia.so because associated file /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so (of link group i386-linux-gnu_gl_conf) doesn't exist.
update-alternatives: using /usr/lib/nvidia-current/alt_ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in auto mode.
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-current
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Processing quirk Latitude E6530
DEBUG:Success
INFO:Applying quirk Latitude E6530
DEBUG:{'Files': {}, 'Vendor': {}, 'Monitor': {}, 'Screen': {0: ['\tIdentifier "My Screen"\n', '\tOption "RegistryDwords" "EnableBrightnessControl=1"\n']}, 'Module': {}, 'SubSection': {}, 'DRI': {}, 'InputDevice': {}, 'Extensions': {}, 'InputClass': {}, 'ServerLayout': {}, 'Device': {0: ['\tIdentifier "My Card"\n', '\tDriver "nvidia"\n', '\tOption "NoLogo" "True"\n']}, 'VideoAdaptor': {}, 'Comments': {}, 'ServerFlags': {}, 'Modes': {}}
DEBUG:Creating /usr/share/X11/xorg.conf.d/10-nvidia-current-latitude-e6530.conf
Traceback (most recent call last):
File "/usr/bin/quirks-handler", line 65, in <module>
operation_status = main(options)
File "/usr/bin/quirks-handler", line 45, in main
quirks.enable_quirks()
File "/usr/lib/python3/dist-packages/Quirks/quirkapplier.py", line 97, in enable_quirks
self._check_quirks(True)
File "/usr/lib/python3/dist-packages/Quirks/quirkapplier.py", line 88, in _check_quirks
self._apply_quirk(quirk)
File "/usr/lib/python3/dist-packages/Quirks/quirkapplier.py", line 122, in _apply_quirk
tmp_xkit.writeFile(destination)
AttributeError: 'Parser' object has no attribute 'writeFile'
dpkg: error processing nvidia-current (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.5.0-030500rc3-generic
Errors were encountered while processing:
nvidia-current
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up nvidia-current (302.17-0ubuntu1~xedgers~quantal1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-current
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Processing quirk Latitude E6530
DEBUG:Success
INFO:Applying quirk Latitude E6530
DEBUG:{'Files': {}, 'Vendor': {}, 'Monitor': {}, 'Screen': {0: ['\tIdentifier "My Screen"\n', '\tOption "RegistryDwords" "EnableBrightnessControl=1"\n']}, 'Module': {}, 'SubSection': {}, 'DRI': {}, 'InputDevice': {}, 'Extensions': {}, 'InputClass': {}, 'ServerLayout': {}, 'Device': {0: ['\tIdentifier "My Card"\n', '\tDriver "nvidia"\n', '\tOption "NoLogo" "True"\n']}, 'VideoAdaptor': {}, 'Comments': {}, 'ServerFlags': {}, 'Modes': {}}
DEBUG:Creating /usr/share/X11/xorg.conf.d/10-nvidia-current-latitude-e6530.conf
Traceback (most recent call last):
File "/usr/bin/quirks-handler", line 65, in <module>
operation_status = main(options)
File "/usr/bin/quirks-handler", line 45, in main
quirks.enable_quirks()
File "/usr/lib/python3/dist-packages/Quirks/quirkapplier.py", line 97, in enable_quirks
self._check_quirks(True)
File "/usr/lib/python3/dist-packages/Quirks/quirkapplier.py", line 88, in _check_quirks
self._apply_quirk(quirk)
File "/usr/lib/python3/dist-packages/Quirks/quirkapplier.py", line 122, in _apply_quirk
tmp_xkit.writeFile(destination)
AttributeError: 'Parser' object has no attribute 'writeFile'
dpkg: error processing nvidia-current (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.5.0-030500rc3-generic
Errors were encountered while processing:
nvidia-current




Guess I'll have to do a wash, rinse, and restyle...

dino99
June 17th, 2012, 10:17 AM
what i get is only:

update-alternatives: warning: skip creation of /usr/lib32/libOpenCL.so because associated file /usr/lib32/nvidia-current/libOpenCL.so (of link group i386-linux-gnu_gl_conf) doesn't exist.

Looked about libopencl into synaptic, but it seems we does not have the required files yet.
Anyway, on this 8500gt its not a real trouble ;)

It seems to me you get these warnings/errors because of some ppas around.

ronacc
June 17th, 2012, 11:52 AM
I'm getting the same no "writefile" error with 295.53 on a pristine daily with no ppa's .

VinDSL
June 17th, 2012, 11:54 AM
Checking out the dialog...

It looks like dpkg thinks my machine is a DELL Latitude E6530 laptop.

Otherwise, why would it be trying a apply the latitude E6530 quirk?!?!?!?

LoL! This is a good joke, maybe. :D

VinDSL
June 17th, 2012, 11:57 AM
I'm getting the same no "writefile" error with 295.53 on a pristine daily with no ppa's .
Thanks for confirming.

There is a possibility that we have a Python 3 bug at play here.

Heh! This is a real corker!

ronacc
June 17th, 2012, 12:01 PM
I wonder if those "quirks" apply to anything other than video cards ? that might explain some of my problems since I haven't owned a "store bought" desktop in over 20 years .

VinDSL
June 17th, 2012, 12:03 PM
For giggles, I tried installing nvidia-current from bash, running the Linux 3.4 kernel. Same result(s).

So, I don't think it's caused by the 3.5-rc3 kernel I'm running.

ronacc
June 17th, 2012, 12:04 PM
yes I'd lean a lot more tword a python than an xorg or nvidia one .

VinDSL
June 17th, 2012, 12:12 PM
I haven't owned a "store bought" desktop in over 20 years .
Me too. I've been rolling my own, since the mid-80's.

Only "store bought" I get is portables, and I've been thinking about building those too, from barebone.

EXAMPLE (picked at random): http://www.outletpc.com/ws8169.html

mc4man
June 17th, 2012, 04:33 PM
for the moment you could try moving /usr/share/ubuntu-drivers-common/quirks/dell_latitude to a .bak & see.

VinDSL
June 17th, 2012, 05:57 PM
for the moment you could try moving /usr/share/ubuntu-drivers-common/quirks/dell_latitude to a .bak & see.
Woah! Brilliant! Thanks!!!

I've been putzing around for hours (falling asleep in my chair, out of boredom) and couldn't figure out the last piece to the puzzle. LoL! :D

Tried renaming the quirk file (as you suggested) but it didn't matter. Evidently, you can name those files anything you want, and they will be run during the install. And, when they run, you get the Python error.

Then, I renamed the folder. Bingo! w00t! w00t!

I force-installed nVidia 302.11 and it built just fine. It was getting the same error(s) as 302.17, before I renamed the folder.

Next, I'll try 302.17 and see how that goes...

BRB

ronacc
June 17th, 2012, 06:00 PM
for the moment you could try moving /usr/share/ubuntu-drivers-common/quirks/dell_latitude to a .bak & see.

tried that no help , also tried disabling quirks altogether by hacking /usr/lib/python3/dist-packages/Quirks/quirkapplier.py to render the quirk checks false , no help there either .

just saw vindsl's post guess my problem is different but with the same error .

mc4man
June 17th, 2012, 06:31 PM
Maybe this is a 'bug' with the ubuntu-drivers-common package though the 302.XX isn't in ubuntu

You could try removing that package altogether, try the install & then put back

VinDSL
June 17th, 2012, 06:33 PM
just saw vindsl's post guess my problem is different but with the same error .
I did a twist on mc4man's original idea.

Instead of renaming the Dell Latitude file, I renamed the quirks folder, thus made all the quirks files go away. If you don't do that (or some such thing) the Python script runs and borks the install.

Doing this generates a warning (cannot locate the quirks directory or whatever) but it doesn't puke the install. :)

Anyway, it worked a treat!



http://vindsl.com/images/vindsl-desktop-17-jun-2012-1(650x520).png (http://vindsl.com/images/vindsl-desktop-17-jun-2012-1.png)


@ mc4man: Thanks, man! You saved the day... ;)

ronacc
June 17th, 2012, 07:48 PM
I unhacked quirkapplier.py and renamed quirks as per vindsl , that got my nvidia driver back thanks guys .

markbl
June 18th, 2012, 12:29 AM
I have a fairly stock install of 12.04 with xorg-edgers ppa enabled and mine updated to the nvidia-current 302.17 without any issues so I don't know why some of you are seeing this python issue?

That segmentation fault many of us have been seeing in 295.* and 302.* nvidia versions since ubuntu 12.04 still occurs in 302.17 though :(

VinDSL
June 18th, 2012, 01:06 AM
I don't know why some of you are seeing this python issue?
I don't know either, but, as an aside...

For several days, ffmpeg and 8 associated libraries, codecs, tools, et cetera, were being held back.

Might be a coincidence, but I was just able to upgrade all of them.

My gut *feeling* tells me, this is a Python 3 problem. Only time will tell.

Actually, I don't know why more ppl are NOT being affected by this...

ronacc
June 18th, 2012, 02:00 AM
I notice he says he is running precise not quantal . That may be why we aren't seeing too may posts in general . There don't seem to be the usual number of testers this time around .

VinDSL
June 18th, 2012, 02:07 AM
I notice he says he is running precise not quantal . That may be why we aren't seeing too may posts in general . There don't seem to be the usual number of testers this time around .
Heh!

Yeah, it's kinda lonely out here, on the fringe edge of computing. :D

caryb
June 18th, 2012, 03:56 AM
For what it's worth, I've just performed a fresh install (need to do it every couple of years) & I get the same result with Kubuntu.


Cary

markbl
June 18th, 2012, 04:51 AM
I notice he says he is running precise not quantal.
Oops, yes sorry I am running 12.04 so "it works for me" is not relevant here. Didn't realise this thread was in a Quantal sub-forum - that's the danger of replying to random "new posts" I guess?

Quantal is changing the default to python3 is it? So I would think that nvidia package installer needs to explicitly specify python2. These kind of bugs would be all over Quantal I would expect? I am surprised you bleeding edge guys even bother to post about problems like this.

caryb
June 18th, 2012, 06:18 AM
I renamed the Quirks directory & bingo I have glorious Nvidia driver working :P


Cary

VinDSL
June 18th, 2012, 02:30 PM
Quantal is changing the default to python3 is it?
Yes, and it's arrival is long overdue! I've been playing around with Python 3 (in Conky via symlinks) since 2010.

SOURCE: https://wiki.ubuntu.com/QuantalQuetzal/TechnicalOverview/Alpha1

Python 3.0

For 12.10, we intend to ship only Python 3 with the Ubuntu desktop image, not Python 2. Alpha-1 begins this process, with the installer and some other applications ported to Python 3. There are still quite a few packages left to port, and so Python 2 and 3 are both installed for the time being.

If you have your own programs based on Python 2, fear not! Python 2 will continue to be available (as the python package) for the foreseeable future. However, to best support future versions of Ubuntu you should consider porting your code to Python 3. Python/3 has some advice and resources on this

Python 2 and 3 are not the same. Unless a script is extremely simple, it has to be written differently to work with Python 2 or Python 3.

When you run Python 2 scripts on Python 3, and vice-versa, you will get errors due to the way parser options are handled. Whole series of libraries have changed, and the way previous functions worked with parameters, et cetera, has changed.

My current Python setup:

vindsl@Zuul:~$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root 9 May 23 03:57 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root 9 May 23 03:57 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 2799440 Apr 20 16:47 /usr/bin/python2.7
lrwxrwxrwx 1 root root 9 Apr 14 22:13 /usr/bin/python3 -> python3.2
lrwxrwxrwx 1 root root 11 May 3 08:56 /usr/bin/python3.2 -> python3.2mu
-rwxr-xr-x 1 root root 2788192 May 3 08:56 /usr/bin/python3.2mu
lrwxrwxrwx 1 root root 11 Apr 14 22:13 /usr/bin/python3mu -> python3.2mu
vindsl@Zuul:~$Older scripts use to require that Python 2.6 be installed too, e.g. 3 versions, but those days are happily over.


So I would think that nvidia package installer needs to explicitly specify python2.
I *think* this is what's at play here... the installer needs to be ported to Python 3 for testers/future use. ;)

ronacc
June 18th, 2012, 03:26 PM
I am surprised you bleeding edge guys even bother to post about problems like this.

we are here to report things like this so that they can be fixed .and to discuss workarounds to let us keep testing until the fix arrives .

dino99
June 18th, 2012, 03:37 PM
we are here to report things like this so that they can be fixed .and to discuss workarounds to let us keep testing until the fix arrives .

no needs to report about that as the work is on the table; only needs patience. Reporting will only flooded with useless reports.

ronacc
June 18th, 2012, 03:48 PM
patience hell i'm gonna kill someone if they don't fix this right now .:lolflag: ( note we fixed this right here in this thread )