[SOLVED] How to get coolbits working with 20.2.1

Ive installed manjaro 20.2.1 on a laptop with geforce 940m gpu.
However the usual nvidia.conf file in mhwd.d is empty and populating it with “sudo nvidia-xconfig --cool-bits 12 -o /etc/X11/mhwd.d/nvidia.conf” results in black screen upon reboot.

Having any kind of xorg.conf file whether in xorg.d or mhwd.d or X11 folder is preventive to gui showing up.

I want to underclock this laptop so i need coolbits but can’t get a working config is there any logs i can give to help everyone help me?

Btw im new to manjaro.

Maybe a minimal configuration works better? Something like this:

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 "nvidia"
EndSection

Section "Device"
	Identifier "nvidia"
	Driver "nvidia"
	Option "Coolbits" "12"
EndSection

Section "Screen"
	Identifier "nvidia"
	Device "nvidia"
	Option "AllowEmptyInitialConfiguration"
EndSection

Didnt work still stuck with a black screen.
If it helps Sddm in “journalctl -b” says: “failed to read display number from pipe”

Can you post the latest Xorg log? It’s probably in /var/log/.

here’s latest xorg.0.log:

[    23.590] (--) Log file renamed from "/var/log/Xorg.pid-1972.log" to "/var/log/Xorg.0.log"
[    23.590] 
X.Org X Server 1.20.10
X Protocol Version 11, Revision 0
[    23.590] Build Operating System: Linux Manjaro Linux
[    23.590] Current Operating System: Linux Razinal-NB 5.11.0-1-MANJARO #1 SMP PREEMPT Mon Jan 4 05:04:59 UTC 2021 x86_64
[    23.590] Kernel command line: BOOT_IMAGE=/@/boot/vmlinuz-5.11-x86_64 root=UUID=f6749f9b-1222-4b2c-bfe1-fe7173bb2fd9 ro rootflags=subvol=@ quiet udev.log_priority=3 resume=/dev/disk/by-uuid/6cb04bf1-ed5f-4c06-979f-e7c8b710f4b1
[    23.590] Build Date: 16 December 2020  10:33:32PM
[    23.590]  
[    23.590] Current version of pixman: 0.40.0
[    23.590] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[    23.590] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    23.590] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Jan 10 07:59:21 2021
[    23.591] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    23.591] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    23.591] (==) ServerLayout "layout"
[    23.591] (**) |-->Screen "nvidia" (0)
[    23.591] (**) |   |-->Monitor "<default monitor>"
[    23.591] (**) |   |-->Device "nvidia"
[    23.591] (==) No monitor specified for screen "nvidia".
	Using a default monitor configuration.
[    23.591] (==) Automatically adding devices
[    23.591] (==) Automatically enabling devices
[    23.591] (==) Automatically adding GPU devices
[    23.591] (==) Automatically binding GPU devices
[    23.591] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    23.591] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[    23.591] 	Entry deleted from font path.
[    23.591] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[    23.591] 	Entry deleted from font path.
[    23.591] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[    23.591] 	Entry deleted from font path.
[    23.591] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[    23.591] 	Entry deleted from font path.
[    23.591] (==) FontPath set to:
	/usr/share/fonts/misc,
	/usr/share/fonts/TTF
[    23.591] (**) ModulePath set to "/usr/lib/nvidia,/usr/lib32/nvidia,/usr/lib32/nvidia/xorg/modules,/usr/lib32/xorg/modules,/usr/lib64/nvidia/xorg/modules,/usr/lib64/nvidia/xorg,/usr/lib64/xorg/modules,/usr/lib64/nvidia/xorg,/usr/lib64/nvidia"
[    23.591] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[    23.591] (II) Module ABI versions:
[    23.591] 	X.Org ANSI C Emulation: 0.4
[    23.591] 	X.Org Video Driver: 24.1
[    23.591] 	X.Org XInput driver : 24.1
[    23.591] 	X.Org Server Extension : 10.0
[    23.592] (++) using VT number 1

[    23.592] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    23.592] (II) xfree86: Adding drm device (/dev/dri/card1)
[    23.602] (II) xfree86: Adding drm device (/dev/dri/card0)
[    23.603] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/nvidia,/usr/lib32/nvidia,/usr/lib32/nvidia/xorg/modules,/usr/lib32/xorg/modules,/usr/lib64/nvidia/xorg/modules,/usr/lib64/nvidia/xorg,/usr/lib64/xorg/modules,/usr/lib64/nvidia/xorg,/usr/lib64/nvidia"
[    23.603] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/nvidia,/usr/lib32/nvidia,/usr/lib32/nvidia/xorg/modules,/usr/lib32/xorg/modules,/usr/lib64/nvidia/xorg/modules,/usr/lib64/nvidia/xorg,/usr/lib64/xorg/modules,/usr/lib64/nvidia/xorg,/usr/lib64/nvidia"
[    23.757] (--) PCI:*(0@0:2:0) 8086:1616:1025:098a rev 9, Mem @ 0xc2000000/16777216, 0xd0000000/268435456, I/O @ 0x00005000/64, BIOS @ 0x????????/131072
[    23.757] (--) PCI: (4@0:0:0) 10de:1347:1025:098c rev 162, Mem @ 0xc3000000/16777216, 0xb0000000/268435456, 0xc0000000/33554432, I/O @ 0x00003000/128
[    23.757] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    23.757] (II) LoadModule: "glx"
[    23.757] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    23.758] (II) Module glx: vendor="X.Org Foundation"
[    23.758] 	compiled for 1.20.10, module version = 1.0.0
[    23.758] 	ABI class: X.Org Server Extension, version 10.0
[    23.758] (II) LoadModule: "nvidia"
[    23.758] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[    23.759] (II) Module nvidia: vendor="NVIDIA Corporation"
[    23.759] 	compiled for 1.6.99.901, module version = 1.0.0
[    23.759] 	Module class: X.Org Video Driver
[    23.759] (II) NVIDIA dlloader X Driver  460.32.03  Sun Dec 27 18:56:00 UTC 2020
[    23.759] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    23.759] (II) Loading sub module "fb"
[    23.759] (II) LoadModule: "fb"
[    23.759] (II) Loading /usr/lib/xorg/modules/libfb.so
[    23.759] (II) Module fb: vendor="X.Org Foundation"
[    23.759] 	compiled for 1.20.10, module version = 1.0.0
[    23.759] 	ABI class: X.Org ANSI C Emulation, version 0.4
[    23.759] (II) Loading sub module "wfb"
[    23.759] (II) LoadModule: "wfb"
[    23.759] (II) Loading /usr/lib/xorg/modules/libwfb.so
[    23.759] (II) Module wfb: vendor="X.Org Foundation"
[    23.759] 	compiled for 1.20.10, module version = 1.0.0
[    23.759] 	ABI class: X.Org ANSI C Emulation, version 0.4
[    23.760] (II) Loading sub module "ramdac"
[    23.760] (II) LoadModule: "ramdac"
[    23.760] (II) Module "ramdac" already built-in
[    23.760] (EE) No devices detected.
[    23.760] (EE) 
Fatal server error:
[    23.760] (EE) no screens found(EE) 
[    23.760] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    23.760] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    23.760] (EE) 
[    23.760] (EE) Server terminated with error (1). Closing log file.

Can you post the output of inxi -Gazy?

Here’s inxi -Gazy in CTRL+ALT+F2 mode with the config you gave me for nvidia.conf:

Graphics:
  Device-1: Intel HD Graphics 5500 vendor: Acer Incorporated ALI driver: i915 
  v: kernel bus ID: 00:02.0 chip ID: 8086:1616 
  Device-2: NVIDIA GM108M [GeForce 940M] vendor: Acer Incorporated ALI 
  driver: nvidia v: 460.32.03 alternate: nouveau,nvidia_drm bus ID: 04:00.0 
  chip ID: 10de:1347 
  Device-3: Chicony HD WebCam type: USB driver: uvcvideo bus ID: 2-7:4 
  chip ID: 04f2:b520 
  Display: server: X.org 1.20.10 driver: nvidia tty: 192x60 
  Message: Advanced graphics data unavailable in console. Try -G --display 

Here’s the output without any config in desktop mode:

Graphics:
  Device-1: Intel HD Graphics 5500 vendor: Acer Incorporated ALI driver: i915 
  v: kernel bus ID: 00:02.0 chip ID: 8086:1616 
  Device-2: NVIDIA GM108M [GeForce 940M] vendor: Acer Incorporated ALI 
  driver: nvidia v: 460.32.03 alternate: nouveau,nvidia_drm bus ID: 04:00.0 
  chip ID: 10de:1347 
  Device-3: Chicony HD WebCam type: USB driver: uvcvideo bus ID: 2-7:4 
  chip ID: 04f2:b520 
  Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 
  driver: modesetting,nvidia alternate: fbdev,intel,nouveau,nv,vesa 
  display ID: :0 screens: 1 
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
  s-diag: 582mm (22.9") 
  Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 142 size: 344x193mm (13.5x7.6") 
  diag: 394mm (15.5") 
  OpenGL: renderer: Mesa Intel HD Graphics 5500 (BDW GT2) v: 4.6 Mesa 20.3.2 
  direct render: Yes

So no solutions?

Please post the output of head -n 999 /etc/X11/xorg.conf /etc/X11/xorg.conf.d/* /etc/X11/mhwd.d/*.

Here’s the output:

==> /etc/X11/xorg.conf.d/00-keyboard.conf <==
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
##
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 "nvidia"
EndSection

Section "Device"
	Identifier "nvidia"
	Driver "nvidia"
	Option "Coolbits" "12"
EndSection

Section "Screen"
	Identifier "nvidia"
	Device "nvidia"
	Option "AllowEmptyInitialConfiguration"
EndSection

==> /etc/X11/mhwd.d/nvidia.conf <==
##
## Generated by mhwd - Manjaro Hardware Detection
##
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 "nvidia"
EndSection

Section "Device"
	Identifier "nvidia"
	Driver "nvidia"
	Option "Coolbits" "12"
EndSection

Section "Screen"
	Identifier "nvidia"
	Device "nvidia"
	Option "AllowEmptyInitialConfiguration"
EndSection

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

Please delete /etc/X11/xorg.conf.d/90-mhwd.conf, then create /etc/X11/xorg.conf.d/10-intel-nvidia.conf:

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

Section "Device"
	Identifier "nvidia"
	Driver "nvidia"
	BusID "PCI:4:0:0"
	Option "Coolbits" "12"
EndSection

Section "Screen"
	Identifier "nvidia"
	Device "nvidia"
	Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
	Identifier "integrated"
	Driver "modesetting"
	BusID "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "integrated"
	Device "integrated"
EndSection

and reboot.


This is probably not going to work by the nature of the configuration (Intel+NVIDIA in “reverse PRIME” mode) but probably worth a try. I suggest you install optimus-manager, then in the configuration of it you can enable coolbits in its “nvidia” mode.

The config didn’t work but optimus-manager certainly did.

Thank You So Much @pobrn