How to set coolbit value on Optimus laptops?

I want to overclock nVidia GPU
Unable to set Coolbit value ; which is required for overclocking nVidia GPU
System is an Optimus Laptop with iGPU and nVidia 1650

$ inxi -Faz
System:    Kernel: 5.10.67-1-lts x86_64 bits: 64 compiler: gcc v: 11.1.0 
           parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts root=UUID=cfc5be6d-df95-471b-9882-86b37af350b0 rw 
           rootflags=subvol=@ quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 
           systemd.unified_cgroup_hierarchy=1 resume=UUID=603b493e-9c6e-4365-b208-8641c338f69a loglevel=3 
           Desktop: KDE Plasma 5.22.5 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux 
Machine:   Type: Laptop System: Acer product: Nitro v: V1.33 serial: <filter> 
           Mobo: CFL model: Octavia_CFS v: V1.33 serial: <filter> UEFI: Insyde v: 1.33 date: 11/17/2020 
Battery:   ID-1: BAT1 charge: 43.5 Wh (100.0%) condition: 43.5/57.5 Wh (75.6%) volts: 16.7 min: 15.4 model: LGC AP18E8M 
           type: Li-ion serial: <filter> status: Full 
CPU:       Info: Quad Core model: Intel Core i5-9300H bits: 64 type: MT MCP arch: Kaby Lake note: check family: 6 
           model-id: 9E (158) stepping: A (10) microcode: EA cache: L2: 8 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 38400 
           Speed: 3635 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 3635 2: 3881 3: 3678 4: 3581 5: 3369 6: 3468 7: 3493 
           8: 3392 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: Acer Incorporated ALI driver: i915 v: kernel 
           bus-ID: 00:02.0 chip-ID: 8086:3e9b class-ID: 0300 
           Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: Acer Incorporated ALI driver: nvidia v: 470.63.01 
          alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:1f91 class-ID: 0300 
          Device-3: Chicony HD User Facing type: USB driver: uvcvideo bus-ID: 1-5:3 chip-ID: 04f2:b64f class-ID: 0e02 
         serial: <filter> 
          Display: x11 server: X.org 1.20.13 compositor: kwin_x11 driver: loaded: modesetting,nvidia **
          resolution: <missing: xdpyinfo>** 
           OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.2.1 direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel 
           alternate: snd_soc_skl,snd_sof_pci bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403 
           Device-2: NVIDIA vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus-ID: 01:00.1 chip-ID: 10de:10fa 
           class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.67-1-lts running: yes 
           Sound Server-2: JACK v: 1.9.19 running: no 
           Sound Server-3: PulseAudio v: 15.0 running: yes 
           Sound Server-4: PipeWire v: 0.3.35 running: no 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Acer Incorporated ALI driver: r8169 
           v: kernel port: 3000 bus-ID: 07:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: enp7s0 state: down mac: <filter> 
           Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: 3000 bus-ID: 08:00.0 chip-ID: 8086:2723 
           class-ID: 0280 
           IF: wlp8s0 state: up mac: <filter> 
           IF-ID-1: ipv6leakintrf0 state: unknown speed: N/A duplex: N/A mac: <filter> 
           IF-ID-2: proton0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-14:4 chip-ID: 8087:0029 class-ID: e001 
           Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends 
Drives:    Local Storage: total: 1.14 TiB used: 501.68 GiB (42.9%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron model: 2200 MTFDHBA256TCK size: 238.47 GiB block-size: 
           physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: P1MA003 temp: 50.9 C 
           scheme: GPT 
           ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM049-2GH172 size: 931.51 GiB block-size: physical: 4096 B 
           logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter> rev: ACM1 scheme: GPT 
Partition: ID-1: / raw-size: 229.41 GiB size: 229.41 GiB (100.00%) used: 34.37 GiB (15.0%) fs: btrfs dev: /dev/nvme0n1p2 
           maj-min: 259:2 
           ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 562 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 
           maj-min: 259:1 
           ID-3: /home raw-size: 229.41 GiB size: 229.41 GiB (100.00%) used: 34.37 GiB (15.0%) fs: btrfs dev: /dev/nvme0n1p2 
           maj-min: 259:2 
           ID-4: /var/log raw-size: 229.41 GiB size: 229.41 GiB (100.00%) used: 34.37 GiB (15.0%) fs: btrfs 
           dev: /dev/nvme0n1p2 maj-min: 259:2 
           ID-5: /var/tmp raw-size: 229.41 GiB size: 229.41 GiB (100.00%) used: 34.37 GiB (15.0%) fs: btrfs 
           dev: /dev/nvme0n1p2 maj-min: 259:2 
Swap:      Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3 
           ID-2: swap-2 type: zram size: 7.61 GiB used: 0 KiB (0.0%) priority: 100 dev: /dev/zram0 
Sensors:   System Temperatures: cpu: 49.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 282 Uptime: 45m wakeups: 1 Memory: 7.61 GiB used: 3.96 GiB (52.0%) Init: systemd v: 249 tool: systemctl 
           Compilers: gcc: 11.1.0 clang: 12.0.1 Packages: pacman: 1026 lib: 267 Shell: Bash v: 5.1.8 running-in: konsole 
           inxi: 3.3.06 

Looks like same problem but could not understand the proposed solution
https://web.archive.org/web/20210712144219/https://bbs.archlinux.org/viewtopic.php?id=257891

Is it safe/applicable for Garuda OS (no working solution)

In short setting coolbit using

sudo nvidia-xconfig  --cool-bits=8

causes xserver to crash and only way to access system is using tty3 (Ctrl+Alt+F3) and remove the .config file genrated by previous command

Firstly, does nvidia-smi work?

Secondly, look for an X configuration file under /etc/X11/xorg.d/ (or as /etc/X11/xorg.conf) and see what its contents is. If you have a file for the nvidia device then you can add Option "Coolbits" "8" into its [Device] section.

If not, you can create a minimal configuration file that also contains the coolbits option.

3 Likes

$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 63C P8 2W / N/A | 5MiB / 3911MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 2126 G /usr/lib/Xorg 4MiB |
±----------------------------------------------------------------------------+

In /etc/X11/xorg.conf.d there is a file named 10-optimus-manager.conf which I have not edited and contains

Section “Files”
ModulePath “/usr/lib/nvidia”
ModulePath “/usr/lib32/nvidia”
ModulePath “/usr/lib32/nvidia/xorg/modules”
ModulePath “/usr/lib32/xorg/modules”
ModulePath “/usr/lib64/nvidia/xorg/modules”
ModulePath “/usr/lib64/nvidia/xorg”
ModulePath “/usr/lib64/xorg/modules”
EndSection

Section “ServerLayout”
Identifier “layout”
Screen 0 “integrated”
Inactive “nvidia”
Option “AllowNVIDIAGPUScreens”
EndSection

Section “Device”
Identifier “integrated”
Driver “modesetting”
BusID “PCI:0:2:0”
Option “DRI” “3”
EndSection

Section “Screen”
Identifier “integrated”
Device “integrated”
EndSection

Section “Device”
Identifier “nvidia”
Driver “nvidia”
BusID “PCI:1:0:0”
Option “Coolbits” “28”
EndSection

Section “Screen”
Identifier “nvidia”
Device “nvidia”
EndSection

It already shows Coolbits 28


But not in Optimus section
So I can’t get overclcoking in optimus mode i.e, Screen Render by iGPU but games and cuda programs with overclocked nVidia GPU ?

This means the coolbits value is already set.

Why not?

What have you tried to overclock the dGPU?

Coolbit is set for nVidia only mode !

What should I try that wont crash xserver and overclock also for optimus mode ?

How are you trying to overclock the dGPU? What tool are you using? How do you know it doesn't work?

GreenWithEnvy says please enable coolbit

Are you running that on the iGPU or dGPU?

1 Like


optimus-manager shows Hybrid mode

According to the optimus-manager FAQ, you’ll need to use nvidia mode:

But then system uses nvidia card for screen composition also which degrades the performance in game as much as overclocking increases
Anways no other hacks or trick to overclock in hybrid mode ?

Then disable compositing when playing games or for full-screen windows? The DE/WM should take care of full-screen applications, unless you’re doing something “custom”.

(For example, Mutter in GNOME provides perfectly good performance for full-screen games.)

This question is taking the thread into a third topic, so it would be better to start a new thread.

3 Likes

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