Score:0

Ubuntu Studio (22.04 LTS) - Can't switch from Intel HD 530 to Nvidia GTX 960m

ht flag

Model: Dell Inspiron 7559
CPU: Core i7 6700HQ
RAM: 12gb DDR3
Disks: 1 × m.2 SSD 500gb, 1 × SSD 1tb
Integrated: Intel HD 530
Dedicated: Nvidia GTX 960m (rev a2) 4gb DDR5

lilly@laptop:~$ inxi -G
Graphics:
  Device-1: Intel HD Graphics 530 driver: i915 v: kernel
  Device-2: NVIDIA GM107M [GeForce GTX 960M] driver: nvidia v: 525.60.13
  Device-3: Sunplus Innovation Integrated_Webcam_HD type: USB
    driver: uvcvideo
  Display: x11 server: X.Org v: 1.21.1.3 driver: X:
    loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa gpu: i915
    resolution: 1920x1080~60Hz
  OpenGL: renderer: Mesa Intel HD Graphics 530 (SKL GT2) v: 4.6 Mesa 22.0.5

On boot:

lilly@laptop:~$ nvidia-smi
Fri Jan 27 21:31:43 2023       
+---------------------------------------------+
| NVIDIA-SMI 525.60.13    Driver Version: 525.60.13    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:02:00.0 Off |                  N/A |
| N/A   50C    P8    N/A /  N/A |      4MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+---------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1512      G   /usr/lib/xorg/Xorg                  2MiB |
+---------------------------------------------+

Can turn this on with:

lilly@laptop:~$ sudo nvidia-smi -pm 1
[sudo] password for lilly: 
Enabled persistence mode for GPU 00000000:02:00.0.
All done.
lilly@laptop:~$ nvidia-smi
Fri Jan 27 21:35:23 2023       
+---------------------------------------------+
| NVIDIA-SMI 525.60.13    Driver Version: 525.60.13    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:02:00.0 Off |                  N/A |
| N/A   51C    P8    N/A /  N/A |      4MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+---------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1512      G   /usr/lib/xorg/Xorg                  2MiB |
+---------------------------------------------+

Don't know if you need this:

lilly@laptop:~$ nvidia-detect
Detected NVIDIA GPUs:
02:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 960M] [10de:139b] (rev a2)

Checking card:  NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
Your card is supported by all driver versions.
Your card is also supported by the Tesla drivers series.
Your card is also supported by the Tesla 470 drivers series.
It is recommended to install the
    nvidia-driver
package.

SOFTWARE:

  • 525 server driver (read that it has longer term support and is basically the same as the "normal" driver).
  • Nvidia X Server Settings
    • GPU Utilization: 0%
    • Video Utilization: 0%
    • Display Devices: None
  • About this System -- Info Center: "Graphics Processor: Mesa Intel® HD Graphics 530"
  • Steam, Wine, ProtonTricks, etc. I did get a Windows game to install/load, but apparently it's using the integrated graphics.

ATTEMPTED:

  • Installing the drivers manually, but Konsole suggested to go through the Driver Manager (did so; this was the first thing I did).
  • Installing Bumblebee (failed); it threw an error. I purged the PPA.
  • Different drivers from 510 to 525 variants via the Driver Manager. 510 freezes everything.
  • Tried the Nouveau driver. After that my KDE panels got a little wonky, but it still boots and runs the OS.
  • There's nowhere in Nvidia X Server Settings to switch graphics (does see the card though).
  • Like many others, there's no way to switch cards through the BIOS.
  • Secure Boot was turned off before installing the OS.
  • Have NOT tried "nouveau.modeset=0", didn't seem like I needed to from what I read about it; I didn't have any problems getting the laptop screen to work in general.
  • Tried updating the kernal; still no working dedicated card.

GOAL:

  • Main: Use dedicated graphics by default.

Just tell me the commands and stuff to post and I'll do it.

Help, please?

Edit 01/28/23: Per Request by @Pilot6 ...

lilly@laptop:~$ prime-select query
on-demand
Pilot6 avatar
cn flag
Please [edit] the question and add output of `prime-select query`
cc flag
Check what xrandr --listproviders outputs, and use env vars to switch if the nvidia is not the Sink Offload: e.g. __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia <progtorun>
Steven L avatar
ht flag
@ubfan1 That's a little foreign to me. I've managed to get by in Linux by following commands in guides, but I'm not entirely sure what I'm looking for in a lot of the stuff that I get from the terminal.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.