You are not logged in.
Simple problem, i am currently using a Thinkpad with a 3070 Max-Q on it and i am using RTD3 on it for power usage reasons; But every time that i open a program on KDE Plasma, the program has a delay because it's waiting to the NVIDIA dGPU to be active even if it will not use it.
I attach a demo video about it.
https://i.ayaya.beauty/PKedsi.mp4
Using Wayland, with proprietary NVIDIA drivers (since NVIDIA Open ones doesn't work), mainline up to date kernel using with ibt=off as kernel parameter (to make the proprietary NVIDIA driver to work)
Thanks in advance. If i need to give more details, just say it
Last edited by Fijxu (2023-05-09 19:43:35)
Offline
Does it work if you are running an X session instead of wayland ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Does it work if you are running an X session instead of wayland ?
Woops, it works as intended, if i open System settings, the file manager, Firefox or the terminal under X, the GPU doesn't wake up. But for some reason, opening chromium turns on the dGPU (Under KDE Plama Wayland and X11, GNOME Wayland and X11) but i don't use it all the time, anyways is still kinda anoying.
I tried GNOME on Wayland and just some programs wake up (probably because they are using QT and not GTK, not sure) the dGPU, like Firefox and Chromium and Bottles (Probably becuase it uses vulkan and it's checking for GPUs)
I could use KDE X11 but i am using a HIDPI screen and it's very anoying to use X11 on it and also that Wayland is now going mainstream replacing X11.
Then i should change someting on mkinitcpio, modprobe, enviroment variables or what?
Thanks in advance
Last edited by Fijxu (2023-03-20 23:28:01)
Offline
firefox uses a small part of GTK3 plus their own renderer*, not QT .
Chromium and HW acceleration is not a good combo.
It could be a wayland compositor issue, does Bottles wakeup the dGPU on X ?
* used to be Gecko, but seems to be WebRender now ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Sorry for the late response..
It could be a wayland compositor issue, does Bottles wakeup the dGPU on X ?
Yes, it wakes up the GPU and then it suspend it after some seconds. I recently upgraded to the latest nvidia version 530.41.03 and it's still not fixed. Every graphical program in wayland wakes up the dGPU delaying the start up of them
Offline
I have exactly the same issue on a laptop with AMD iGPU and AMD dGPU (ASUS GA402RJ):
- In GNOME Wayland, opening any app wakes up the dGPU (D3cold->D0) for a few seconds, leading to a lag.
- In GNOME X11, the dGPU stays in D3cold as expected.
So far, I have no idea how to start fixing this, or even where to report it.
Offline
I also have this issue with an amd iGPU and nvidia dGPU. I've been looking for a solution for a while and can't find one.
Offline
The problem is .. nvidia
https://github.com/NVIDIA/libglvnd/blob … eration.md
Otherwise, if the environment variable __EGL_VENDOR_LIBRARY_DIRS is set, it is a colon-separated list of directories. Each directory in turn is scanned for files named *.json and the ICDs that they describe are loaded. Files in the same directory are loaded in strcmp() order, so 40_myvendor.json is considered to be higher-priority than 50_yourvendor.json.
If neither environment variable is set, GLVND behaves as though __EGL_VENDOR_LIBRARY_DIRS had been set to ${sysconfdir}/glvnd/egl_vendor.d:${datadir}/glvnd/egl_vendor.d, replacing ${sysconfdir} and ${datadir} with the values that were set when GLVND was compiled.
So in that directory (/usr/share/glvnd/egl_vendor.d/) when using an iGPU and Nvidia dGPU you have, for example in my case:
$ls /usr/share/glvnd/egl_vendor.d/
... 10_nvidia.json
... 50_mesa.json
10_nvidia.json will be used (see first quote paragraph), making some programs load the nvidia drivers (waking it up) and/or .so (libEGL_nvidia...blah) files even if is not going to be used. The solution/workaround in my case using wayland (KDE or sway) is to set those variables to the iGPU json file before calling the DE/WM, example of my .zprofile (I'm not using Login Manager)
export __EGL_VENDOR_LIBRARY_FILENAMES="/usr/share/glvnd/egl_vendor.d/50_mesa.json"
export __GLX_VENDOR_LIBRARY_NAME="mesa"
exec sway --unsupported-gpu > ~/.sway.log 2>&1
# exec startplasma-wayland
And when I want to use the nvidia I have to set the envs variables pointing to nvidia :
# a prime-run modified
__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/10_nvidia.json __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@"
gnome is the only one that I couldnt make it work with the workaround, gnome-shell keeps grabing the nvidia driver, maybe someone can figure it out how .
edit: mesa should be 00- and nvidia 99999999-
Last edited by gnox (2023-04-14 00:29:54)
Offline
The problem is .. nvidia
[...]
Thanks for your insights!
Removing the packages nvidia-utils and lib32-nvidia-utils, which provide in particular the EGL libraries you mention, solved the problem for me !
(Even though I have an AMD dGPU, I am using an Arch installation copied over from a system with a nvidia dGPU. I had deleted the nvidia driver but not all the nvidia packages.)
Offline
i've been also affected by this with intel/nvidia hybrid graphics, gnome/wayland. nearly every app i opened turned the nvidia into D0 state.
thanks for the hint gnox, i partially fixed it in /etc/environment
...
__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json:/usr/share/glvnd/egl_vendor.d/10_nvidia.json
...
i tested with 10 apps which previously turned the nvidia gpu into D0, now the gpu stays in D3cold state with these apps. chromium and freetube for example still wakes the gpu, but yeah...
Offline
Thanks gnox, it worked well without problems. Now programs don't try to power up the DGPU (except for Chromium based "apps" which is a pain in the ass, but i can live with it.) I will test it for some days, if i find other problem related to this i will report it here.
I will not mark this as [SOLVED] for now, since other people can have the same problem.
Btw, how i can check if my NVIDIA GPU is in D3Cold power state? Because using nvidia-smi wakes up the GPU.
Offline
Btw, how i can check if my NVIDIA GPU is in D3Cold power state? Because using nvidia-smi wakes up the GPU.
watch cat /sys/class/drm/card*/device/power_state
Offline