How to enable coolbits when using video-hybrid-intel-nvidia-prime?

I’m using Manjaro KDE with X11 and I have dGPU as well as iGPU. I have installed the video-hybrid-intel-nvidia-prime driver. My monitor is connected to the iGPU and I’m using the dGPU (nvidia) only for processing (CUDA).

Now, I’m trying to use GWE (GreenWithEnvy) and apparently, it requires enabling coolbits before I can make any changes to the GPU settings. Reading online as well as here on this forum, I could not learn how to do it for a case like mine. Other distributions are applying their changes to the /etc/X11/xorg.conf which does not exist on Majnaro. And while I can understand (and appreciate) the replacement approach in Manjaro (i.e. using multiple files instead) but I cannot find where I need to make a change or the change to make.

I have tried the following command which is apparently not designed to be used in Manjaro:

$ sudo nvidia-xconfig --cool-bits=28

It creates the /etc/X11/xorg.conf file but then the system won’t boot. I’m assuming it’s messing with the rest of hardware settings. I also see other people asking very similar questions, but it seems not an exact match to my needs, i.e. using iGPU for display and dGPU for processing.

I appreciate it if someone could please help learn how to enable coolbits for my dGPU. Here are some info one my machine:

❯ inxi -Gazy
Graphics:
  Device-1: Intel RocketLake-S GT1 [UHD Graphics 750] vendor: ASUSTeK
    driver: i915 v: kernel arch: Gen-12.1 process: Intel 10nm built: 2020-21
    ports: active: DP-3 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2, HDMI-A-3
    bus-ID: 00:02.0 chip-ID: 8086:4c8a class-ID: 0300
  Device-2: NVIDIA GA102 [GeForce RTX 3090] vendor: PNY driver: nvidia
    v: 525.89.02 alternate: nouveau,nvidia_drm non-free: 525.xx+
    status: current (as of 2023-02) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 01:00.0
    chip-ID: 10de:2204 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.7 compositor: kwin_x11 driver: X:
    loaded: modesetting,nvidia unloaded: nouveau alternate: fbdev,nv,vesa
    dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2560x1440 s-dpi: 96 s-size: 677x381mm (26.65x15.00")
    s-diag: 777mm (30.58")
  Monitor-1: DP-3 model: Asus PB258 serial: <filter> built: 2018
    res: 2560x1440 hz: 60 dpi: 118 gamma: 1.2 size: 553x311mm (21.77x12.24")
    diag: 634mm (25") ratio: 16:9 modes: max: 2560x1440 min: 720x400
  API: OpenGL v: 4.6 Mesa 22.3.5 renderer: Mesa Intel Graphics (RKL GT1)
    direct-render: Yes
❯ head -n 999 /etc/X11/xorg.conf /etc/X11/xorg.conf.d/* /etc/X11/mhwd.d/*
head: cannot open '/etc/X11/xorg.conf' for reading: No such file or directory
==> /etc/X11/xorg.conf.d/00-keyboard.conf <==
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
EndSection

==> /etc/X11/xorg.conf.d/30-touchpad.conf <==
Section "InputClass"
    Identifier "touchpad"
    Driver "libinput"
    MatchIsTouchpad "on"
    Option "Tapping" "on"
EndSection

==> /etc/X11/xorg.conf.d/90-mhwd.conf <==
##
## Generated by mhwd - Manjaro Hardware Detection
##
 
 

==> /etc/X11/mhwd.d/nvidia.conf <==
##
## Generated by mhwd - Manjaro Hardware Detection
##

I guess it is this one:

/usr/share/X11/xorg.conf.d/10-intel-nvidia-drm-outputclass.conf

You need to copy it (since /usr/share will be overwritten on updates):

sudo cp /usr/share/X11/xorg.conf.d/10-intel-nvidia-drm-outputclass.conf /etc/X11/xorg.conf.d/10-intel-nvidia-drm-outputclass.conf

The edit it and add your coolbits to Nvidia section:

sudo nano /etc/X11/xorg.conf.d/10-intel-nvidia-drm-outputclass.conf

:notebook: I have no Nvidia card or a hybrid gpu, therefore it is a guess.

Thank you so much, @megavolt .

For the reference, this is the content of that file (with coolbit enabled):

❯ cat /etc/X11/xorg.conf.d/10-intel-nvidia-drm-outputclass.conf 


Section "ServerLayout"
    Identifier "layout"
    Option "AllowNVIDIAGPUScreens"
EndSection

Section "OutputClass"
    Identifier "intel"
    MatchDriver "i915"
    Driver "modesetting"
EndSection

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
    Option         "Coolbits" "28"
EndSection

Does this work as I was told nvidia does not read this file?
The file I was told it reads is /etc/X11/mhwd.d/nvidia.conf

I’m new to this but this is what I can see so far.

I don’t know if this counts or not. But so far, it seems it is making some changes.

Yes, but only if you run Nvidia only and not in hybrid mode with intel.

1 Like

For future reference…
You may want to bump the numbers.
The file load order is alpha-numerical.
So, for example, in my case I have /etc/X11/xorg.conf.d/99-amdgpu.conf. By using filename 99-* it is sure to be loaded last, and therefor take effect.

Hey @cscs , I don’t follow. Do you mean that right now, even though I can see the GWE provides me with the possibility of changing numbers, they are not really being applied? Because otherwise, I’m not sure what am I supposed to gain by changing from 10- to 99-!?

No, if it appears working, it should be working. “For future reference”. Sorry for any confusion.

Just checked and nvidia settings defaults to “/etc/X11/xorg.conf” which does not exist on my system.
Should I use this path?
It seems not to matter where in x11 it is but only “xorg.conf” as filename works.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.