SRU request: handle EGL alternatives and use different drivers for the LTS stacks

Bug #1642662 reported by Alberto Milone
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Critical
Alberto Milone
nvidia-prime (Ubuntu)
Fix Released
Critical
Alberto Milone
Trusty
Fix Released
Critical
Alberto Milone
ubuntu-drivers-common (Ubuntu)
Fix Released
Critical
Alberto Milone
Trusty
Fix Released
Critical
Alberto Milone

Bug Description

SRU Request:

[Impact]
A recent security update of the nvidia driver provided new EGL libraries and new kernel modules (such as nvidia-modeset and nvidia-drm), which are not handled by the current gpu-manager (ubuntu-drivers-common) and nvidia-prime in 14.04. This problem is fixed in Xenial or newer.

ubuntu-drivers-common also does not distinguish between the different LTS stacks, and this is a major problem on Intel+Nvidia hybrid systems, as anything running stacks older than 14.04.5 will require using the intel driver with SNA acceleration, whereas the rest should use the modesetting driver. Boot parameters can also be passed to use other driver combinations (for unsupported use cases).

[Test Case]
1) Enable the trusty-proposed repository, and install the ubuntu-drivers-common and the nvidia-prime packages.

2) Install the nvidia driver.

3) Restart the system and see if it boots correctly. If unsure, please attach your /var/log/gpu-manager.log and /var/log/Xorg.0.log

[Regression Potential]
Low, the above mentioned changes are already in Yakkety (and most of them have been in Xenial since its release).

Changed in nvidia-prime (Ubuntu):
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Alberto Milone (albertomilone)
status: In Progress → Fix Released
Changed in ubuntu-drivers-common (Ubuntu Trusty):
status: New → Fix Released
status: Fix Released → In Progress
Changed in ubuntu-drivers-common (Ubuntu):
status: In Progress → Fix Released
Changed in nvidia-prime (Ubuntu Trusty):
status: New → In Progress
importance: Undecided → Critical
Changed in ubuntu-drivers-common (Ubuntu Trusty):
importance: Undecided → Critical
Changed in nvidia-prime (Ubuntu Trusty):
assignee: nobody → Alberto Milone (albertomilone)
Changed in ubuntu-drivers-common (Ubuntu Trusty):
assignee: nobody → Alberto Milone (albertomilone)
tags: added: kittyhawk originate-from-1613164
Changed in hwe-next:
assignee: nobody → Alberto Milone (albertomilone)
status: New → In Progress
importance: Undecided → Critical
summary: - Handle EGL alternatives and use different drivers for the LTS stacks
+ SRU request: handle EGL alternatives and use different drivers for the
+ LTS stacks
description: updated
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Alberto, or anyone else affected,

Accepted ubuntu-drivers-common into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.2.91.12 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 Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Alberto, or anyone else affected,

Accepted nvidia-prime into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-prime/0.6.2.1 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 nvidia-prime (Ubuntu Trusty):
status: In Progress → Fix Committed
Revision history for this message
Nara Huang (narahuang) wrote :

Tested with proposed repository, system could boot to desktop successfully.

Test steps:
1. Enable trusty-proposed in software-properties-gtk
2. sudo apt update ; sudo apt upgrade -y
3. Reboot system
4. System could boot to desktop successfully, and:
ubuntu-drivers-common: 1:0.2.91.12
nvidia-prime: 0.6.2.1

tags: added: verification-done
removed: verification-needed
Revision history for this message
Timo Aaltonen (tjaalton) 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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-prime - 0.6.2.1

---------------
nvidia-prime (0.6.2.1) trusty-proposed; urgency=medium

  * debian/postrm.in, prime-select: backport from yakkety's 0.8.4:
    - Add support for EGL alternatives (LP: #1642662).
    - Simplify the logic for enablement by getting rid of legacy code
      that is only relevant to Ubuntu <= 12.04. This is now possible
      thanks to the fact that we allow installing only one binary
      driver at the time.
    - Do not try to remove the old xorg.conf.

 -- Alberto Milone <email address hidden> Mon, 21 Nov 2016 12:17:54 +0100

Changed in nvidia-prime (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-drivers-common (1:0.2.91.12) trusty-proposed; urgency=medium

  * Backport from yakkety version 1:0.4.22: gpu-manager.c, gpu-manager.py:
    - Add all the necessary changes for nvidia and hybrid graphics to
      handle the new kernel modules and the EGL alternatives (LP: #1642662).
      Also detect the new amdgpu driver.
    - Leave gdm support disabled, since gdm is still missing a patch.

 -- Alberto Milone <email address hidden> Mon, 21 Nov 2016 12:04:49 +0100

Changed in ubuntu-drivers-common (Ubuntu Trusty):
status: Fix Committed → Fix Released
Changed in hwe-next:
status: In Progress → Fix Released
Revision history for this message
Peng (pengwg) wrote :
Download full text (3.5 KiB)

This update broke my system Dell Precision M6800 with Nvidia Quadro K3100M.
prime-select intel/nvidia shows:

Traceback (most recent call last):
  File "/usr/bin/prime-select", line 398, in <module>
    if not switcher.enable_profile(arg):
  File "/usr/bin/prime-select", line 323, in enable_profile
    egl_alternatives = self._get_current_egl_alternative()
  File "/usr/bin/prime-select", line 219, in _get_current_egl_alternative
    return self._get_current_alternative(self._egl_switcher, self._egl_switcher_other)
  File "/usr/bin/prime-select", line 211, in _get_current_alternative
    alternatives[1] = self._simplify_gl_alternative_name(raw_alternative_other)
  File "/usr/bin/prime-select", line 185, in _simplify_gl_alternative_name
    return alternative.split('/')[-2]
IndexError: list index out of range

/var/log/gpu-manager.log:
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can't access /run/u-d-c-fglrx-was-loaded file
Looking for fglrx modules in /lib/modules/4.4.0-51-generic/updates/dkms
Looking for nvidia modules in /lib/modules/4.4.0-51-generic/updates/dkms
Found nvidia module: nvidia_370_modeset.ko
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is fglrx loaded? no
Was fglrx unloaded? no
Is fglrx blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is fglrx kernel module available? no
Is nvidia kernel module available? yes
Vendor/Device Id: 8086:416
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:11b6
BusID "PCI:1@0:0:0"
Is boot vga? no
Skipping "/dev/dri/card1", driven by "i915"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card1", driven by "i915"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card1", driven by "i915"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Found "/dev/dri/card1", driven by "i915"
output 0:
 card1-eDP-1
Number of connected outputs for /dev/dri/card1: 1
Does it require offloading? yes
last cards number = 1
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
The number of cards has changed!
Has the system changed? Yes
main_arch_path x86_64-linux-gnu, other_arch_path i386-linux-gnu
Current alternative: /usr/lib/nvidia-370-prime/ld.so.conf
Current core alternative: (null)
Current egl alternative: /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf
Is nvidia enabled? no
Is nvidia egl enabled? no
Is fglrx enabled? no
Is mesa enabled? no
Is mesa egl enabled? yes
Is pxpress enabled? no
Is prime enabled? yes
Is prime egl enabled? no
Is nvidia available? yes
Is nvidia egl available? no
Is fglrx available? no
Is fglrx-core available? no
Is mesa available? yes
Is mesa egl available? yes
Is pxpress available? no
Is prime available? yes
Is prime egl available? no
System configuration has changed
Intel IGP detected
Intel hybrid system
Nvidia driver version 370.28 detected
/sys/class/dmi/id/product_version="00"
/sys/class/dmi/id/product_name="Precision M6800"
1st try: bbswitch without quirks
Loading bbsw...

Read more...

Revision history for this message
Jerry Kao (jerry.kao) wrote :

@Peng

Are you using a pre-installed image or standard Ubunutu?
Please provide your Ubuntu version by "lsb_release -a"
This fix is for Trusty. If you are running Xenial, please file a new bug against your issue.

Revision history for this message
Peng (pengwg) wrote :

@Jerry Kao
This is standard Ubuntu 14.04.05 LTS.

For some reason the Nvidia driver doesn't create the egl group for my computer, for example:

$ update-alternatives --config x86_64-linux-gnu_egl_conf
There are 2 choices for the alternative x86_64-linux-gnu_egl_conf (providing /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf).

  Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf 500 auto mode
  1 /usr/lib/x86_64-linux-gnu/libhybris-egl/ld.so.conf 400 manual mode
  2 /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf 500 manual mode

However the gl group is normal:

$ update-alternatives --config x86_64-linux-gnu_gl_conf
There are 3 choices for the alternative x86_64-linux-gnu_gl_conf (providing /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf).

  Selection Path Priority Status
------------------------------------------------------------
  0 /usr/lib/nvidia-370/ld.so.conf 8604 auto mode
* 1 /usr/lib/nvidia-370-prime/ld.so.conf 8603 manual mode
  2 /usr/lib/nvidia-370/ld.so.conf 8604 manual mode
  3 /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf 500 manual mode

That's why this update broke my Optimus and I am stuck in Intel mode. Like I said it's a Nvidia Quadro K3100M system which is not quite common. Could that be related?

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.