You are not logged in.

#1 2022-12-11 15:12:53

ECC83
Member
Registered: 2022-12-11
Posts: 21

Configuration of PRIME

Hello!
On my system with hybrid graphics (Intel 9th Gen CPU + Nvidia RTX, lts kernel and proprietary drivers for Nvidia GPU) Nvidia GPU never goes into D3 power state. PRIME has been configured according to ArchWiki so the lowest power state is expected when the GPU is not in use.
I've figured out that the Nvidia GPU (instead of the Intel one) is always used by the Xorg process.
Could anybody help me with proper configuration please?

Offline

#2 2022-12-11 15:28:01

seth
Member
Registered: 2012-09-03
Posts: 51,253

Online

#3 2022-12-11 17:34:47

ECC83
Member
Registered: 2022-12-11
Posts: 21

Re: Configuration of PRIME

seth wrote:

Here it is: https://termbin.com/qf0t

Last edited by ECC83 (2022-12-11 17:54:52)

Offline

#4 2022-12-11 19:59:04

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Configuration of PRIME

You're running on the intel chip and there's no output attached to the nvidia one.

systool -vm nvidia # to see whether NVreg_DynamicPowerManagement was applied (eg. if you've the module in the initramfs)

Did you monitor the power/control value?

cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/power/control

Online

#5 2022-12-11 21:13:20

ECC83
Member
Registered: 2022-12-11
Posts: 21

Re: Configuration of PRIME

seth wrote:

Did you monitor the power/control value?

cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/power/control

The output of this ia "auto".
But the cat /sys/class/drm/card1/device/power_state shows D0. And the same is for card0.

Offline

#6 2022-12-11 21:33:26

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Configuration of PRIME

Did you check the condition of NVreg_DynamicPowerManagement?
(Also inspect the system journal for related errors)

Online

#7 2022-12-11 21:58:39

ECC83
Member
Registered: 2022-12-11
Posts: 21

Re: Configuration of PRIME

I've set it as "0x02" via config file.

Offline

#8 2022-12-11 22:11:02

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Configuration of PRIME

I asked you to look whether that configuration is actually applied.
And in doubt, pass it to the kernel commandline.

Online

#9 2022-12-11 22:14:01

ECC83
Member
Registered: 2022-12-11
Posts: 21

Re: Configuration of PRIME

Ok then, could you tell me please how can I check it?

Offline

#10 2022-12-11 22:19:29

seth
Member
Registered: 2012-09-03
Posts: 51,253

Online

#11 2022-12-11 22:32:06

ECC83
Member
Registered: 2022-12-11
Posts: 21

Re: Configuration of PRIME

The output of systool -vm nvidia is:
Module = "nvidia"

  Attributes:
    coresize            = "55250944"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "7681"
    srcversion          = "16DD2AB6F8E16BF9E137E59"
    taint               = "POE"
    uevent              = <store method only>
    version             = "520.56.06"

  Sections:

Offline

#12 2022-12-12 08:18:13

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Configuration of PRIME

Please use code tags, https://bbs.archlinux.org/help.php#bbcode

Either the parameter isn't set or the module principally doesn't report parameters.
Please post your system journal and

seth wrote:

in doubt, pass it to the kernel commandline

nvidia.NVreg_DynamicPowerManagement=0x02

https://wiki.archlinux.org/title/Kernel_parameters

Online

#13 2022-12-14 16:57:16

ECC83
Member
Registered: 2022-12-11
Posts: 21

Re: Configuration of PRIME

Sorry for the delay with answer.

Here is the output of # systool -v -m nvidia .
Here is the output of # journalctl -b | grep nvidia .

seth wrote:

in doubt, pass it to the kernel commandline

Also I dont know If I passed the parameter correctly. I've tried it with sysctl and with modprobe .

Offline

#14 2022-12-14 17:08:59

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Configuration of PRIME

"system journal" - not "grep"
You want to add "nvidia.NVreg_DynamicPowerManagement=0x02" to the kernel commandline to make sure it's applied, sysctl won't work, modprobe.d might, modprobe (likely) won't (because you may reasonably fail to unload the module)

Online

#15 2022-12-14 17:22:39

ECC83
Member
Registered: 2022-12-11
Posts: 21

Re: Configuration of PRIME

Here is # journalctl -b.

seth wrote:

You want to add "nvidia.NVreg_DynamicPowerManagement=0x02" to the kernel commandline to make sure it's applied, sysctl won't work, modprobe.d might, modprobe (likely) won't (because you may reasonably fail to unload the module)

Could you please explain then how to do it?

Offline

#16 2022-12-14 17:32:36

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Configuration of PRIME

Edit: from the journal the nvidia module looks very much to be in the initramfs, so this is relevant.

Last edited by seth (2022-12-14 17:36:39)

Online

#17 2022-12-14 17:43:27

ECC83
Member
Registered: 2022-12-11
Posts: 21

Re: Configuration of PRIME

seth wrote:

Edit: from the journal the nvidia module looks very much to be in the initramfs, so this is relevant.

I'e read this. It looks like I don't have solid understanding of the process anyway. For example I have no idea why the config file from /etc/modprobe.d/ has no effect.
Conserning initramfs: I've added  to /etc/mkinitcpio.conf   MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm).

Last edited by ECC83 (2022-12-14 17:48:59)

Offline

#18 2022-12-14 20:07:50

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Configuration of PRIME

I've added  to /etc/mkinitcpio.conf   MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm).

Which is why the settings in modprobe.d won't apply until you recreate the initramfs.
That's why I repeatedly told you to utilize the kernel commandline, because it makes the exact want and point when the module is loaded irrelevant.

Online

#19 2022-12-15 15:25:53

ECC83
Member
Registered: 2022-12-11
Posts: 21

Re: Configuration of PRIME

seth wrote:

I've added  to /etc/mkinitcpio.conf   MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm).

Which is why the settings in modprobe.d won't apply until you recreate the initramfs.
That's why I repeatedly told you to utilize the kernel commandline, because it makes the exact want and point when the module is loaded irrelevant.

Actually I've recreated it right after editing of mkinitcpio.conf by running # mkinitcpio -P . All the data I posted earlier here by your requests were provided after that.

Last edited by ECC83 (2022-12-15 15:26:41)

Offline

#20 2022-12-15 15:49:21

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Configuration of PRIME

cat /proc/driver/nvidia/gpus/0000:01:00.0/power

Online

#21 2022-12-15 18:13:02

ECC83
Member
Registered: 2022-12-11
Posts: 21

Re: Configuration of PRIME

seth wrote:
cat /proc/driver/nvidia/gpus/0000:01:00.0/power

Here it is.
Also cat /sys/class/drm/card1/device/power_state gives D0.

Offline

#22 2022-12-15 20:04:42

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Configuration of PRIME

Runtime D3 status:          Enabled (fine-grained)

So the parameter applied, what does nvidia-smi actually report about the consumers?
(It is normal that Xorg "uses" the nvidia GPU, after all it's available for prime, but it should™ not tax it at all unless you're prime-running something or maybe nvidia-settings or nvidia-smi excessively poll the GPU)

Online

#23 2022-12-16 13:07:36

ECC83
Member
Registered: 2022-12-11
Posts: 21

Re: Configuration of PRIME

seth wrote:
Runtime D3 status:          Enabled (fine-grained)

So the parameter applied, what does nvidia-smi actually report about the consumers?
(It is normal that Xorg "uses" the nvidia GPU, after all it's available for prime, but it should™ not tax it at all unless you're prime-running something or maybe nvidia-settings or nvidia-smi excessively poll the GPU)

The nvidia-smi reports this. I know it's far from maximum power consumption. But according to the wiki: "it is possible to fully power down the GPU when not in use". Which is not the case. That's why I think maybe I missed somesthing.

Offline

#24 2022-12-16 13:10:48

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

Re: Configuration of PRIME

nvidia-smi will implicitly poke the GPU afaik and in general sensor listings on laptops are unreliable because normally not available distinctly for each piece of HW. What is your power draw in powertop? If the overall draw is within reason then this isn't further problematic. If the 7W you see there is the whole consumption then the GPU is basically turned off and the 7W just a general report.

Offline

#25 2022-12-16 13:43:04

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: Configuration of PRIME

You could also try to deactivate the persistenced and

Dec 14 20:16:01 ECC83 systemd-udevd[440]: nvidia_drm: Process '/bin/chgrp wheel /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.
Dec 14 20:16:01 ECC83 systemd-udevd[440]: nvidia_drm: Process '/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.
Dec 14 20:16:01 ECC83 systemd-udevd[324]: nvidia_modeset: Process '/bin/chgrp wheel /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.
Dec 14 20:16:01 ECC83 systemd-udevd[324]: nvidia_modeset: Process '/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.
Dec 14 20:16:01 ECC83 systemd-udevd[442]: nvidia_uvm: Process '/bin/chgrp wheel /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.
Dec 14 20:16:01 ECC83 systemd-udevd[442]: nvidia_uvm: Process '/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.
Dec 14 20:16:01 ECC83 systemd-udevd[380]: nvidia: Process '/bin/chgrp wheel /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.
Dec 14 20:16:01 ECC83 systemd-udevd[380]: nvidia: Process '/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.
…
Dec 14 20:16:02 ECC83 systemd-udevd[334]: nvidia-nvswitch: Process '/bin/chgrp wheel /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.
Dec 14 20:16:02 ECC83 systemd-udevd[334]: nvidia-nvswitch: Process '/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.
Dec 14 20:16:02 ECC83 systemd-udevd[440]: nvidia: Process '/bin/chgrp wheel /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.
Dec 14 20:16:02 ECC83 systemd-udevd[440]: nvidia: Process '/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness' failed with exit code 1.

whatever that mess is.

Online

Board footer

Powered by FluxBB