gpu-manager should also support using custom xorg.conf files for Nvidia

Bug #1667198 reported by Alex Tu
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Undecided
Unassigned
OEM Priority Project
Fix Released
Critical
Alex Tu
ubuntu-drivers-common (Ubuntu)
Fix Released
High
Alberto Milone
Xenial
Fix Released
Critical
Alberto Milone
Zesty
Fix Released
Critical
Alberto Milone

Bug Description

SRU Request:

[Impact]
Different GPUs may require different options in the xorg.conf file. Currently this is not possible, since the options have been hardcoded in gpu-manager to configure the system automatically.

This new (backported) feature allows users to tell gpu-manager to use their own custom xorg.confs for their NVIDIA GPUs.

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

2) Install the nvidia driver.

3) Place your configuration file(s) in the /usr/share/gpu-manager.d directory.

If you are using a non-hybrid system, you can create the /usr/share/gpu-manager.d/non-hybrid file. In case of a hybrid system, you can specify /usr/share/gpu-manager.d/hybrid-performance and/or /usr/share/gpu-manager.d/hybrid-power-saving, depending on the power profile you intend to apply your settings to.

4) 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

5) Make sure that the /etc/X11/xorg.conf matches the file you specified in 3)

[Regression Potential]
Low, the above mentioned changes are already in Artful, and will not affect the system's behaviour unless new configuration files are put in the /usr/share/gpu-manager.d/ directory.

______________________________
This feature has been implemented for Intel (ex. gpumanager_uxa), which is parsing kernel parameter to add option in xorg.conf (commit ff3a4e54).

And now Nvidia also need this feature to add Option "nvidiaXineramaInfo" "off" to fix some issues.

Btw, I'm thinking it might be a more flexible to have a config file which user could add all options as they want so that we could prevent keeping change gpu-manager when some more options are needed in the future.

Needed by LP: #1653592

Alex Tu (alextu)
description: updated
Changed in ubuntu-drivers-common (Ubuntu):
status: New → Confirmed
Changed in oem-priority:
assignee: nobody → Alex Tu (alextu)
status: New → Confirmed
importance: Undecided → Critical
Changed in ubuntu-drivers-common (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → High
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-drivers-common (1:0.4.23) artful; urgency=medium

  [ Alberto Milone ]
  * gpu-manager.{c|py}:
    - 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.
    - Add support for using custom xorg.confs with the nvidia
      driver (LP: #1667198).
      Custom xorg files can be named "non-hybrid" (for non hybrid
      systems), "hybrid-performance", and "hybrid-power-saving",
      and will have to placed in the /usr/share/gpu-manager.d
      directory.
      The directory can be overridden by passing another directory
      along with the "--custom-xorg-conf-path" parameter.
    - Add tests for the custom xorg.confs code and for amdgpu-pro
      hybrid support.
  [ Kai-Heng Feng ]
  * debian/control:
    - Add build dependency on libkmod-dev.
  * gpu-manager.c:
    - Detect and handle switchable graphics with the amdgpu-pro driver.
      AMDGPU-Pro has its own script to switch between powersaving and
      performance mode.
      Some machines allow enabling switchable graphics, or disabling
      the iGPU completely, thus leaving only the dGPU on. This new code
      simply detects the different profiles supported by AMD, and
      enables powersaving mode when possible.

 -- Alberto Milone <email address hidden> Thu, 11 May 2017 11:05:40 +0200

Changed in ubuntu-drivers-common (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-drivers-common (Ubuntu Xenial):
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Alberto Milone (albertomilone) wrote :

Please accept ubuntu-drivers-common 1:0.4.17.3 in xenial-proposed.

description: updated
summary: - gpu-manager should also support reading kernel parameter to adding
- options in xorg.conf for Nvidia
+ gpu-manager should also support using custom xorg.conf files for Nvidia
tags: added: originate-from-1693717 somerville
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Proposed package upload rejected

An upload of ubuntu-drivers-common to xenial-proposed has been rejected from the upload queue for the following reason: "pycache cruft left on the tree".

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Alex, 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.3 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 on 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: In Progress → Fix Committed
tags: added: verification-needed
Changed in hwe-next:
status: New → Incomplete
Revision history for this message
Alex Tu (alextu) wrote :

with ubuntu-drivers-common 1:0.4.17.3,
verified /usr/share/gpu-manager.d/hybrid-performance on "Inspiron 15 7000 Gaming" which has Nvidia VGA controller [10de:1c8c], the /etc/X11/xorg.conf file was replaced by /usr/share/gpu-manager.d/hybrid-performance as expected.

tags: added: verification-done
removed: verification-needed
tags: added: verification-done-xenial
removed: verification-done
Revision history for this message
Brian Murray (brian-murray) wrote :

Has this feature been added to Zesty which is / will be a supported upgrade path from Xenial?

Changed in ubuntu-drivers-common (Ubuntu Xenial):
status: Fix Committed → Incomplete
Revision history for this message
Alex Tu (alextu) wrote :

hi Brian,
Could you please give some more detail about question in #6?

from bug description, this change has been landed to Artful.
So, what do we need to let this change be landed to Xenial also?

Revision history for this message
Brian Murray (brian-murray) wrote :

When Ubuntu 16.10 becomes end of life next week, people will be able to upgrade from Ubuntu 16.04 to Ubuntu 17.04. I gather that this feature exists in Ubuntu 17.10 (artful) and that you want to add it to Ubuntu 16.04 (xenial), however if someone were to upgrade from Ubuntu 16.04 to Ubuntu 17.04 they would they experience a regression because the feature does not exist in Ubuntu 17.04. Given that I think the feature should also be added to Ubuntu 17.04 (zesty).

Revision history for this message
Robie Basak (racb) wrote :

I'm unsetting verification-done-xenial for now, since based on Brian's comment this is not yet ready to release to Xenial. Let's get it out of the report, so when the action is taken we actually notice.

tags: added: verification-needed-xenial
removed: verification-done-xenial
Revision history for this message
Alex Tu (alextu) wrote :

@Alberto
Based on #8, could you please also land this package to 17.04 (zesty)?
So that, we can finish this task. :)

Revision history for this message
Alberto Milone (albertomilone) wrote :

yes, sorry but I have been busy with other work. I plan to take care of this soon.

Changed in ubuntu-drivers-common (Ubuntu Zesty):
assignee: nobody → Alberto Milone (albertomilone)
status: New → In Progress
importance: Undecided → Critical
Revision history for this message
Alberto Milone (albertomilone) wrote :

Please accept ubuntu-drivers-common (1:0.4.22.1) into zesty-proposed.

Changed in ubuntu-drivers-common (Ubuntu Xenial):
status: Incomplete → Fix Committed
Changed in ubuntu-drivers-common (Ubuntu Zesty):
status: In Progress → Fix Committed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Alex, or anyone else affected,

Accepted ubuntu-drivers-common into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.4.22.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 on 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!

tags: added: verification-needed
Revision history for this message
Alex Tu (alextu) wrote :

just checked it on zesty + ubuntu-drivers-common 1:0.4.22.1, it just works as the behavior like #5 said.

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

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

---------------
ubuntu-drivers-common (1:0.4.22.1) zesty-proposed; urgency=medium

  * gpu-manager.{c|py}:
    - Add support for using custom xorg.confs with the nvidia
      driver (LP: #1667198).
      Custom xorg files can be named "non-hybrid" (for non hybrid
      systems), "hybrid-performance", and "hybrid-power-saving",
      and will have to placed in the /usr/share/gpu-manager.d
      directory.
      The directory can be overridden by passing another directory
      along with the "--custom-xorg-conf-path" parameter.
    - Add tests for the custom xorg.confs code and for amdgpu-pro
      hybrid support.

 -- Alberto Milone <email address hidden> Wed, 02 Aug 2017 17:17:13 +0200

Changed in ubuntu-drivers-common (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) 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 ubuntu-drivers-common - 1:0.4.17.3

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

  * gpu-manager.{c|py}:
    - Add support for using custom xorg.confs with the nvidia
      driver (LP: #1667198).
      Custom xorg files can be named "non-hybrid" (for non hybrid
      systems), "hybrid-performance", and "hybrid-power-saving",
      and will have to placed in the /usr/share/gpu-manager.d
      directory.
      The directory can be overridden by passing another directory
      along with the "--custom-xorg-conf-path" parameter.
    - Add tests for the custom xorg.confs code and for amdgpu-pro
      hybrid support.

 -- Alberto Milone <email address hidden> Mon, 19 Jun 2017 17:27:33 +0200

Changed in ubuntu-drivers-common (Ubuntu Xenial):
status: Fix Committed → Fix Released
Changed in oem-priority:
status: Confirmed → Fix Released
Changed in hwe-next:
status: Incomplete → Fix Released
Revision history for this message
ash (sersorrel) wrote :

This is no longer found in Bionic, since ubuntu-drivers-common 1:0.5 (see [1]). Was this feature intentionally removed?

[1]: https://git.launchpad.net/ubuntu/+source/ubuntu-drivers-common/commit/share/hybrid/gpu-manager.c?id=fb450c8eddf9290225e198ce92123e4fff346589

Revision history for this message
Alberto Milone (albertomilone) wrote :

@Josh: we don't overwrite the xorg.conf any more. We simply create configuration files in /usr/share/X11/xorg.conf.d/ . This is why we dropped the feature.

Revision history for this message
ash (sersorrel) wrote :

@Alberto: would you be open to adding it again? I need to enable TearFree and select the Intel driver when using my integrated GPU (but if I have `Driver "intel"` in my config when using the Nvidia GPU, I get a black screen on login), so it would be nice to have a way to automatically put a file in xorg.conf.d when switching the GPU.

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.