"UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte" when removing nvidia-current package

Bug #1320868 reported by Dwi Prianto
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Alberto Milone

Bug Description

$sudo apt-get remove nvidia-current
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'nvidia-current' is not installed, so not removed
The following package was automatically installed and is no longer required:
  linux-image-generic
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nvidia-331 (331.38-0ubuntu7) ...
INFO:Enable nvidia-331
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
Traceback (most recent call last):
  File "/usr/bin/quirks-handler", line 65, in <module>
    operation_status = main(options)
  File "/usr/bin/quirks-handler", line 44, in main
    quirks = Quirks.quirkapplier.QuirkChecker(options.package_enable, path=quirks_path)
  File "/usr/lib/python3/dist-packages/Quirks/quirkapplier.py", line 38, in __init__
    self._system_info = self.get_system_info()
  File "/usr/lib/python3/dist-packages/Quirks/quirkapplier.py", line 64, in get_system_info
    return quirk_info.get_dmi_info()
  File "/usr/lib/python3/dist-packages/Quirks/quirkinfo.py", line 46, in get_dmi_info
    'class', 'dmi', 'id', item)).read().strip()
  File "/usr/lib/python3.4/codecs.py", line 313, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
dpkg: error processing package nvidia-331 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 nvidia-331
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Dwi Prianto (dwi-prianto94) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-drivers-common (Ubuntu):
status: New → Confirmed
Revision history for this message
saad alhokail (saad-alhokail) wrote :

same thing happen to me even when i try to downgrade to version 304,also i try to install ".run" driver from nvidia website.
to fix my system (12.04 TLS) i have to login as a root in console mode and remove all nvidia files:
apt-get purge nvidia*
then i have reboot my pc and everything was returned to normal especially the screen resolution.
note: i have attached the jockey.log file.

summary: - E: Sub-process /usr/bin/dpkg returned an error code (1)
+ "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0:
+ invalid start byte" when removing nvidia-current package
Revision history for this message
Manolis Kapernaros (kapcom01) wrote :

Purge doesn't work for me.

Revision history for this message
wzhy90 (wzhy90) wrote :

In the file: /usr/lib/python3/dist-packages/Quirks/quirkinfo.py
Look at line no.45 in for item in self._quirk_info.keys():

value = open(os.path.join(self.sys_dir,
                    'class', 'dmi', 'id', item)).read().strip()

add mode='rb' to open() like this:

value = open(os.path.join(self.sys_dir,
                    'class', 'dmi', 'id', item), mode='rb').read().strip()

Revision history for this message
Ying-Chun Liu (paulliu) wrote :

I think this bug is being fixed in the upstream already.
https://github.com/tseliot/ubuntu-drivers-common/commit/cee1ac2aaa4ee79b81c154fed282268fbbe7a9a2

We can close this bug with ubuntu-drivers-common (>= 1:0.4.19).

Changed in ubuntu-drivers-common (Ubuntu Xenial):
status: New → Triaged
Changed in ubuntu-drivers-common (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote : Missing SRU information

Thanks for uploading the fix for this bug report to -proposed. However, when reviewing the package in -proposed and the details of this bug report I noticed that the bug description is missing information required for the SRU process. You can find full details at http://wiki.ubuntu.com/StableReleaseUpdates#Procedure but essentially this bug is missing some of the following: a statement of impact, a test case and details regarding the regression potential. Thanks in advance!

Changed in ubuntu-drivers-common (Ubuntu Xenial):
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Martin Pitt (pitti) wrote :

Hang on, this has been stuck in yakkety-proposed due to being FTBFS for six weeks(!) now. I'm rejecting the upload to xenial-proposed now as this takes too much time away from the SRU team by re-visiting the same SRU over and over.

Changed in ubuntu-drivers-common (Ubuntu):
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-drivers-common - 1:0.4.20

---------------
ubuntu-drivers-common (1:0.4.20) yakkety; urgency=medium

  * Remove PackageKit plugin. This stopped working with packagekit 1.0 as its
    apt backend is gone and aptcc does not support plugins.
  * debian/control: Drop obsolete XS-Testsuite:.
  * Bump Standards-Version to 3.9.8.

 -- Martin Pitt <email address hidden> Tue, 16 Aug 2016 11:46:36 +0200

Changed in ubuntu-drivers-common (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Dwi, or anyone else affected,

Accepted ubuntu-drivers-common into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.4.17.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubuntu-drivers-common (Ubuntu Xenial):
status: Triaged → Fix Committed
tags: added: verification-needed
Mathew Hodson (mhodson)
Changed in ubuntu-drivers-common (Ubuntu):
importance: Undecided → Medium
Changed in ubuntu-drivers-common (Ubuntu Xenial):
importance: Undecided → Medium
Revision history for this message
Pranav Sharma (sudopluto-deactivatedaccount) wrote :

I do not experience the bug with package version 1:0.4.17.2.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Pranav Sharma (sudopluto-deactivatedaccount) wrote :

Sorry after reading SRU wiki I found out I am not supposed to do that.

tags: added: verification-needed
removed: verification-done
Revision history for this message
Pranav Sharma (sudopluto-deactivatedaccount) wrote :

...but the launchpad comment tells me to mark it.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-drivers-common - 1:0.4.17.2

---------------
ubuntu-drivers-common (1:0.4.17.2) xenial-proposed; urgency=medium

  [ Alberto Milone ]
  * gpu-manager.c:
    - Fix memory leak in get_alternatives(). Make sure to always free
      alternatives->current_core and alternatives->current_egl.
    - Partially drop the drm code, and get information about connectors
      from sysf. This fixes a long standing performance issue (LP: #1586933).
    - Disable persistence mode before powering down the dGPU.
      If persistence mode is not disabled, gpu-manager will not be able to
      unload the nvidia module (LP: #1619306).
    - Make sure to load and unload nvidia-drm. This fixes a problem that
      prevents the dGPU from being powered off in hybrid systems with
      recent nvidia drivers (LP: #1619306).

  [ Ying-Chun Liu (PaulLiu) ]
  * Quirks/quirkinfo.py:
    - Catch and ignore UnicodeDecodeErrors in dmi info, as some machines
      may report board_name as ffffffffffff0a to mean empty, and this
      causes an error in python 3 (LP: #1320868).

 -- Alberto Milone <email address hidden> Mon, 06 Jun 2016 12:49:19 +0200

Changed in ubuntu-drivers-common (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for ubuntu-drivers-common has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.