You are not logged in.

#26 2022-12-17 08:12:28

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

Re: Configuration of PRIME

seth wrote:

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.
…

whatever that mess is.

I've deactivated persistenced and "that mess". Nothing changed. By the may the "mess" is caused by udev rule listed at the end of this section on ArchWiki.

Offline

#27 2022-12-17 08:38:58

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Configuration of PRIME

The factual accuracy of this article or section is disputed.

And the rule doesn't test for the presence for the device; while unrelated, is there even /sys/class/backlight/intel_backlight ?

Since this is a "gaming notebook", have you looked around the BIOS for suspicious features?
The BIOS also might be dated and I'd link you an update, but I just figured that ASUS HAS THE MOST SHITTY AND USELESS WEB PRESENCE IMAGINABLE that keeps redirecting me to an empty, generic hub…

Edit: do you btw. get the GPU into D3 within the multi-user.target?

Last edited by seth (2022-12-17 09:15:24)

Online

#28 2022-12-17 09:29:12

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

Re: Configuration of PRIME

seth wrote:

And the rule doesn't test for the presence for the device; while unrelated, is there even /sys/class/backlight/intel_backlight ?

Yes, there is. The point is I use the light program to change screen brightness so the rule is needed. But there are alternatives anyway.

seth wrote:

but I just figured that ASUS HAS THE MOST SHITTY AND USELESS WEB PRESENCE IMAGINABLE that keeps redirecting me to an empty, generic hub…

Truly said.

seth wrote:

Since this is a "gaming notebook", have you looked around the BIOS for suspicious features?
do you btw. get the GPU into D3 within the multi-user.target?

No, I haven't. I'll check this out.

Offline

#29 2022-12-17 16:35:51

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

Re: Configuration of PRIME

seth wrote:

Since this is a "gaming notebook", have you looked around the BIOS for suspicious features?
Edit: do you btw. get the GPU into D3 within the multi-user.target?

So I did a little research and found out that: 1) BIOS hasn't any suspicious features, 2) even without running xorg (if I've understood you correctly) everything stays pretty much the same.
First I tried the

 cat /sys/class/drm/card1/device/power_state 

command which returned D0, then the

 nvidia-smi 

command  which reported that there are no any processes.

Offline

#30 2022-12-17 16:52:54

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Configuration of PRIME

At this point you should really try whether the GPU actually doesn't power down or this is just incorrectly reported, https://bbs.archlinux.org/viewtopic.php … 4#p2074024
You can also compare the powertop report when (I assume you're able to) deactivating the GPU in the BIOS.

Online

#31 2022-12-27 13:50:51

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

Re: Configuration of PRIME

Here is the story. Unfortunately it's not possible to deactivate GPU in BIOS. I measured power consumtion via

# powertop

anyway and mean result was 23.9W. Power state was D0.
Then I deleted nvidia modules from /etc/mkinitcpio.conf then executed

 # mkinitcpio -P 

and rebooted after and the

cat /sys/class/drm/card1/device/power_state 

command returned D3Cold.
Then I measured power consumption again and mean result was 13.7W.
But the problem is that after another reboot power state is D0 again! I'm out of any ideas.

Offline

#32 2022-12-27 14:36:05

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Configuration of PRIME

Is arch the only OS, is there a parallel windows installation?
What if you add

acpi_osi=! acpi_osi="Windows 2009"

to the kernel parameters?
https://wiki.archlinux.org/title/Kernel_parameters (edit the commandline at your bootloader in case the system fails to boot with that - not likely, but still)

Online

#33 2022-12-27 14:54:12

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

Re: Configuration of PRIME

seth wrote:

Is arch the only OS, is there a parallel windows installation?

Arch is the only OS. Do I need to add the kernel parameter anyway?

Last edited by ECC83 (2022-12-27 14:55:12)

Offline

#34 2022-12-27 15:02:32

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Configuration of PRIME

Yes, the kernel parameter lies to the BIOS and tells it that you're actually booting windows (some BIOS test for that)
The parallel installation might have gotten you into the fast-start trap (3rd link below, but it's obviously irrelevant if there's no parallel windows)

Online

#35 2022-12-28 14:11:23

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

Re: Configuration of PRIME

Ok, so I added the kernel parameter. Looks like it worked finally. At least for a few last power on-off cycles. Thanks for your help, seth. I'll update info in the next few days if everything is fine.

Offline

#36 2023-01-08 12:43:00

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

Re: Configuration of PRIME

I've collected some statistics since my last post. The behavior of the system is kind of strange. About 0.75 of all poweron-off cycles everything is fine, the power state of the card is D3 while not under load. However the rest quarter is that the power state of the card is D0 right after the system is loaded and remains such until next reboot. Sometimes I have to reboot it twice.

Offline

#37 2023-01-08 13:33:43

seth
Member
Registered: 2012-09-03
Posts: 49,981

Online

#38 2023-01-14 06:26:01

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

Re: Configuration of PRIME

seth wrote:

Sounds like a race condition, are you using https://wiki.archlinux.org/title/NVIDIA#Early_loading ?

No, I'm not.
Also I've updated the system but behavior remains the same anyway.

Offline

#39 2023-01-14 08:09:33

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Configuration of PRIME

Then try to move i915 and the nvidia modules into the initramfs to make sure they're loaded when the graphical.target kicks in and see what impact that has on the reliability of the behavior.
For nvidia, also see the pacman hooks (you'll have to rebuild the initramfs if the out-of-tree driver version bumps)

Online

#40 2023-01-14 08:31:43

gulafaran
Member
Registered: 2011-02-09
Posts: 22

Re: Configuration of PRIME

i guess worth knowing is that there is quite a lot of things that probe the gpu/driver that will wake it up. lspci, xrandr, vulkan iterating devices like launching a game, nvidia-smi, nvidia-settings. etc etc. so make sure you are not running some kind of widget or conky script keeping it awake all the time. even launching chromium wakes up my card for a while. even tho i have gone to great lenghts making sure my amdgpu is preffered by setting all these environment variables https://gist.github.com/gulafaran/9a93a … db206aca62 and then modifyed the bash script usr/bin/prime-run to reverse those variables. this is the udev rule i setup https://gist.github.com/gulafaran/797ca … 7d23add928 disable all the things, and ensure power control is set to auto. and im also running nvidia-persistenced, been a while so i dont remember the exact bits why i needed it but i do recall i couldnt get something to work without it. ive recently abandoned Xorg and started using wayland and had better success with keeping it in powered off mode until i need it. dont have my convulated xorg.conf around anymore but it took some fiddling to get that right aswell.

the nvidia readme has lots of valuable information regarding PRIME and other things https://download.nvidia.com/XFree86/Lin … 11/README/

Last edited by gulafaran (2023-01-14 08:39:14)

Offline

#41 2023-01-22 15:48:56

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

Re: Configuration of PRIME

So here is final solution which works for me: all settings according to Wiki plus i915 module at initrams (but no nvidia ones). This combination leads to D3cold state until something wakes up the card.
Thanks for your help everyone and special thanks to seth.
The thread can be closed.

Offline

Board footer

Powered by FluxBB