It will load nvidia driver when swith to Intel mode

Bug #1798708 reported by Bin Li
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

We found the nvidia-prime will not run update-initramfs as before.
After switch to intel, then reboot I found the nvidia modules was loaded.

If I did S3 or close the lid, and resume back, the nvidia modules was removed, so the gnome session will be reloaded, you need to login again, all the opend applications in this session was gone.

nvidia-prime 0.8.8.1
linux 4.15.0-1021-oem
nvidia-driver-390 380.87-0ubuntu0~gpu18.04.1.
---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.4
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: u 2218 F.... pulseaudio
 /dev/snd/controlC0: u 2218 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
DistributionChannelDescriptor:
 # This is the distribution channel descriptor for the OEM CDs
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-sutton-bionic-amd64-20181018-40+sutton-mccarthy-bionic-amd64+iso
DistroRelease: Ubuntu 18.04
HibernationDevice: RESUME=UUID=2b45d917-3587-410f-9b94-f52eb082b7dc
InstallationDate: Installed on 2018-10-19 (0 days ago)
InstallationMedia: Ubuntu 18.04 "Bionic" - Build amd64 LIVE Binary 20181018-09:17
MachineType: LENOVO 20MEZ480US
NonfreeKernelModules: nvidia
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-1021-oem root=UUID=e68fa8d5-22f5-464b-9775-753b4ae159eb ro noprompt quiet splash acpi_osi=! acpi_osi=Linux-Lenovo-NV-HDMI-Audio vt.handoff=1
ProcVersionSignature: Ubuntu 4.15.0-1021.24-oem 4.15.18
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-1021-oem N/A
 linux-backports-modules-4.15.0-1021-oem N/A
 linux-firmware 1.173.1
Tags: bionic
Uname: Linux 4.15.0-1021-oem x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 10/04/2018
dmi.bios.vendor: LENOVO
dmi.bios.version: N2EET30W (1.12 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20MEZ480US
dmi.board.vendor: LENOVO
dmi.board.version: SDK0Q40104 WIN
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.modalias: dmi:bvnLENOVO:bvrN2EET30W(1.12):bd10/04/2018:svnLENOVO:pn20MEZ480US:pvrThinkPadP1:rvnLENOVO:rn20MEZ480US:rvrSDK0Q40104WIN:cvnLENOVO:ct10:cvrNone:
dmi.product.family: ThinkPad P1
dmi.product.name: 20MEZ480US
dmi.product.version: ThinkPad P1
dmi.sys.vendor: LENOVO

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1798708

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Bin Li (binli) wrote :

Here is the workaround.
$ prime-select intel # It will generate /lib/moprobe.d/blacklist-nvidia.conf

$ prime-select nvidia # It will removed /lib/moprobe.d/blacklist-nvidia.conf and add nvidia-kms.conf

$ update-initramfs -u

After that when you switch to intel, it won't load the nvidia driver in intel mode.

Revision history for this message
Bin Li (binli) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected bionic
description: updated
Revision history for this message
Bin Li (binli) wrote : CRDA.txt

apport information

Revision history for this message
Bin Li (binli) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Bin Li (binli) wrote : IwConfig.txt

apport information

Revision history for this message
Bin Li (binli) wrote : Lspci.txt

apport information

Revision history for this message
Bin Li (binli) wrote : Lsusb.txt

apport information

Revision history for this message
Bin Li (binli) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Bin Li (binli) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Bin Li (binli) wrote : ProcEnviron.txt

apport information

Revision history for this message
Bin Li (binli) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Bin Li (binli) wrote : ProcModules.txt

apport information

Revision history for this message
Bin Li (binli) wrote : PulseList.txt

apport information

Revision history for this message
Bin Li (binli) wrote : RfKill.txt

apport information

Revision history for this message
Bin Li (binli) wrote : UdevDb.txt

apport information

Revision history for this message
Bin Li (binli) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Hui Wang (hui.wang)
Changed in linux (Ubuntu):
importance: Undecided → Critical
tags: added: kernel-key
tags: added: kernel-da-key
removed: kernel-key
Revision history for this message
Bin Li (binli) wrote :

After the workaround in comment 2, I found the external monitor couldn't be used ThinkPad P1 and P72, it's a critical issue.

For normal user, they just switch from intel to nvidia, after that update-initramfs, the external monitor can't work.

Revision history for this message
Bin Li (binli) wrote :

After I removed the nvidia-kms.conf or change option "nvidia-drm modeset=0", then update initramfs, the external monitor will work fine.

Revision history for this message
Bin Li (binli) wrote :

Here is another workaround. When in Nvidia mode, do below commands.

First add/edit nvidia-kms.conf, comment out "options nvidia-drm modeset=1", it will fix the external monitor issue.

$ prime-select intel # It will generate /lib/moprobe.d/blacklist-nvidia.conf
$ update-initramfs -u

These will fix the nvidia or noveau loaded in intel mode.

Revision history for this message
Tim Richardson (tim-richardson) wrote :

The external monitor problem is probably a well-known gdm3 bug: gdm3 with nvidia modeset=1 stops the nvidia driver from detecting external monitors (possibly it invokes some wayland features when it shouldn't). It is not a problem with nvidia-prime or with the kernel. You can fix it by using lightdm instead of gdm3. This bug affects fedora as well.

ubuntu 19.04 has reverted to nvidia modeset = 0 be default to avoid this bug (at the cost of unfixable screen tearing for Optimus users in nvidia mode).

nvidia-prime does always include the nvidia modules in the initramfs kernel, this was a change in 18.10 backported to 18.04. Previous nvidia-prime pacakges used to rebuild initramfs to add or remove the module, but this is not required any longer. Choosing prime-select intel means the nvidia module is unloaded when the machine is starting.

Brad Figg (brad-figg)
tags: added: ubuntu-certified
tags: added: cscc
Revision history for this message
Anthony Wong (anthonywong) wrote :

Talked to Bin and he no longer has this issue, so I'm closing this bug.

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
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.