You are not logged in.

#1 2021-09-29 16:30:19

Fingel
Member
Registered: 2009-02-28
Posts: 98

New Laptop with Nvidia GPU - Confused About Hybrid Options

Hello,

I recently upgraded my laptop to a Dell XPS 15 9510 after 7 years of using integrated intel graphics. One of the reasons I bought this laptop is because the display is not directly wired to the dGPU.

I don't think I want to be running on the dGPU all the time, even if I'm mostly plugged in. I'd prefer to run on Wayland as the experience is just much smoother, but not when using nvidia drivers. Also the laptop fails to resume from suspend often, with errors from Xorg like this:

Sep 29 08:38:26 eloso /usr/lib/gdm-x-session[5005]: (WW) NVIDIA(GPU-0): Failed to enter interactive mode.

Ideally, the Nvidia card would be disabled/powered off at all times until specifically needed. But at this point I'd be perfectly fine with disabling it outright.

The BIOS does not have any option to disable the dGPU.

I've gone through the Nvidia Optimus section of the wiki and I'm struggling a bit to understand my options.

The first thing I did was enable modesetting. I'm wondering if this was a mistake. Does this now mean my dGPU is going to be powered on and used immediately at boot?

I tried following the instructions for PRIME. I can run applications using prime-run, but it seems like the nvidia card is powered on an in use at all times anyway, even with the udev rules enabled:

$ nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.74       Driver Version: 470.74       CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| 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:01:00.0 Off |                  N/A |
| N/A   42C    P0    10W /  N/A |      4MiB /  3913MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2304      G   /usr/lib/Xorg                       4MiB |
+-----------------------------------------------------------------------------+

The next thing I'm going to try is Bumblebee, which says it is for "Optimus" laptops, though it seems a bit hacky and from what I can tell not officially supported by Nvidia.

Does anyone have any experience with a setup or laptop similar to this?

EDIT:

After installing bumblee, it does seem as if the dGPU is completely disabled. However, powertop now reports a discharge rate of 30w! This is up from about 15 with nvidia enabled. Are the intel GPUs still not effecient enough to run 4k displays?

Last edited by Fingel (2021-09-29 17:16:49)

Offline

#2 2021-09-30 05:08:24

Mr Victory
Member
Registered: 2021-06-10
Posts: 39

Re: New Laptop with Nvidia GPU - Confused About Hybrid Options

I am in a similar situation but I am also trying to figure out. Laptop with nvidia, GDM + Sway (both wayland).

This is my “hard way” of powering on and off:

/etc/modprobe.d/nvidia2.conf
install nvidia /bin/true

With this file above, any attempt to load nvidia module smoothly fails. Do not use the name nvidia.conf for this file.

/etc/modprobe.d/bbswitch.conf
options bbswitch load_state=0

/etc/modules-load.d/bbswitch
bbswitch

With these two, the card is powered off at boot.Requires bbswitch package. If I rename nvidia2.conf to something invalid eg nvidia2, nvidia driver loads. If want to disable the card again

rmmod - - force nvidia; mv /etc/modprobe.d/nvidia2 /etc/modprobe.d/nvidia2.conf

It should be a double dash without space.

Offline

#3 2021-09-30 08:47:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,650

Re: New Laptop with Nvidia GPU - Confused About Hybrid Options

The PRIME method will always keep a xorg process active, this is completely normal and expected, check your actual power draw, which you've already identified to be within reason when using PRIME. If you didn't combine bumblebee with bbswitch then the nvidia card will remain actually active and enabled and as the nvidia driver isn't loaded, the card will be stuck in a generic "active" mode that draws more power.

The Xorg process is there so that prime-run can work and the xorg server on the intel gpu and the nvidia card can communicate. If you do not have another active process (i.e. not just that xorg server) the nvidia card will effectively suspend and disable itself (technically it's based on a memory threshhold which afaik is 20MB by default, so as long as the required VRAM doesn't exceed 20MB the nvidia card will surmise it isn't actively used and suspend.

Last edited by V1del (2021-09-30 08:48:06)

Offline

#4 2021-09-30 16:19:33

Fingel
Member
Registered: 2009-02-28
Posts: 98

Re: New Laptop with Nvidia GPU - Confused About Hybrid Options

V1del wrote:

If you didn't combine bumblebee with bbswitch then the nvidia card will remain actually active and enabled and as the nvidia driver isn't loaded, the card will be stuck in a generic "active" mode that draws more power.

I think this is the mistake I've been seeing on other posts around the internet about this issue. Just because the kernel module isn't loaded doesn't mean the gpu is not powered on. Using Bumblee + bbswitch (I don't think bbswitch was actually working) I was drawing 30w on idle, despite using the iGPU for everything. Now I'm just using the Prime method and hovering around 15w. Not great but I can live with it.

Switching to using Wayland, even on Nvidia, seems to have solved the wake from suspend issues.

Offline

#5 2021-10-01 15:40:20

Vektor_98
Member
Registered: 2021-04-03
Posts: 24

Re: New Laptop with Nvidia GPU - Confused About Hybrid Options

Have you also added the module options via modprobe? https://wiki.archlinux.org/title/PRIME# … Management says you need to create a file for module options enabling the ultra power saving feature plus enabling the nvidia-persistenced service. If you do this, the GPU will fully power down and power on whenever needed.

Last edited by Vektor_98 (2021-10-01 15:41:52)

Offline

#6 2021-10-01 16:21:16

Fingel
Member
Registered: 2009-02-28
Posts: 98

Re: New Laptop with Nvidia GPU - Confused About Hybrid Options

Vektor_98 wrote:

Have you also added the module options via modprobe? https://wiki.archlinux.org/title/PRIME# … Management says you need to create a file for module options enabling the ultra power saving feature plus enabling the nvidia-persistenced service. If you do this, the GPU will fully power down and power on whenever needed.

Yes I've done that. I have yet to see the GPU fully power down though. Each time I've run nvidia-smi the output says that the card is running at between 9-12w. I'd assume if it was powering down it would use less than that.

Offline

#7 2021-10-01 16:29:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,650

Re: New Laptop with Nvidia GPU - Confused About Hybrid Options

Laptops often don't have the sensoric means to accurately present single device power draws. It's likely that the 9w on nvidia smi just reflect general usage rather than "this nvidia card by it's lonesome actually consumes that much" If the overall draw in powertop is within reason (you mention a 4k screen so I'd assumme the ~15w you get there is an accurate result)

Offline

#8 2021-10-01 17:31:33

Fingel
Member
Registered: 2009-02-28
Posts: 98

Re: New Laptop with Nvidia GPU - Confused About Hybrid Options

V1del wrote:

Laptops often don't have the sensoric means to accurately present single device power draws. It's likely that the 9w on nvidia smi just reflect general usage rather than "this nvidia card by it's lonesome actually consumes that much" If the overall draw in powertop is within reason (you mention a 4k screen so I'd assumme the ~15w you get there is an accurate result)

This is really good to know. I did find it somewhat odd that powertop would display a discharge rate of around 15w, and nvidia-smi would say about 10w. That would have meant that the nvidia GPU alone was responsible for two thirds of all power draw, which seems like too much.

Thank you for all your helpful insight!

Offline

Board footer

Powered by FluxBB