The gpu-manager should allow RandR offloading without bbswitch

Bug #1349282 reported by Alberto Milone on 2014-07-28
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nvidia-settings (Ubuntu)
Medium
Alberto Milone
Trusty
Medium
Alberto Milone
ubuntu-drivers-common (Ubuntu)
Medium
Alberto Milone
Trusty
Medium
Alberto Milone

Bug Description

SRU Request

While bbswitch may fail on some hybrid systems (e.g. on the desktop or when the bbswitch module fails to build), this is not a good reason to prevent the system from offloading rendering to the NVIDIA GPU.

[Impact]
 * This problem makes it impossible to use the NVIDIA GPU on hybrid systems with Intel+NVIDIA GPUs when bbswitch is not available (i.e. when it fails to load).

[Test Case]
 * Make sure to be using a hybrid system with Intel+NVIDIA GPUs.

 * Check that bbswitch is not available. You can do so by posting output of the following command:
   test -e /proc/acpi/bbswitch && echo true || echo false

 * Make sure that the gpu-manager is not disabled (only necessary if you disabled it manually).

 * Install ubuntu-drivers-common from trusty-proposed.

 * Remove all fglrx and nvidia drivers (keep the nvidia-common and the nvidia-prime packages):
   sudo apt-get --purge remove nvidia-331
   sudo apt-get --purge remove nvidia-331
   sudo apt-get --purge remove fglrx
   sudo apt-get --purge remove fglrx-updates

 * Restart the system.

 * Install the nvidia binary driver, reboot, and check that the binary driver is enabled (attach your /var/log/gpu-manager.log)
    - Expected: the NVIDIA discrete GPU is enabled.
    - Bad behavior: the system switches back to the intel driver and the discrete GPU is not used, despite the fact that the system was configured properly.

[Regression Potential]
 * Low. Systems that currently work will keep working as usual, the ones that currently fail should finally work.

[Other Info]
 * N/A

-----------

The gpu-manager should allow RandR offloading without bbswitch. This would allow desktop systems to make use of offloading even when bbswitch is not supported.

Also, nvidia-settings should not complain in such scenarios. See https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1310023/comments/70

Changed in ubuntu-drivers-common (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Alberto Milone (albertomilone)
Changed in nvidia-settings (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Alberto Milone (albertomilone)
description: updated
description: updated
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-drivers-common (1:0.2.98) utopic; urgency=medium

  * gpu-manager.c, gpu-manager.py:
    - Add support for testing core alternatives. This will be needed
      by fglrx.
    - Add the --backup-log parameter. This is only used for debugging
      and disabled by default.
    - Fix a regression that caused the gpu-manager to switch to mesa
      after enabling fglrx on hybrid systems (LP: #1310489). Also
      add a test case so that we don't regress in the future.
    - Check that either fglrx or nvidia is set in xorg.conf when
      xorg.conf is needed.
    - Check if kernel modules are blacklisted before choosing the
      driver (LP: #1310489).
    - Enable only GPUs with open drivers that have connected outputs.
      Attaching to GPUs that have no connected outputs would result
      in a black screen.
    - Allow RandR offloading even without bbswitch (LP: #1349282).
    - Fall back to mesa when failing to enable prime.
    - Do not try to enable prime if the nvidia driver is older than
      331.
    - Do not abort if the settings for prime cannot be found.
      Try creating the file before failing.
    - Avoid false positives of unloaded modules.
    - Use the cleanup attribute.
    - Always use snprintf instead of sprintf.
 -- Alberto Milone <email address hidden> Wed, 27 Aug 2014 10:39:17 +0200

Changed in ubuntu-drivers-common (Ubuntu):
status: Triaged → Fix Released
Changed in ubuntu-drivers-common (Ubuntu Trusty):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Alberto Milone (albertomilone)
Changed in nvidia-settings (Ubuntu Trusty):
status: New → In Progress
status: In Progress → Triaged
importance: Undecided → Medium
assignee: nobody → Alberto Milone (albertomilone)
description: updated

Hello Alberto, or anyone else affected,

Accepted ubuntu-drivers-common into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.2.91.7 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
Taihsiang Ho (taihsiangho) wrote :

An I+N machine, Lenovo ThinkPad T440p (CID 201309-14169),
could not reproduce this issue.

However,
I tested this fix by the following steps:

1. install Ubuntu 14.04.1 on Lenovo ThinkPad T440p (CID 201309-14169)
2. sudo apt-get install ubuntu-drivers-common ( to be the latest version 1:0.2.91.6)
3. sudo reboot
4. sudo apt-get install nvidia-331-updates (version: 331.38-0ubuntu7.1)
5. sudo reboot
6. sudo dkms remove bbswitch/0.7 --all
7. reboot
8. /var/log/gpu-manager.log now will tell you 'Is nvidia enabled? no'
9. enabled the proposed pocket via software center
10. sudo apt-get install ubuntu-drivers-common ( to upgrade ubuntu-drivers-common)
11. reboot
12. /var/log/gpu-manager.log now will tell you 'Is nvidia enabled? yes'

--------------------
apt-cache policy ubuntu-drivers-common
The following is the snapshot of the test environment:
ubuntu-drivers-common:
  Installed: 1:0.2.91.7
  Candidate: 1:0.2.91.7
  Version table:
 *** 1:0.2.91.7 0
        500 http://tw.archive.ubuntu.com/ubuntu/ trusty-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     1:0.2.91.6 0
        500 http://tw.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     1:0.2.91.4 0
        500 http://tw.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

dpkg -l | grep -e nvidia -e bbsw
ii bbswitch-dkms 0.7-2ubuntu1 amd64 Interface for toggling the power on nVidia Optimus video cards
ii nvidia-331-updates 331.38-0ubuntu7.1 amd64 NVIDIA binary driver - version 331.38
ii nvidia-libopencl1-331-updates 331.38-0ubuntu7.1 amd64 NVIDIA OpenCL Driver and ICD Loader library
ii nvidia-opencl-icd-331-updates 331.38-0ubuntu7.1 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.6.2 amd64 Tools to enable NVIDIA's Prime
ii nvidia-settings 331.20-0ubuntu8 amd64 Tool for configuring the NVIDIA graphics driver

dkms status
fwts-efi-runtime-dkms, 14.08.00, 3.13.0-36-generic, x86_64: installed
nvidia-331-updates, 331.38, 3.13.0-36-generic, x86_64: installed

lsmod | grep bb (could not found anything)

ubuntu@201309-14169:~$ ls /proc/acpi/
ac_adapter battery button ibm wakeup

Alberto Milone (albertomilone) wrote :

Taihsiang has shown that, thanks to the new ubuntu-drivers-common, it is now possible to use the nvidia driver in an Optimus system even when bbswitch is not available. This was the point of the SRU.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

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

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

  * gpu-manager.c, gpu-manager.py:
    - Add support for testing core alternatives. This will be needed
      by fglrx.
    - Fix a regression that caused the gpu-manager to switch to mesa
      after enabling fglrx on hybrid systems (LP: #1310489). Also
      add a test case so that we don't regress in the future.
    - Check that either fglrx or nvidia is set in xorg.conf when
      xorg.conf is needed.
    - Check if kernel modules are blacklisted before choosing the
      driver (LP: #1310489).
    - Enable only GPUs with open drivers that have connected outputs.
      Attaching to GPUs that have no connected outputs would result
      in a black screen.
    - Allow RandR offloading even without bbswitch (LP: #1349282).
    - Fall back to mesa when failing to enable prime.
    - Do not try to enable prime if the nvidia driver is older than
      331.
    - Do not abort if the settings for prime cannot be found.
      Try to create the file before failing.
 -- Alberto Milone <email address hidden> Fri, 29 Aug 2014 11:29:55 +0200

Changed in ubuntu-drivers-common (Ubuntu Trusty):
status: Fix Committed → Fix 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  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments