SRU: PRIME Power Saving mode draws too much power

Bug #1778011 reported by Alberto Milone on 2018-06-21
124
This bug affects 21 people
Affects Status Importance Assigned to Milestone
HWE Next
Undecided
Unassigned
gdm3 (Ubuntu)
High
Alberto Milone
Bionic
High
Alberto Milone
nvidia-graphics-drivers-390 (Ubuntu)
High
Alberto Milone
Bionic
High
Alberto Milone
nvidia-prime (Ubuntu)
High
Alberto Milone
Bionic
High
Alberto Milone
nvidia-settings (Ubuntu)
High
Alberto Milone
Bionic
High
Alberto Milone
ubuntu-drivers-common (Ubuntu)
High
Alberto Milone
Bionic
High
Alberto Milone

Bug Description

SRU Request:

[Impact]
Relying on the nouveau driver and on the vga switcheroo (to get around a change in systemd LP: #1777099) caused increased power consumption, and slowed down the switching process.

Furthermore, if the main X/Xwayland session was started by Gdm when the nvidia driver was loaded, the session will keep the nvidia module loaded, and prevent the system from switching off the dGPU. Also, the nouveau driver will be loaded, if nvidia is not, and this can cause problems to unsupported NVIDIA GPUs.

The solution involves the following changes:

1) Solving the problem in systemd (LP: #1777099)

2) Adding code in gpu-manager and in nvidia-prime to unload the nvidia modules, and to allow the PCI device to sleep.

3) Making a slight change to the current patch in Gdm, used to call the PRIME scripts before and after a Gdm session (so that gpu-manager gets actually called on log out)

4) Adding code in gpu-manager to kill the main X/Xwayland session on log out, if the session is preventing us from unloading the nvidia driver. A new X/Xwayland session will be created after unload the module.

5) Removing the systemd service that loads nouveau from the nvidia packages.

[Test Case]
1) Enable the -proposed repository, and install the new "ubuntu-drivers-common", nvidia drivers, nvidia-prime, and gdm3 *

2) Make sure the nvidia packages are installed, and enable performance mode (if it is already enabled, call "sudo prime-select intel" first):
sudo prime-select nvidia

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

4) Select power saving mode:
sudo prime-select intel

5) Log out and log back in

6) Check if the nvidia driver is still loaded:
lsmod | grep nvidia

[Regression Potential]
Low, as hybrid graphics support does not work correctly, and the changes only affect this use case.

_____________________________________
* Steps to test the updates:

1) Enable the bionic-proposed repositories

2) Create /etc/apt/preferences.d/proposed-updates with the following content:

Package: *
Pin: release a=bionic-proposed
Pin-Priority: 400

3) Update the list of packages:

sudo apt-get update

4) Install the packages from -proposed using the following command:

sudo apt install nvidia-driver-390/bionic-proposed gdm3/bionic-proposed ubuntu-drivers-common/bionic-proposed nvidia-prime/bionic-proposed nvidia-settings/bionic-proposed libnvidia-gl-390/bionic-proposed libnvidia-compute-390/bionic-proposed libnvidia-decode-390/bionic-proposed libnvidia-encode-390/bionic-proposed libnvidia-ifr1-390/bionic-proposed libnvidia-fbc1-390/bionic-proposed

Related branches

CVE References

Alberto Milone (albertomilone) wrote :

Here is a PPA with the current code for Bionic, available for testing:
https://launchpad.net/~albertomilone/+archive/ubuntu/hybridgraphics?field.series_filter=bionic

You will have to upgrade systemd, nvidia-prime, and ubuntu-drivers-common, call "sudo update-initramfs -u" (just in case), and reboot

Changed in nvidia-prime (Ubuntu Bionic):
status: New → In Progress
Changed in ubuntu-drivers-common (Ubuntu):
status: New → In Progress
Changed in ubuntu-drivers-common (Ubuntu Bionic):
status: New → In Progress
Changed in nvidia-prime (Ubuntu Bionic):
assignee: nobody → Alberto Milone (albertomilone)
Changed in ubuntu-drivers-common (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Changed in ubuntu-drivers-common (Ubuntu Bionic):
assignee: nobody → Alberto Milone (albertomilone)
Changed in nvidia-prime (Ubuntu Bionic):
importance: Undecided → High
Changed in ubuntu-drivers-common (Ubuntu):
importance: Undecided → High
Changed in ubuntu-drivers-common (Ubuntu Bionic):
importance: Undecided → High
André Brait (andrebrait) wrote :

Hey, Alberto. I have a few questions:

1. Are these changes intended to be deployed to Bionic, eventually? (I assume yes, by the names/versions you're working on, but I wanted to confirm this)

2. Would it make it not necessary to switch to nouveau at all? (I assume this is why prime-select currently has to generate another initramfs, right?)

3. Could this, along with restarting some services, make switching without a full reboot possible? Or would that still require LightDM?

Thanks!

Alberto Milone (albertomilone) wrote :

@André

1. Yes.

2. The new code doesn't involve using nouveau, or bbswitch, or regenerating the initramfs.

3. I don't think Gdm3 allows stopping X, calling gpu-manager, and then restarting X, as LightDm does on log out. I hope to do some work on it in the future though.

fargoth (cantfind) wrote :

Can we have an option to switch to the iGPU, but keep the nvidia card powered and its modules loaded so that it can be used for CUDA calculations?

Alberto Milone (albertomilone) wrote :

@fargoth: you can disable gpu-manager by passing the "nogpumanager" boot parameter. Wouldn't this work for you?

Mauro Gaspari (ilvipero) wrote :

This bug also affects me.
I am running Kubuntu 18.04 on Gigabyte AERO14, CPU:i7-7700HQ (45W TDP), GPU:Nvidia 1050Ti

I took a full system image with clonezilla, and tested Alberto Milone's PPA. System working fine after the upgrade. I tested switch+reboot around 20 times.

Test results:
No issue rebooting with or without switching GPU.
GPU Switching: Switching GPU is now much faster. Even if i use it from nvidia gui, I get the popup window asking to reboot right away.
system shutdown/reboot after I switch gpu is fast. Usual 5~10 seconds, same time it takes when I am not switching gpu.
Power usage - Nvidia mode: powertop reports around 30w idle (cpu load:2~3%, gpu ops/sec:0)
Power usage - Intel mode: powertop reports around 20w idle (cpu load:2~3%, gpu ops/sec:0) - Device stats report usage of 100% of the Nvidia 1050 in powertop, not sure if accurate.

I hope it helps.

Cheers,
Mauro

Changed in gdm3 (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Alberto Milone (albertomilone)
Changed in gdm3 (Ubuntu Bionic):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → In Progress
Launchpad Janitor (janitor) wrote :

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

---------------
nvidia-prime (0.8.9) cosmic; urgency=medium

  [ Alberto Milone ]
  * 90-nvidia.conf,
    debian/rules,
    prime-select:
    - Make sure to remove the old blacklist file.
    - Use /lib for blacklist-nvidia.conf.
    - Do not check if prime is supported when disabling nvidia.
    - Enable KMS by default.
    - Install prime-switch again (LP: #1778011).
  * debian/nvidia-prime.nvidia-prime-boot.service:
    - Remove service.

  [ Alex Tu ]
    * prime-select: avoid regenerating the initramfs.

 -- Alberto Milone <email address hidden> Tue, 31 Jul 2018 16:47:20 +0200

Changed in nvidia-prime (Ubuntu):
status: In Progress → Fix Released
description: updated
Changed in nvidia-graphics-drivers-390 (Ubuntu):
status: New → Fix Released
Changed in nvidia-graphics-drivers-390 (Ubuntu Bionic):
status: New → In Progress
Changed in nvidia-graphics-drivers-390 (Ubuntu):
importance: Undecided → High
Changed in nvidia-graphics-drivers-390 (Ubuntu Bionic):
importance: Undecided → High
Changed in nvidia-graphics-drivers-390 (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Changed in nvidia-graphics-drivers-390 (Ubuntu Bionic):
assignee: nobody → Alberto Milone (albertomilone)
description: updated
summary: - PRIME Power Saving mode draws too much power
+ SRU: PRIME Power Saving mode draws too much power
Changed in gdm3 (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-drivers-common (1:0.5.3) cosmic; urgency=medium

  * gpu-manager.(c|py):
    - Set automatic pci power management when the dGPU is disabled (LP: #1778011).
    - Load the nvidia modules when switching to performance mode.
    - Do not skip unbound devices.
    - Make remove_prime_outputclass() void.
    - Report failures in enable_power_management().
    - Look for blacklisted modules in /lib/modprobe.d too.
    - Report failure when the nvidia modules cannot be unloaded,
      kill the main display session created by gdm3, and try
      unloading the nvidia modules once again.
  * gpu-manager.service:
    - Start before oem-config.service.

 -- Alberto Milone <email address hidden> Thu, 02 Aug 2018 15:45:42 +0200

Changed in ubuntu-drivers-common (Ubuntu):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm3 - 3.28.2-3ubuntu4

---------------
gdm3 (3.28.2-3ubuntu4) cosmic; urgency=medium

  * ubuntu_nvidia_prime.patch:
    - Run scripts for Prime before and after Gdm sessions (LP: #1778011).

 -- Alberto Milone <email address hidden> Mon, 30 Jul 2018 18:31:17 +0200

Changed in gdm3 (Ubuntu):
status: Fix Committed → Fix Released
Changed in nvidia-settings (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → In Progress
status: In Progress → Fix Released
Changed in nvidia-settings (Ubuntu Bionic):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → In Progress
Steve Langasek (vorlon) wrote :

Reviewing ubuntu-drivers-common in the queue, I notice:

+ if (!match) {
+ free(match);

Surely no good can come of this call to free() and it should be omitted?

The change to start before oem-config.service seems correct but has no associated bug linked. This looks to me like it should still go through the SRU verification process because it's unrelated to the other changes. (Also, it's not 100% obvious that the change is correct: for example, why does oem-config not provide display-manager.service? Why are there no interdependencies between oem-config's systemd units and display-manager.service?)

The source package as uploaded appears to have a lot of cruft in various __pycache__ directories. This ought to be cleaned up.

I'm going to go ahead and reject based on the missing bug reference for the oem-config.service change. If you think this is wrong, feel free to ping me on IRC to discuss.

An upload of ubuntu-drivers-common to bionic-proposed has been rejected from the upload queue for the following reason: "contains change to systemd service with no bug reference; https://bugs.launchpad.net/ubuntu/+source/nvidia-prime/+bug/1778011/comments/10".

Steve Langasek (vorlon) wrote :

Bug description says:

> [Regression Potential]
> Low, as hybrid graphics support does not work correctly, and the changes only affect
> this use case.

Dropping the nvidia-fallback service means that any time the nvidia module has failed to be loaded, including if the nvidia module has failed to build for any reason, the nouveau module will not be loaded in its place. This is a behavior change that potentially affects users other than those with hybrid graphics. Is that a concern? How long has the existing behavior been there, and what are the chances that users may be inadvertently relying on the current fallback behavior without knowing it?

Changed in nvidia-graphics-drivers-390 (Ubuntu Bionic):
status: In Progress → Incomplete
ubname (ubname) wrote :

just to give some feedback, I have a optimus laptop with i7 sandibridge and nvidia GT550M, there is a led that indicates the nvidia GPU is always in use also after using the ppa to test, the laptop is indeed very hot also after I select intel and reboot and the led indicates that the nvidia GPU is in use despite selecting intel.

thanks!

Hello Alberto, or anyone else affected,

Accepted gdm3 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gdm3/3.28.3-0ubuntu18.04.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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

Changed in gdm3 (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Łukasz Zemczak (sil2100) wrote :

(waiting with the other packages until Steve's concerns are addressed)

Download full text (3.9 KiB)

Software rendering is a better bet if DKMS fails, as nouveau can cause
problems when dealing with (partially?) supported GPUs. I introduced that
change in bionic, but then I reverted that behaviour, also because it would
cause problems to hybrid graphics.

I don't think users relying on something that is broken should hold us
back. If anything, the fallback would cause users to file bug reports
(about graphics corruption, increased power consumption, etc.) against
nvidia, where these would be really nouveau's.

On Thu, 16 Aug 2018 at 00:36, Steve Langasek <email address hidden>
wrote:

> Bug description says:
>
> > [Regression Potential]
> > Low, as hybrid graphics support does not work correctly, and the changes
> only affect
> > this use case.
>
> Dropping the nvidia-fallback service means that any time the nvidia
> module has failed to be loaded, including if the nvidia module has
> failed to build for any reason, the nouveau module will not be loaded in
> its place. This is a behavior change that potentially affects users
> other than those with hybrid graphics. Is that a concern? How long has
> the existing behavior been there, and what are the chances that users
> may be inadvertently relying on the current fallback behavior without
> knowing it?
>
> ** Changed in: nvidia-graphics-drivers-390 (Ubuntu Bionic)
> Status: In Progress => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1778011
>
> Title:
> SRU: PRIME Power Saving mode draws too much power
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1778011/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: distribution=ubuntu; sourcepackage=gdm3; component=main;
> status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu;
> sourcepackage=nvidia-graphics-drivers-390; component=restricted; status=Fix
> Released; importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=nvidia-prime;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=nvidia-settings;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=ubuntu-drivers-common;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=gdm3; component=main; status=In Progress; importance=High;
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-graphics-drivers-390; component=restricted;
> status=Incomplete; importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-prime; component=main; status=In Progress;
> importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; dist...

Read more...

Alberto Milone (albertomilone) wrote :
Download full text (3.6 KiB)

I am going to have a look at this soon.

On Wed, 15 Aug 2018 at 23:20, Steve Langasek <email address hidden>
wrote:

> Reviewing ubuntu-drivers-common in the queue, I notice:
>
> + if (!match) {
> + free(match);
>
> Surely no good can come of this call to free() and it should be omitted?
>
> The change to start before oem-config.service seems correct but has no
> associated bug linked. This looks to me like it should still go through
> the SRU verification process because it's unrelated to the other
> changes. (Also, it's not 100% obvious that the change is correct: for
> example, why does oem-config not provide display-manager.service? Why
> are there no interdependencies between oem-config's systemd units and
> display-manager.service?)
>
> The source package as uploaded appears to have a lot of cruft in various
> __pycache__ directories. This ought to be cleaned up.
>
> I'm going to go ahead and reject based on the missing bug reference for
> the oem-config.service change. If you think this is wrong, feel free to
> ping me on IRC to discuss.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1778011
>
> Title:
> SRU: PRIME Power Saving mode draws too much power
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1778011/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: distribution=ubuntu; sourcepackage=gdm3; component=main;
> status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu;
> sourcepackage=nvidia-graphics-drivers-390; component=restricted; status=Fix
> Released; importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=nvidia-prime;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=nvidia-settings;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=ubuntu-drivers-common;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=gdm3; component=main; status=In Progress; importance=High;
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-graphics-drivers-390; component=restricted; status=In
> Progress; importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-prime; component=main; status=In Progress;
> importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-settings; component=main; status=In Progress;
> importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=ubuntu-drivers-common; component=main; status=In Progress;
> importance=High; ...

Read more...

monogato (luiscastro193) wrote :

I agree with #13

The problem is still there, switching to power saving mode doesn't save any power since the graphic card is always on anyway.

Alberto Milone (albertomilone) wrote :

@monogato: please give us time to get all the components into the -proposed repository first.

Alberto Milone (albertomilone) wrote :

On Wed, 15 Aug 2018 at 23:20, Steve Langasek <email address hidden>
wrote:

> Reviewing ubuntu-drivers-common in the queue, I notice:
>
> + if (!match) {
> + free(match);
>
> Surely no good can come of this call to free() and it should be omitted?
>

Nice catch. I think it was just debris, but it wouldn't have caused any
problem, since match could be either a valid string or NULL, and freeing a
NULL pointer results in a no-op. I have addressed this though.

>
> The change to start before oem-config.service seems correct but has no
> associated bug linked. This looks to me like it should still go through
> the SRU verification process because it's unrelated to the other
> changes. (Also, it's not 100% obvious that the change is correct: for
> example, why does oem-config not provide display-manager.service? Why
> are there no interdependencies between oem-config's systemd units and
> display-manager.service?)
>
>
I am not sure why oem-config does not provide display-manager.service, but
this change suits our needs, which I have now filed in a separate bug
report (LP: #1789201), and referenced in the changelog.

> The source package as uploaded appears to have a lot of cruft in various
> __pycache__ directories. This ought to be cleaned up.
>
>
This should not be a problem in my last upload.

--
Alberto Milone

My hardware: Probe URL: https://linux-hardware.org/?probe=572f1e3e6a

nvidia-fallback.service loads nouveau when I switched PRIME to Intel. I also see nouveau in `sensors` output. `systemctl disable nvidia-fallback` seems to cure the ptoblem, nouveau kernel module is not loaded any more and power cosumption _seems_ to be lower.

nvidia-fallback.service loads nouveau module even when it's blacklisted because this service starts after systemd loads kernel modules according to configs in /etc/modprobe.d/

Other PRIME fuctions work correctly except switching being much longer than it was before upgrading to bionic (18.04).

Can you please explain why is nvidia-fallback needed? It worked without it before.

Sorry, I have read above and understood why it's needed. I think prime-select can leave a dummy file somewhere and systemd service nvidia-fallback should be loaded when there is no this file written by prime-select.

Also, something, probably prime-select, adds nouveau.runpm=0 to GRUB_CMDLINE_LINUX_DEFAULT

$ cat `which prime-select` | grep nouveau.runpm
        boot_params['nouveau.runpm'] = '0'
                                 self._grub_path, ['nouveau.runpm', 'video=VGA'])

I don't understand why it does this, but I removed it , updated grub and everything works.

--- /tmp/nvidia-fallback.service.orig 2018-08-27 23:52:21.739079571 +0300
+++ /tmp/nvidia-fallback.service 2018-08-27 23:55:14.674338550 +0300
@@ -1,7 +1,8 @@
 [Unit]
-Description=Fall back on nouveau if nvidia is not loaded
+Description=Fall back on nouveau if nvidia is not loaded and PRIME not switched to integrated GPU
 Before=display-manager.service
 ConditionPathExists=!/sys/module/nvidia
+ConditionPathExists=!/etc/modprobe.d/blacklist-nvidia.conf

 [Service]
 Type=oneshot

Alberto Milone (albertomilone) wrote :

On Mon, 27 Aug 2018 at 23:01, Mikhail Novosyolov <email address hidden>
wrote:

> Can you please explain why is nvidia-fallback needed? It worked without
> it before.
>

I am trying to remove it with this SRU.

--
Alberto Milone

Is it already fix in proposed?

Hello Alberto, or anyone else affected,

Accepted nvidia-graphics-drivers-390 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-390/390.77-0ubuntu0.18.04.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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

Changed in nvidia-graphics-drivers-390 (Ubuntu Bionic):
status: Incomplete → Fix Committed
Steve Langasek (vorlon) wrote :

Hello Alberto, or anyone else affected,

Accepted nvidia-prime into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-prime/0.8.8.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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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 Bionic):
status: In Progress → Fix Committed
Steve Langasek (vorlon) wrote :

Hello Alberto, or anyone else affected,

Accepted nvidia-settings into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvidia-settings/390.77-0ubuntu0.18.04.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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

Changed in nvidia-settings (Ubuntu Bionic):
status: In Progress → Fix Committed
Brian Murray (brian-murray) wrote :

I'm still seeing cruft in _pycache_ with the latest upload of ubuntu-drivers-common.

I've done 2 tests on 2 different machines.

1) nvidia 960m, bionic-proposed: everything up to date except for ubuntu-drivers-common. Nvidia driver is working when selected with prime-select but switching to intel (prime-select intel) does not work. Nvidia is still running.

2) nvidia 970m, bionic-proposed: everything up to date. I installed ubuntu-drivers-common and nvidia-prime from Alberto's hybridgraphics ppa. Everything works correctly. Both nvidia and intel modes are working as expected. Nvidia card is now silent and cold (I have 2 separate fan for cpu/gpu) when intel is selected.

Maybe I should retry when ubuntu-drivers-common is updated in proposal?

Hope it helps.

Serhiy Zahoriya (xintx-ua) wrote :

nvidia-prime 0.8.8.1, everything else updated. After selecting intel and rebooting NVidia drivers still loaded.

tags: added: verification-failed-bionic
removed: verification-needed-bionic
Alberto Milone (albertomilone) wrote :

@Serhiy Zahoriya: sorry but ubuntu-drivers-common (1:0.5.2.1) doesn't seem to be in bionic-proposed yet. No wonder things failed.

tags: added: verification-needed-bionic
removed: verification-failed-bionic
Alberto Milone (albertomilone) wrote :

@Steve, Brian: I have re-uploaded ubuntu-drivers-common 1:0.5.2.1, now with code to prevent shipping the __pycache__ cruft. While running debdiff against 1:0.5.2 will still mention the cruft, if you run "lintian -v ubuntu-drivers-common_0.5.2.1.dsc --pedantic", lintian won't complain about "source-contains-prebuilt-python-object" any more.

I hope we can finally get ubuntu-drivers-common into bionic-proposed now, or verification for this bug report will keep failing.

ubname (ubname) wrote :

Hi Alberto,

is there a way to test if this works? Should I use the ppa 8they do not seems to be up to date(?)

thanks!

Timo Aaltonen (tjaalton) wrote :

Hello Alberto, or anyone else affected,

Accepted ubuntu-drivers-common into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.5.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 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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 Bionic):
status: In Progress → Fix Committed
Aurelijus Rinkevicius (odysei) wrote :

Hello,

I have pulled the updates from the -proposed (including ubuntu-drivers-common 1:0.5.2.1) and my gtx 1060 is roasting like a pig (intel is ON, so NVIDIA should be off). Pretty much no change on my end.

Are people with pre-Pascal seeing improvements? (Nouveau is in a better shape there)

Thanks.

Giraffe (dodger-forum) wrote :

Running a Quadro M2000M here.

ubuntu-drivers-common ver. 1:0.5.2.1 fixes the issue for me.

The dGPU fan is of and -according to powertop the dGPU draws zero power when using Intel iGPU.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Alberto Milone (albertomilone) wrote :

@Aurelijus: please follow these steps for testing:

1) Enable the bionic-proposed repositories

2) Create /etc/apt/preferences.d/proposed-updates with the following content:

Package: *
Pin: release a=bionic-proposed
Pin-Priority: 400

3) Update the list of packages:

sudo apt-get update

4) Install the packages from -proposed using the following command:

sudo apt install nvidia-driver-390/bionic-proposed gdm3/bionic-proposed ubuntu-drivers-common/bionic-proposed nvidia-prime/bionic-proposed nvidia-settings/bionic-proposed

description: updated
Thomas Rupprecht (ximex) wrote :

Should this also work with Kubuntu 18.04 with SDDM instead of GDM3?

@Thomas: sorry but support for Lightdm and SDDM will be available in the
next update.

On Thu, 20 Sep 2018 at 10:06, Thomas Rupprecht <
<email address hidden>> wrote:

> Should this also work with Kubuntu 18.04 with SDDM instead of GDM3?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1778011
>
> Title:
> SRU: PRIME Power Saving mode draws too much power
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1778011/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: distribution=ubuntu; sourcepackage=gdm3; component=main;
> status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu;
> sourcepackage=nvidia-graphics-drivers-390; component=restricted; status=Fix
> Released; importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=nvidia-prime;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=nvidia-settings;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=ubuntu-drivers-common;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=gdm3; component=main; status=Fix Committed; importance=High;
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-graphics-drivers-390; component=restricted; status=Fix
> Committed; importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-prime; component=main; status=Fix Committed;
> importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-settings; component=main; status=Fix Committed;
> importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=ubuntu-drivers-common; component=main; status=Fix Committed;
> importance=High; <email address hidden>;
> Launchpad-Bug-Tags: verification-done-bionic verification-needed
> Launchpad-Bug-Information-Type: Public
> Launchpad-Bug-Private: no
> Launchpad-Bug-Security-Vulnerability: no
> Launchpad-Bug-Commenters: albertomilone andrebrait brian-murray cantfind
> dodger-forum happy-snizzo ilvipero janitor luiscastro193 mikhailnov odysei
> sil2100 tjaalton ubname vorlon ximex xintx-ua
> Launchpad-Bug-Reporter: Alberto Milone (albertomilone)
> Launchpad-Bug-Modifier: Thomas Rupprecht (ximex)
> Launchpad-Message-Rationale: Subscriber
> Launchpad-Message-For: albertomilone
>

--
Alberto Milone

ubname (ubname) wrote :
Download full text (4.3 KiB)

I've try to test without success, also following Alberto's procedure #40 packages have dependencies problems:

Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "nvidia-driver-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "libnvidia-gl-390" per via di "nvidia-driver-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "nvidia-dkms-390" per via di "nvidia-driver-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "nvidia-kernel-source-390" per via di "nvidia-driver-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "libnvidia-compute-390" per via di "nvidia-driver-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "nvidia-compute-utils-390" per via di "nvidia-driver-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "libnvidia-decode-390" per via di "nvidia-driver-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "libnvidia-encode-390" per via di "nvidia-driver-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "nvidia-utils-390" per via di "nvidia-driver-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "xserver-xorg-video-nvidia-390" per via di "nvidia-driver-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "libnvidia-cfg1-390" per via di "xserver-xorg-video-nvidia-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "libnvidia-ifr1-390" per via di "nvidia-driver-390"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "libnvidia-fbc1-390" per via di "nvidia-driver-390"
Versione "3.28.3-0ubuntu18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "gdm3"
Versione "3.28.3-0ubuntu18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "libgdm1" per via di "gdm3"
Versione "3.28.3-0ubuntu18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "gir1.2-gdm-1.0" per via di "gdm3"
Versione "1:0.5.2.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "ubuntu-drivers-common"
Versione "0.8.8.1" (Ubuntu:18.04/bionic-proposed [all]) selezionata per "nvidia-prime"
Versione "390.77-0ubuntu0.18.04.1" (Ubuntu:18.04/bionic-proposed [amd64]) selezionata per "nvidia-settings"
Alcuni pacchetti non possono essere installati. Questo può voler dire
che è stata richiesta una situazione impossibile oppure, se si sta
usando una distribuzione in sviluppo, che alcuni pacchetti richiesti
non sono ancora stati creati o sono stati rimossi da Incoming.
Le seguenti informazioni possono aiutare a risolvere la situazione:

I seguenti pacchetti hanno dipendenze non soddisfatte:
 nvidia-driver-390 : Dipende: libnvidia-gl-390 (= 390.77-0ubuntu0.18.04.1) ma la versione 390.48-0ubuntu3 sta per essere installata
                     Dipende: libnvidia-compute-390 (= 390.77-0ubuntu0.18.04.1) ma la ...

Read more...

tags: added: verification-failed-bionic
removed: verification-done-bionic
Alberto Milone (albertomilone) wrote :

@ubname: installing the meta-package worked here, but you can install the single packages manually:

sudo apt install libnvidia-gl-390/bionic-proposed libnvidia-compute-390/bionic-proposed libnvidia-decode-390/bionic-proposed libnvidia-encode-390/bionic-proposed libnvidia-ifr1-390/bionic-proposed libnvidia-fbc1-390/bionic-proposed

You might have to do the same for the i386 dependencies.

tags: added: verification-needed-bionic
removed: verification-failed-bionic
description: updated
AaronMa (mapengyu) wrote :

after updated all the 5 packages below to new version, this issue seems fixed in my quick testing.

nvidia-driver-390 (390.77-0ubuntu0.18.04.1)
gdm3 (3.28.3-0ubuntu18.04.1)
ubuntu-drivers-common (1:0.5.2.1)
nvidia-prime (0.8.8.1)
nvidia-settings (390.77-0ubuntu0.18.04.1)

tags: added: verification-done-bionic
removed: verification-needed-bionic

Is this fix related to nvidia-390 only or will nvidia-396 from graphics-drivers/ppa benefit from it as well?

Alberto Milone (albertomilone) wrote :

I don't know if they updated the 396 packages to reflect my changes in
nvidia-390.

On Thu, 20 Sep 2018 at 22:00, Vlad Svitlichniy <email address hidden>
wrote:

> Is this fix related to nvidia-390 only or will nvidia-396 from graphics-
> drivers/ppa benefit from it as well?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1778011
>
> Title:
> SRU: PRIME Power Saving mode draws too much power
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1778011/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: distribution=ubuntu; sourcepackage=gdm3; component=main;
> status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu;
> sourcepackage=nvidia-graphics-drivers-390; component=restricted; status=Fix
> Released; importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=nvidia-prime;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=nvidia-settings;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=ubuntu-drivers-common;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=gdm3; component=main; status=Fix Committed; importance=High;
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-graphics-drivers-390; component=restricted; status=Fix
> Committed; importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-prime; component=main; status=Fix Committed;
> importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-settings; component=main; status=Fix Committed;
> importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=ubuntu-drivers-common; component=main; status=Fix Committed;
> importance=High; <email address hidden>;
> Launchpad-Bug-Tags: verification-done-bionic verification-needed
> Launchpad-Bug-Information-Type: Public
> Launchpad-Bug-Private: no
> Launchpad-Bug-Security-Vulnerability: no
> Launchpad-Bug-Commenters: albertomilone andrebrait brian-murray cantfind
> dodger-forum happy-snizzo ilvipero janitor luiscastro193 mapengyu
> mikhailnov odysei sil2100 tjaalton ubname vlad-svitlichniy vorlon ximex
> xintx-ua
> Launchpad-Bug-Reporter: Alberto Milone (albertomilone)
> Launchpad-Bug-Modifier: Vlad Svitlichniy (vlad-svitlichniy)
> Launchpad-Message-Rationale: Subscriber
> Launchpad-Message-For: albertomilone
>

--
Alberto Milone

tags: added: originate-from-1788575 somerville
Aurelijus Rinkevicius (odysei) wrote :

@Alberto I was assuming that this should also work with sddm (on Kubuntu), but apparently not out of the box. Is there already something to test there?

Mohammads (new-mohammads) wrote :

I was affected too, system info:
   Asus-K43SD:
    CPU: Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
    GPU: NVIDIA Corporation GF119M [GeForce 610M] (rev a1) - [GeForce 610M/PCIe/SSE2]
    OS: 18.04 x64

Test update, works perfectly. Switching between Intel & NVIDIA happens right after logging out and getting in again. But GDM3 gone crazy(i guess it's not stable yet) and freezes after few logging in/out.

Thank you for fix

Arthur Blair (adblair) wrote :

I installed the packages from -proposed as per the instructions and had two issues:

1. Steam fails to launch with NVIDIA due to a "glXChooseVisual failed" error, which some cursory Googling suggests is due to a lack of 32-bit libraries—perhaps this is expected.

2. After switching from NVIDIA to Intel and logging out, the first attempt to log in again would seem to fail and just return me to the login screen. A second attempt would then succeed and take me to the desktop. This didn't happen when switching in the other direction.

Alberto Milone (albertomilone) wrote :

@Aurelijus: not yet. I am going to add support for lightdm and for sddm in the next update.

Alberto Milone (albertomilone) wrote :

@Arthur: you probably need to install the 32 bit libraries manually from -proposed. Try with the following command:
sudo apt install libnvidia-gl-390:i386/bionic-proposed

as for 2), I would need some logs such as /var/log/gpu-manager.log after reproducing the problem.

Hello, I saw the request for testing from the article here:

http://albertomilone.com/blog/?p=670

I 'm running Ubuntu Mate 18.04 in a laptop with i5-7300hq and 1050ti.

I didn't know of the problems mentioned but I 'd taken to switching gpus from the command line with prime-select and rebooting because of minor problems with the nvidia application. I can run some tests and upload logs if needed.

The drivers I use are:

$ apt policy nvidia-390
nvidia-390:
  Installed: 390.87-0ubuntu0~gpu18.04.1
  Candidate: 390.87-0ubuntu0~gpu18.04.1
  Version table:
 *** 390.87-0ubuntu0~gpu18.04.1 500
        500 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm3 - 3.28.3-0ubuntu18.04.1

---------------
gdm3 (3.28.3-0ubuntu18.04.1) bionic; urgency=medium

  [ Iain Lane ]
  * New upstream release 3.28.3 (LP: #1786933):
    - CVE-2018-14424 - double free fix
      + 0001-display-store-Pass-the-display-object-rather-than-th.patch: Drop.
    - lifecycle fixes to libgdm/GdmClient
    - follow up fixes dealing with login screen reaping form last release
    - allow pam modules to use SIGUSR1 (LP: #1782152)
    - set PWD for user session
    - tell cirrus not to use wayland
  * Drop backported patches included in this release:
    - libgdm-drop-support-for-serializing-multiple-opens.patch
    - libgdm-fix-pointer-boolean-task-confusion.patch
    - libgdm-don-t-keep-manager-proxy-around-longer-than-we-nee.patch
    - libgdm-use-g_object_unref-instead-of-g_clear_object-for-w.patch
    - libgdm-get-connection-explicitly.patch
    - libgdm-Drop-weak-refs-on-the-GDBusConnection.patch
    - libgdm-Unref-the-manager-propagated-from-task.patch
    - libgdm-Don-t-double-ref-the-connection-got-from-task.patch
    - libgdm-Don-t-leak-connection-on-sync-re-authentication.patch
    - libgdm-Use-auto-pointers-and-cleanup-code.patch
    - libgdb-Try-to-reuse-connections-from-the-available-proxie.patch
    - libgdm-Don-t-save-manager-address.patch
    - libgdm-Return-NULL-on-invalid-client-instances.patch
    - daemon-gdm-session-record.c-open-close-the-utmp-database.patch

  [ Alberto Milone ]
  * ubuntu_nvidia_prime.patch:
    - Run scripts for Prime before and after Gdm sessions (LP: #1778011).

 -- Iain Lane <email address hidden> Fri, 17 Aug 2018 16:53:31 +0100

Changed in gdm3 (Ubuntu Bionic):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for gdm3 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.

Fred Vkigg (fvkigg) wrote :

Tested on Dell Precission 5520 with Ubuntu 18.04. This suffer from a consistently high power usage in the Intel (Power saving) mode.

Proposed Packages install fine. After reboot switching Prime profile did not seem applied with logout+login. Reboot was required. After a further 'apt upgrade' which pull in some new updated the Prime profile switch work with just a logout+login. I assume I got a gdm3 update which was required.

Looking at power graphs from the 'Power Statistics' tool i am getting much better power usage (first time under 10W). Thanks for the work. Will add a second comment if anything crops up after more usage.

ubname (ubname) wrote :

just to give some more feedback,
I have a optimus laptop with i7 Sandybridge and nvidia GT550M, there is a led that indicates the nvidia GPU is always in use also after using the proposed repos to test, the laptop is indeed very hot also after I select intel and reboot and the led indicates that the nvidia GPU is in use despite selecting intel.

For me the test is FAILED, i will not change the status, maybe this is a too old model and i'm out of luck.

Best regards.

Renato Bueno (renatoapdo) wrote :

Now I have problem with nvidia card. I Can't use external monitor and gnome-shell is using 100% of CPU all the time.

With intel, everything is Ok. Low battery usage as expected.

My system is a Dell Inspiron Gaming with intel i7-7700HQ and GeForce GTX 1050 Ti

Renato Bueno (renatoapdo) wrote :

Xorg.0.log using NVIDIA

Michal Hruby (mhr3) wrote :

Tested with Dell XPS 9560 and Ubuntu 18.04.

After installing the proposed packages and rebooting, everything booted correctly, although the nvidia driver was still loaded (I had my system set to use intel) and power use was quite high (~23W).

*But* after following the test case steps and switching to nvidia, reboot and then back to intel (after logout+login), everything seems good - the nvidia module isn't loaded, powertop reports ~12W and as a bonus reboot/shutdown is much faster (used to stall waiting for something GPUish).

Definitely much better than the LTS experience so far.

Luiz (lmfranco) wrote :

I am ubuntu on 18.04.1 LTS.

With intel integrated gpu things are normal. With my nvidia gpu occured two problems:

* I disabled login screen because it was creating two intances of Xorg and gnome-shell each. I can see these with top and nvidia-smi. It decreased cpu temps a lot even in idle time.

* the other is drop down fps while playing steam games. I create a session autostart script to enable prime synchronization on my external monitor. It solves drop down fps were sometimes unplayable.

that's the script: prime.sh ( gnome-session-properties add tool )

#!/bin/bash
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --output HDMI-1-1 --primary
xrandr --output eDP-1-1 --set "PRIME Synchronization" 0
xrandr --output HDMI-1-1 --set "PRIME Synchronization" 0

For some reason when I switch monitor from integrated notebook display to my external monitor, the prime synchronization doesn't occurs. One prove of that is mouse trail(while nvidia profile is loaded) and in games variation fps with drop down. sometimes over 60 others below 5fps.

Luiz (lmfranco) wrote :

Correction:

xrandr --output eDP-1-1 --set "PRIME Synchronization" 1
xrandr --output HDMI-1-1 --set "PRIME Synchronization" 1

Alberto Milone (albertomilone) wrote :

@Renato: I might have a fix for external display in 18.10. If it works correctly, I'll backport it to 18.04.

@Luiz: Gdm 3 creates one main X (or XWayland) session, and then starts an additional X for the user session. It's the default behaviour.

I suspect PRIME synchronisation is only meant to happen with the internal display by default. This is beyond the scope of this SRU though.

Mateusz Litwin (matlit) wrote :

Tested with MSI PE70 7RD ( Intel i7-7700HQ and GeForce GTX 1050 ) and Ubuntu 18.04 fresh install.

Proposed Packages install fine. Change of graphic with PRIME and log out/in working fast and without problem. Nvidia driver is not loaded in Power Saving Mode and power is OK ~10W idle. Led indicates that the nvidia GPU is off. Suspend and resume also works.

Thanks for the work.

Eduardo Larroya (zdv80) wrote :

Thanks a lot, it works very well in Ubuntu 18.04 with Xiaomi Air 13

Really appreciated :)

ubname (ubname) wrote :

I tested with i7 Broadwell and GTX 850M and I think it works. I'm sending the log also.

Unkraut (unkraut2) wrote :

I tested this on a Dell XPS 15 9570.
When using the kernel is 4.18.12-041812-generic, boot options: acpi_rev_override=5 acpi_osi=Linux scsi_mod.use_blk_mq=1 and selecting nvidia I don't get any graphical login.I have to switch to intel via the recovery root console.

When selecting intel, power consumption is between 8 and 9 W which means nvidia GPU is off.
After standby the screen is corrupted.

Unkraut (unkraut2) wrote :

Please add rollback instructions. I'm now stuck with a broken intel driver.

Download full text (3.2 KiB)

You are using 4.18.12-041812-generic, which is not a supported kernel. You
can uninstall the nvidia driver doing the following:

sudo apt-get --purge remove libnvidia* nvidia-*

On Sun, 7 Oct 2018 at 14:55, Unkraut <email address hidden> wrote:

> Please add rollback instructions. I'm now stuck with a broken intel
> driver.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1778011
>
> Title:
> SRU: PRIME Power Saving mode draws too much power
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/hwe-next/+bug/1778011/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: product=hwe-next; status=New; importance=Undecided;
> assignee=None;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=gdm3; component=main;
> status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu;
> sourcepackage=nvidia-graphics-drivers-390; component=restricted; status=Fix
> Released; importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=nvidia-prime;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=nvidia-settings;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=ubuntu-drivers-common;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=gdm3; component=main; status=Fix Released; importance=High;
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-graphics-drivers-390; component=restricted; status=Fix
> Committed; importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-prime; component=main; status=Fix Committed;
> importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=nvidia-settings; component=main; status=Fix Committed;
> importance=High; <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; distroseries=bionic;
> sourcepackage=ubuntu-drivers-common; component=main; status=Fix Committed;
> importance=High; <email address hidden>;
> Launchpad-Bug-Tags: originate-from-1788575 somerville
> verification-done-bionic verification-needed
> Launchpad-Bug-Information-Type: Public
> Launchpad-Bug-Private: no
> Launchpad-Bug-Security-Vulnerability: no
> Launchpad-Bug-Commenters: adblair albertomilone andrebrait brian-murray
> cantfind dodger-forum fvkigg happy-snizzo ilvipero janitor lmfranco
> luiscastro193 mapengyu matlit mhr3 mikhailnov new-mohammads nikperrakis
> odysei renatoapdo sil2100 tjaalton ubname unkraut2 vlad-svitlichniy vorlon
> ximex xintx-ua zdv80
> Launchpad-Bug-Reporter: Alberto Milone (albertomilone)
> Launchpad-Bug-Modifier: Unkraut (unkraut2)
> ...

Read more...

Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-drivers-common (1:0.5.2.1) bionic; urgency=medium

  * debian/rules:
    - Make sure to remove "__pycache__" directory.
  * debian/source/options:
    - Ignore the "__pycache__" directory.
  * gpu-manager.(c|py):
    - Set automatic pci power management when the dGPU is disabled (LP: #1778011).
    - Load the nvidia modules when switching to performance mode.
    - Do not skip unbound devices.
    - Make remove_prime_outputclass() void.
    - Report failures in enable_power_management().
    - Look for blacklisted modules in /lib/modprobe.d too.
    - Report failure when the nvidia modules cannot be unloaded,
      kill the main display session created by gdm3, and try
      unloading the nvidia modules once again.
  * gpu-manager.service:
    - Start before oem-config.service (LP: #1789201).

 -- Alberto Milone <email address hidden> Thu, 02 Aug 2018 15:45:42 +0200

Changed in ubuntu-drivers-common (Ubuntu Bionic):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-settings - 390.77-0ubuntu0.18.04.1

---------------
nvidia-settings (390.77-0ubuntu0.18.04.1) bionic; urgency=medium

  * New upstream release.
  * 08_add_prime_support.patch:
    - Recommend a simple log out (LP: #1778011).

 -- Alberto Milone <email address hidden> Thu, 02 Aug 2018 16:30:52 +0200

Changed in nvidia-settings (Ubuntu Bionic):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

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

---------------
nvidia-prime (0.8.8.1) bionic; urgency=medium

  [ Alberto Milone ]
  * 90-nvidia.conf,
    debian/rules,
    prime-select:
    - Make sure to remove the old blacklist file.
    - Use /lib for blacklist-nvidia.conf.
    - Do not check if prime is supported when disabling nvidia.
    - Enable KMS by default.
    - Install prime-switch again (LP: #1778011).
  * debian/nvidia-prime.nvidia-prime-boot.service:
    - Remove service.

  [ Alex Tu ]
    * prime-select: avoid regenerating the initramfs.

 -- Alberto Milone <email address hidden> Tue, 31 Jul 2018 16:47:20 +0200

Changed in nvidia-prime (Ubuntu Bionic):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-graphics-drivers-390 - 390.77-0ubuntu0.18.04.1

---------------
nvidia-graphics-drivers-390 (390.77-0ubuntu0.18.04.1) bionic; urgency=medium

  * New upstream release:
    - Improved compatibility with recent Linux kernels.
    - Fixed an intermittent hang of Vulkan applications running
      fullscreen when flipping is allowed.
    - Removed informational messages that were printed by nvidia-
      modeset.ko whenever a GPU device was allocated or freed.
    - Fixed a bug that caused kwin OpenGL compositing to crash when
      launching certain OpenGL applications.
  * debian/nvidia-kernel-common-390.nvidia-fallback.service,
    debian/templates/nvidia-kernel-common-flavour.nvidia-fallback.service.in,
    debian/rules,
    debian/rules.defs:
    - Remove nvidia-fallback.service, as loading nouveau can cause problems
      on hybrid systems (LP: #1778011).
    - Use https instead of http for the sources.

 -- Alberto Milone <email address hidden> Mon, 06 Aug 2018 15:55:41 +0200

Changed in nvidia-graphics-drivers-390 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Anton Alexandrenok (the-spyke) wrote :

After this change:

nvidia-prime (0.8.8.1) bionic; urgency=medium
 - Enable KMS by default

My external displays stopped working.
Ubuntu 18.04 (4.15.0-36-generic), nvidia-390.77, Lenovo ThinkPad P50 with NVIDIA M1000M.
I use Communitheme X session. Disabling KMS restores external displays.

Josh Holland (anowlcalledjosh) wrote :

Is there another bug I can follow to find out when LightDM will receive support for this update?

Alberto Milone (albertomilone) wrote :

@Anton: you are using gdm3, right? (you can check it with "ps aux | grep gdm")

@Josh: this bug report: LP: #1797147

Stefan Girstmair (djefo) wrote :

Hi Alberto,

I was having this issues for a long time and since I am not a very experienced user I thought to just wait for 18.10 and that it would be fixed there automatically. So today I upgraded and still face the same problem. I cannot even open the Nvidia x server settings. Could you maybe help me, as this is really annoying with the bad battery-life. Should I also follow your steps in 18.10 or is it somewhat different now?
I would really appreciate help :)

Best,
Stefan

PS: I would be happy to provide further information if neccessary

Stefan Girstmair (djefo) wrote :

Additional:

If I try sudo prime-select intel, this is what I get:

Info: selecting the intel profile
Failed to disable unit: Unit file nvidia-fallback.service does not exist.
Traceback (most recent call last):
  File "/usr/local/bin/prime-select", line 334, in <module>
    switcher.enable_profile(arg)
  File "/usr/local/bin/prime-select", line 124, in enable_profile
    self._trigger_prime_sock()
  File "/usr/local/bin/prime-select", line 183, in _trigger_prime_sock
    sock.connect(self._prime_sock_addr)
FileNotFoundError: [Errno 2] No such file or directory

I don't know what this means.

Best,
Stefan

Renato Bueno (renatoapdo) wrote :

Hi Alberto!

I was using Ubuntu 18.04 for a time, and today I decided do install Ubuntu 18.10 again e see if everything is fine. I did a clean installation but the problem persist and I can use external monitors

Do you have any tip?

Thanks man!

PS: Power consumption is very low now when nvidia is disabled. Show!

Renato Bueno (renatoapdo) wrote :

Xorg.0.log

Renato Bueno (renatoapdo) wrote :

Sory, I can't use external monitors

Do you have any tip?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers