It's impossible to easily switch between integrated AMD GPU and dedicated NVIDIA card without rebooting

Bug #1875005 reported by Julien Olivier
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
mutter (Ubuntu)
Confirmed
Undecided
Unassigned
nvidia-graphics-drivers-440 (Ubuntu)
Confirmed
Undecided
Unassigned
xserver-xorg-video-amdgpu (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have a laptop with both AMD Raven and Nvidia GTX 1050 video adapters. I wanted to test the new game mode in Ubuntu 20.04, and noticed that only the AMD Raven actually works. To do the test, I tried launching a terminal and running gxgears, both in a normal way, and then using the "start using dedicated video adapter" (or whatever it really is in English) option in gnome-shell.

Using the standard video adapter (probably the AMD Raven), it works, but slowly.
Using the dedicated video adapter, I get the following:

juloliv@juloliv:~$ glxgears
X Error of failed request: BadValue (integer parameter out of range for operation)
  Major opcode of failed request: 152 (GLX)
  Minor opcode of failed request: 3 (X_GLXCreateContext)
  Value in failed request: 0x0
  Serial number of failed request: 25
  Current serial number in output stream: 26

NB: in both cases, I tried launching nvidia-settings and got the following:

juloliv@juloliv:~$ nvidia-settings

ERROR: Unable to load info from any available system

(nvidia-settings:9213): GLib-GObject-CRITICAL **: 12:33:29.270: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 12:33:29.273: PRIME: No offloading required. Abort
** Message: 12:33:29.273: PRIME: is it supported? no

And then a blank window...

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: xorg 1:7.7+19ubuntu14
ProcVersionSignature: Ubuntu 5.4.0-26.30-generic 5.4.30
Uname: Linux 5.4.0-26-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
.proc.driver.nvidia.gpus.0000.01.00.0: Error: [Errno 21] est un dossier: '/proc/driver/nvidia/gpus/0000:01:00.0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.suspend: suspend hibernate resume
.proc.driver.nvidia.suspend_depth: default modeset uvm
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 440.64 Fri Feb 21 01:17:26 UTC 2020
 GCC version: gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
BootLog: Error: [Errno 13] Permission non accordée: '/var/log/boot.log'
CasperMD5CheckResult: skip
CompositorRunning: None
CurrentDesktop: GNOME
Date: Sat Apr 25 12:26:50 2020
DistUpgraded: 2020-04-24 17:27:13,114 ERROR got error from PostInstallScript ./xorg_fix_proprietary.py (g-exec-error-quark: L’exécution du processus fils « ./xorg_fix_proprietary.py » a échoué (Aucun fichier ou dossier de ce type) (8))
DistroCodename: focal
DistroVariant: ubuntu
DkmsStatus: nvidia, 440.64, 5.4.0-26-generic, x86_64: installed
EcryptfsInUse: Yes
ExtraDebuggingInterest: Yes
GraphicsCard:
 Subsystem: ASUSTeK Computer Inc. GP107M [GeForce GTX 1050 Mobile] [1043:1bb1]
 Advanced Micro Devices, Inc. [AMD/ATI] Picasso [1002:15d8] (rev c2) (prog-if 00 [VGA controller])
   Subsystem: ASUSTeK Computer Inc. Picasso [1043:1bb1]
InstallationDate: Installed on 2020-02-07 (77 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
MachineType: ASUSTeK COMPUTER INC. VivoBook_ASUSLaptop X570DD_D570DD
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-26-generic root=UUID=decd423a-61f1-452c-bf0d-16b54ea1b5ad ro quiet splash nouveau.modeset=0 vt.handoff=7
SourcePackage: xorg
Symptom: display
UpgradeStatus: Upgraded to focal on 2020-04-24 (0 days ago)
dmi.bios.date: 06/28/2019
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: X570DD.300
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: X570DD
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrX570DD.300:bd06/28/2019:svnASUSTeKCOMPUTERINC.:pnVivoBook_ASUSLaptopX570DD_D570DD:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnX570DD:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
dmi.product.family: VivoBook
dmi.product.name: VivoBook_ASUSLaptop X570DD_D570DD
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.
nvidia-settings:
 ERROR: Unable to load info from any available system

 ERROR: Unable to load info from any available system
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.101-2
version.libgl1-mesa-dri: libgl1-mesa-dri 20.0.4-2ubuntu1
version.libgl1-mesa-glx: libgl1-mesa-glx 20.0.4-2ubuntu1
version.nvidia-graphics-drivers: nvidia-graphics-drivers-* N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.20.8-2ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20200226-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.16-1

Revision history for this message
Julien Olivier (julo) wrote :
Revision history for this message
Julien Olivier (julo) wrote :

PS: Forgot to say that I'm using nvidia-driver-440 installed through "additional drivers".

Revision history for this message
Julien Olivier (julo) wrote :
Revision history for this message
Julien Olivier (julo) wrote :

Actually, I’ve just found out that adding “Option “PrimaryGPU” “Yes”” to /usr/share/X11/xorg.conf.d/10-nvidia.conf made the 3D acceleration (and nvidia-settings) work! However, now, I have no way to switch between AMR Raven and GTX: it always uses the GTX.

affects: xorg (Ubuntu) → nvidia-graphics-drivers-440 (Ubuntu)
Revision history for this message
Julien Olivier (julo) wrote :

With the help of Nvidia support, I found out that disabling nvidia-persistenced makes it possible, now, to switch between Nvidia and AMD drivers (intel prime profile) by using prime-select. But this demands a reboot between each switch. And, after using "prime-select intel", gnome-shell's option to "start a program using the dedicated video adapter" isn't available anymore.

summary: - 3D acceleration not working with NVidia driver
+ Launching apps on the Nvidia GPU via PRIME does not work
summary: - Launching apps on the Nvidia GPU via PRIME does not work
+ [amdgpu] Launching apps on the Nvidia GPU via PRIME does not work
summary: - [amdgpu] Launching apps on the Nvidia GPU via PRIME does not work
+ [amdgpu] Launching apps on the Nvidia GPU via PRIME does not work (in
+ the presence of an integrated amgdpu)
tags: added: amdgpu nvidia
summary: [amdgpu] Launching apps on the Nvidia GPU via PRIME does not work (in
- the presence of an integrated amgdpu)
+ the presence of an integrated amdgpu)
Revision history for this message
Julien Olivier (julo) wrote : Re: [amdgpu] Launching apps on the Nvidia GPU via PRIME does not work (in the presence of an integrated amdgpu)

Daniel,

there are actually two bugs here: the first one being that 3D acceleration doesn't work out of the box using Ubuntu's installation of the Nvidia driver through "additional pilots": for that to work, you need to add “Option “PrimaryGPU” “Yes”” to /usr/share/X11/xorg.conf.d/10-nvidia.conf.

The second bug is that, once this configuration fixed, it's impossible to easily switch between integrated card and dedicated card without rebooting (either through prime-select or with the new gnome-shell's shortcut).

Let's say that this report is about the 2nd one, and I've opened a new report for the first one: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1875794

summary: - [amdgpu] Launching apps on the Nvidia GPU via PRIME does not work (in
- the presence of an integrated amdgpu)
+ [amdgpu] Nvidia driver doesn't work out of the box (installed through
+ Additional Drivers)
tags: added: hybrid
summary: - [amdgpu] Nvidia driver doesn't work out of the box (installed through
- Additional Drivers)
+ It's impossible to easily switch between integrated AMD GPU and
+ dedicated NVIDIA card without rebooting
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mutter (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers-440 (Ubuntu):
status: New → Confirmed
Changed in xserver-xorg-video-amdgpu (Ubuntu):
status: New → Confirmed
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.