Ubuntu 22, prime-select or nvidia X settings do not change the mode from on-demand to performance, rtx3060 laptop

Although I select performance mode from X Server settings or do prime-select nvidia, ubuntu still works with on-demand mode. This is very annoying since I need GPU all the time and causes freezes and lags. I now have to pretty much open every app by right-clicking and picking open with discrete gpu. So far, I have tried

  • Installing and Uninstalling drivers (I tried 525, 535 and 545 to no avail).
  • Picking on-demand first, then reboot then picking performance then reboot.
  • Hard reset.
  • Running ubuntu gpu-manager, (output is attached).

I did not want to reinstall ubuntu from scratch but this issue is really annoying. If that helps, the computer is run on dual-boot with windows installed alongside. Could this mess up the configuration in any capacity?

GPU manager outputs:


Section “OutputClass”
Identifier “Nvidia Prime”
MatchDriver “nvidia-drm”
Driver “nvidia”
Option “AllowEmptyInitialConfiguration”
Option “IgnoreDisplayDevices” “CRT”
Option “PrimaryGPU” “Yes”
ModulePath “/lib/x86_64-linux-gnu/nvidia/xorg”

The output of nvidia-bug report is also attached:

nvidia-bug-report.log (1.6 MB)

The Xorg logs look normal, the nvidia gpu being set as primary gpu. Your libraries seem broken though:

/usr/bin/nvidia-smi --query

Failed to initialize NVML: Driver/library version mismatch
NVML library version: 535.161

while the kernel modules are 535.154.05. Please check your driver install.

Thank you very much for your answer, I reinstalled the driver after purging the old ones using drivers-autoinstall and still keep having the same issue, unfortunately. I attached the new bug report where I don’t have the version mismatch. Although, the mode is selected as performance, it still tells me that no mode is selected, thus I still cannot run the computer on performance mode.
nvidia-bug-report.log (2.3 MB)

Btw, is it helps, this is the output of GPU-manager on terminal.

last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can’t access /opt/amdgpu-pro/bin/amdgpu-pro-px
Looking for nvidia modules in /lib/modules/6.5.0-21-generic/kernel
Looking for nvidia modules in /lib/modules/6.5.0-21-generic/kernel/nvidia-545
Looking for nvidia modules in /lib/modules/6.5.0-21-generic/kernel/nvidia-535srv
Looking for nvidia modules in /lib/modules/6.5.0-21-generic/kernel/nvidia-535
Found nvidia.ko module in /lib/modules/6.5.0-21-generic/kernel/nvidia-535/nvidia.ko
Looking for amdgpu modules in /lib/modules/6.5.0-21-generic/kernel
Looking for amdgpu modules in /lib/modules/6.5.0-21-generic/updates/dkms
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? no
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? yes
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? yes
Is amdgpu kernel module available? no
Vendor/Device Id: 1002:1638
BusID “PCI:4@0:0:0”
Is boot vga? yes
Vendor/Device Id: 10de:2520
BusID “PCI:1@0:0:0”
Is boot vga? no
Chassis type: “10”
Laptop detected
/etc/u-d-c-nvidia-runtimepm-override found. Will try runtimepm if the kernel supports it.
Linux 6.5 detected.
Is nvidia runtime pm supported for “0x2520”? yes
Trying to create new file: /run/nvidia_runtimepm_supported
Checking power status in /proc/driver/nvidia/gpus/0000:01:00.0/power
Runtime D3 status: Enabled (fine-grained)
Is nvidia runtime pm enabled for “0x2520”? yes
Trying to create new file: /run/nvidia_runtimepm_enabled
Found “/dev/dri/card0”, driven by “amdgpu”
output 0:
Number of connected outputs for /dev/dri/card0: 1
Skipping “/dev/dri/card0”, driven by “amdgpu”
Skipping “/dev/dri/card1”, driven by “nvidia-drm”
Skipping “/dev/dri/card0”, driven by “amdgpu”
Skipping “/dev/dri/card1”, driven by “nvidia-drm”
Skipping “/dev/dri/card0”, driven by “amdgpu”
Skipping “/dev/dri/card1”, driven by “nvidia-drm”
Does it require offloading? yes
last cards number = 2
Has amd? yes
Has intel? no
Has nvidia? yes
How many cards? 2
Has the system changed? No
Takes 0ms to wait for nvidia udev rules completed.
AMD IGP detected
NVIDIA hybrid system
Creating /usr/share/X11/xorg.conf.d/11-nvidia-prime.conf
Setting power control to “on” in /sys/bus/pci/devices/0000:01:00.0/power/control

Xorg logs and nvidia-smi tell that the nvidia gpu is primary, everything runs on it. There is no issue.

Thank you very much for your answer. I am still having issues here since even on performance mode I have to specifically choose nvidia driver when opening the applications (an ss is attached). Also, in the bug-report it says that because no mode is requested, it reverts to auto as:
No modes were requested; the default mode “nvidia-auto-select” will be used as the requested mode.

The ss:


If I do not explicitly pick this option, I get freezes and lags in my computer. Am I looking at a fresh ubuntu install here? Something seems to be off. Is there anything I can do further here?

This is the terminal output when I run the nvidia-settings form terminal.

This is about the mode the monitor is set to, i.e. its resolution. This is always displayed.

Is this still the case since now the driver setup seems to be clean. Please install the packages mesa-utils and vulkan-tools, the post the output of
glxinfo -B
vulkaninfo --summary

Thank you very much for your help and suggestions. These are my outputs from the commands that you asked me to run:


(base) ziya@ziya-ROG-Zephyrus-G14-GA401QM:~$ glxinfo -B
name of display: :1
display: :1 screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 6144 MB
Total available memory: 6144 MB
Currently available dedicated video memory: 5499 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 535.161.07
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 535.161.07
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 535.161.07
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Vulkan info summary:

(base) ziya@ziya-ROG-Zephyrus-G14-GA401QM:~$ vulkaninfo --summary
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to CreateInstance in ICD 2. Skipping ICD.


Vulkan Instance Version: 1.3.204

Instance Extensions: count = 20

VK_EXT_acquire_drm_display : extension revision 1
VK_EXT_acquire_xlib_display : extension revision 1
VK_EXT_debug_report : extension revision 10
VK_EXT_debug_utils : extension revision 2
VK_EXT_direct_mode_display : extension revision 1
VK_EXT_display_surface_counter : extension revision 1
VK_EXT_swapchain_colorspace : extension revision 4
VK_KHR_device_group_creation : extension revision 1
VK_KHR_display : extension revision 23
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2 : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_surface_protected_capabilities : extension revision 1
VK_KHR_wayland_surface : extension revision 6
VK_KHR_xcb_surface : extension revision 6
VK_KHR_xlib_surface : extension revision 6

Instance Layers: count = 4

VK_LAYER_INTEL_nullhw INTEL NULL HW 1.1.73 version 1
VK_LAYER_MESA_device_select Linux device selection layer 1.3.211 version 1
VK_LAYER_MESA_overlay Mesa Overlay layer 1.3.211 version 1
VK_LAYER_NV_optimus NVIDIA Optimus layer 1.3.242 version 1


apiVersion = 4206834 (1.3.242)
driverVersion = 2246590912 (0x85e841c0)
vendorID = 0x10de
deviceID = 0x2520
deviceName = NVIDIA GeForce RTX 3060 Laptop GPU
driverName = NVIDIA
driverInfo = 535.161.07
conformanceVersion =
deviceUUID = e9b89b43-bbd7-b8a9-c4c8-cf562765f579
driverUUID = b5f660c8-3cba-571e-9c79-09a437c5ef18
apiVersion = 4206847 (1.3.255)
driverVersion = 96477185 (0x5c02001)
vendorID = 0x1002
deviceID = 0x1638
deviceName = AMD Unknown (RADV RENOIR)
driverName = radv
driverInfo = Mesa 23.2.1-1ubuntu3.1~22.04.2
conformanceVersion =
deviceUUID = 00000000-0400-0000-0000-000000000000
driverUUID = 414d442d-4d45-5341-2d44-525600000000
apiVersion = 4206847 (1.3.255)
driverVersion = 1 (0x0001)
vendorID = 0x10005
deviceID = 0x0000
deviceName = llvmpipe (LLVM 15.0.7, 256 bits)
driverName = llvmpipe
driverInfo = Mesa 23.2.1-1ubuntu3.1~22.04.2 (LLVM 15.0.7)
conformanceVersion =
deviceUUID = 6d657361-3233-2e32-2e31-2d3175627500
driverUUID = 6c6c766d-7069-7065-5555-494400000000

Looks more or less correct. Which specific applications hangs when you don’t use the “run on discrete” switch?
Please post the output of

sudo cat /sys/module/nvidia_drm/parameters/modeset

This is the output.
sudo cat /sys/module/nvidia_drm/parameters/modeset

And which applications do misbehave?

Usually web browsers, chrome and opera specifically. I also use teams web app (chrome based) where during video calls it lags quite a lot. Also minor lags in pycharm sometimes. But still, I should not see the option to run them with discrete graphics since nvidia is always on during performance mode or am I mistaken? Btw, everything was working well a couple weeks ago I think something got broken somehow. Thank you very much for your help btw.

Btw, I did a fresh install of ubuntu but still have the same problem. Also tried it with wayland. But I still have lags especially on opera and still have to manually pick the gpu even in performance mode. Do you think this is a bug with the latest kernel update or something?

I rather suspect this to be an nvidia driver issue as the setup seems to be fine. Please try with the 550 driver, if not already in the standard ubuntu repo, use the graphics driver ppa.
Since this happens in chromium based browser, please check chrome://gpu in them, once started normally, once started with the “run on discrete gpu” switch used. Maybe some difference is noticeable.

Thank you very much for your quick response. I did upgrade ubuntu to 23.10 ans drivers to 550 yesterday. The lag and tearing are gone. It still asks me whether I want to run it with discrete graphics but performance is pretty much the same for both cases. I can live with this :D. I did the driver update on ubuntu 22.04 but it was the upgrade to 23.10 that did the trick. I cannot see prime settings on x server but can make the change with sudo prime-select though though I am not sure if the change is registered. This is not an exact solution but good enough for me hahaha.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.