MX230 Unable to change power state from D3cold to D0, device inaccessible after kernel 6.1+

I installed the latest NVIDIA drivers supported in Debian 12 from their repositories (version 535.216.01) but then, at startup, it won’t load because “unable to change power state from D3cold to D0”. it shows in inxi that there are no drivers loaded. Fortunately my integrated GPU still works, so I could get into the system properly.

Inxi Output:

System:
  Host: Aspire-A514-51G Kernel: 6.12.12+bpo-amd64 arch: x86_64 bits: 64
    Desktop: GNOME v: 43.9 Distro: Debian GNU/Linux 12 (bookworm)
Machine:
  Type: Laptop System: Acer product: Aspire A514-51G v: V1.04
    serial: <superuser required>
  Mobo: WL model: Raichu_WL v: V1.04 serial: <superuser required>
    UEFI: Insyde v: 1.04 date: 01/15/2019
Battery:
  ID-1: BAT0 charge: 25.6 Wh (59.7%) condition: 42.9/62.2 Wh (68.9%)
    volts: 11.3 min: 11.6
CPU:
  Info: quad core model: Intel Core i5-8265U bits: 64 type: MT MCP cache:
    L2: 1024 KiB
  Speed (MHz): avg: 511 min/max: 400/3900 cores: 1: 400 2: 689 3: 400 4: 700
    5: 700 6: 400 7: 400 8: 400
Graphics:
  Device-1: Intel WhiskeyLake-U GT2 [UHD Graphics 620] driver: i915 v: kernel
  Device-2: NVIDIA GP108M [GeForce MX230] driver: N/A
  Device-3: Quanta HD User Facing type: USB driver: uvcvideo
  Display: wayland server: X.Org v: 1.22.1.9 with: Xwayland v: 22.1.9
    compositor: gnome-shell driver: dri: iris gpu: i915
    resolution: 1366x768~60Hz
  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel UHD Graphics 620 (WHL
    GT2)

Strangely, this issue happened only after kernel 6.1++. In the following outputs, I used kernel 6.12 from backports because it supports sleep in my hardware. When I was using kernel 5.15 and below, everything works fine.

I suspect it got something to do with pcie power management. I have tried kernel parameters like pcie_aspm=off and pcie_port_pm=off, still nothing.

here’s output of dmesg regarding the problem:

[    8.665600] nvidia: loading out-of-tree module taints kernel.
[    8.665608] nvidia: module license 'NVIDIA' taints kernel.
[    8.665612] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    8.665613] nvidia: module license taints kernel.
[    9.067604] nvidia-nvlink: Nvlink Core is being initialized, major device number 235
[    9.068657] nvidia 0000:02:00.0: Unable to change power state from D3cold to D0, device inaccessible
[    9.068791] nvidia 0000:02:00.0: probe with driver nvidia failed with error -1
[    9.069009] nvidia-nvlink: Unregistered Nvlink Core, major device number 235
[   11.108793] nvidia-nvlink: Nvlink Core is being initialized, major device number 235
[   11.109718] nvidia 0000:02:00.0: probe with driver nvidia failed with error -1
[   11.110011] nvidia-nvlink: Unregistered Nvlink Core, major device number 235

output of lspci -vnn | grep -PA10 ‘VGA|Display|3D’

00:02.0 VGA compatible controller [0300]: Intel Corporation WhiskeyLake-U GT2 [UHD Graphics 620] [8086:3ea0] (prog-if 00 [VGA controller])
	Subsystem: Acer Incorporated [ALI] WhiskeyLake-U GT2 [UHD Graphics 620] [1025:130c]
	Flags: bus master, fast devsel, latency 0, IRQ 146, IOMMU group 0
	Memory at a2000000 (64-bit, non-prefetchable) [size=16M]
	Memory at b0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at 5000 [size=64]
	Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915

--
02:00.0 3D controller [0302]: NVIDIA Corporation GP108M [GeForce MX230] [10de:1d11] (rev a1)
	Subsystem: Acer Incorporated [ALI] GP108M [GeForce MX230] [1025:130c]
	!!! Unknown header type 7f
	Memory at a3000000 (32-bit, non-prefetchable) [size=16M]
	Memory at 90000000 (64-bit, prefetchable) [size=256M]
	Memory at a0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at 4000 [size=128]
	Kernel modules: nvidia

nvidia bug report: nvidia-bug-report.log.gz (74.2 KB)

If more information is needed, please reply and I will try my best to provide it.