Extremely power consumption after nvidia-suspend with 4060 laptop

My hardware is Lenovo legion 7 pro ARX8 with 7945HX + 4060 laptop

I’m using NixOS with kernel 6.11.2 and nvidia driver 560.35.03:

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.35.03              Driver Version: 560.35.03      CUDA Version: 12.6     |
|-----------------------------------------+------------------------+----------------------+
| 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 RTX 4060 ...    Off |   00000000:01:00.0  On |                  N/A |
| N/A   40C    P5             11W /   55W |    1450MiB /   8188MiB |     39%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

When I run systemctl suspend, my laptop got to backscreen soon, but it will resume in several seconds, and the power consumption of 4060 laptop is extremely high after my laptop resumed:

Sun Oct 27 11:31:21 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.35.03              Driver Version: 560.35.03      CUDA Version: 12.6     |
|-----------------------------------------+------------------------+----------------------+
| 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 RTX 4060 ...    Off |   00000000:01:00.0  On |                  N/A |
| N/A   41C    P5            590W /   55W |    1652MiB /   8188MiB |      2%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

But the nvidia-suspend service is ok:

○ nvidia-suspend.service - NVIDIA system suspend actions
     Loaded: loaded (/etc/systemd/system/nvidia-suspend.service; enabled; preset: ignored)
     Active: inactive (dead)

Oct 27 11:30:57 mtspc systemd[1]: Starting NVIDIA system suspend actions...
Oct 27 11:30:59 mtspc systemd[1]: nvidia-suspend.service: Deactivated successfully.
Oct 27 11:30:59 mtspc systemd[1]: Finished NVIDIA system suspend actions.
Oct 27 11:30:59 mtspc systemd[1]: nvidia-suspend.service: Consumed 1.577s CPU time, 1.9G memory peak.

error log in dmesg:

Oct 27 11:30:58 mtspc kernel: ------------[ cut here ]------------
Oct 27 11:30:58 mtspc kernel: WARNING: CPU: 30 PID: 9580 at include/linux/rwsem.h:80 follow_pte+0x21c/0x230
Oct 27 11:30:58 mtspc kernel: Modules linked in: ccm qrtr nf_conntrack_netlink xfrm_user xfrm_algo xt_addrtype rfcomm snd_seq_dummy snd_seq_midi snd_hrtimer snd_seq_midi_event snd_seq xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_re>
Oct 27 11:30:58 mtspc kernel:  snd_acp_config scsi_common mc snd_soc_acpi snd_pci_acp3x iwlmvm edac_mce_amd snd_hda_codec_realtek edac_core amd_atl intel_rapl_msr nvidia_drm(O) snd_hda_codec_generic intel_rapl_common mac80211 snd_hda_scode>
Oct 27 11:30:58 mtspc kernel:  led_class mac_hid tiny_power_button serio_raw button ac psmouse cdc_acm sch_fq_codel msr uinput loop xt_nat x_tables nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter veth tun tap macvlan bridge >
Oct 27 11:30:58 mtspc kernel: CPU: 30 UID: 0 PID: 9580 Comm: nvidia-sleep.sh Tainted: G           O       6.11.2-zen1 #1-NixOS
Oct 27 11:30:58 mtspc kernel: Tainted: [O]=OOT_MODULE
Oct 27 11:30:58 mtspc kernel: Hardware name: LENOVO 82WM/LNVNB161216, BIOS LPCN52WW 05/21/2024
Oct 27 11:30:58 mtspc kernel: RIP: 0010:follow_pte+0x21c/0x230
Oct 27 11:30:58 mtspc kernel: Code: 24 e8 58 7a 97 00 e8 a3 c4 e1 ff bd ea ff ff ff 5b 89 e8 5d 41 5c 41 5d 41 5e 41 5f 31 d2 31 c9 31 f6 31 ff e9 b0 66 b8 00 90 <0f> 0b 90 e9 0c fe ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90
Oct 27 11:30:58 mtspc kernel: RSP: 0018:ffffa46d5db57b90 EFLAGS: 00010246
Oct 27 11:30:58 mtspc kernel: RAX: 0000000000000000 RBX: 00007afcbb95e000 RCX: ffffa46d5db57bd0
Oct 27 11:30:58 mtspc kernel: RDX: ffffa46d5db57bc8 RSI: 00007afcbb95e000 RDI: ffff9335f091fef0
Oct 27 11:30:58 mtspc kernel: RBP: ffffa46d5db57c10 R08: ffffa46d5db57d68 R09: 0000000000000000
Oct 27 11:30:58 mtspc kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffffa46d5db57bd0
Oct 27 11:30:58 mtspc kernel: R13: ffffa46d5db57bc8 R14: ffff9335608ab700 R15: 0000000000000000
Oct 27 11:30:58 mtspc kernel: FS:  00007e50f026d740(0000) GS:ffff93403dd00000(0000) knlGS:0000000000000000
Oct 27 11:30:58 mtspc kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Oct 27 11:30:58 mtspc kernel: CR2: 00007e8ef8010000 CR3: 0000000311428000 CR4: 0000000000f50ef0
Oct 27 11:30:58 mtspc kernel: PKRU: 55555554
Oct 27 11:30:58 mtspc kernel: Call Trace:
Oct 27 11:30:58 mtspc kernel:  <TASK>
Oct 27 11:30:58 mtspc kernel:  ? __warn+0x80/0x120
Oct 27 11:30:58 mtspc kernel:  ? follow_pte+0x21c/0x230
Oct 27 11:30:58 mtspc kernel:  ? report_bug+0x172/0x1a0
Oct 27 11:30:58 mtspc kernel:  ? handle_bug+0x43/0x90
Oct 27 11:30:58 mtspc kernel:  ? exc_invalid_op+0x17/0x80
Oct 27 11:30:58 mtspc kernel:  ? asm_exc_invalid_op+0x1a/0x20
Oct 27 11:30:58 mtspc kernel:  ? follow_pte+0x21c/0x230
Oct 27 11:30:58 mtspc kernel:  follow_phys+0x4b/0x110
Oct 27 11:30:58 mtspc kernel:  untrack_pfn+0x57/0x130
Oct 27 11:30:58 mtspc kernel:  ? folio_batch_move_lru+0xd7/0x110
Oct 27 11:30:58 mtspc kernel:  unmap_single_vma+0xb6/0xf0
Oct 27 11:30:58 mtspc kernel:  zap_page_range_single+0x122/0x1e0
Oct 27 11:30:58 mtspc kernel:  unmap_mapping_range+0x11b/0x140
Oct 27 11:30:58 mtspc kernel:  nv_revoke_gpu_mappings_locked+0x47/0x80 [nvidia]
Oct 27 11:30:58 mtspc kernel:  nv_set_system_power_state+0x1d3/0x480 [nvidia]
Oct 27 11:30:58 mtspc kernel:  nv_procfs_write_suspend+0xe8/0x160 [nvidia]
Oct 27 11:30:58 mtspc kernel:  proc_reg_write+0x5a/0xb0
Oct 27 11:30:58 mtspc kernel:  vfs_write+0x106/0x470
Oct 27 11:30:58 mtspc kernel:  ksys_write+0x6f/0xf0
Oct 27 11:30:58 mtspc kernel:  do_syscall_64+0xb7/0x210
Oct 27 11:30:58 mtspc kernel:  entry_SYSCALL_64_after_hwframe+0x77/0x7f
Oct 27 11:30:58 mtspc kernel: RIP: 0033:0x7e50f0373334
Oct 27 11:30:58 mtspc kernel: Code: ff 45 31 d2 45 31 db c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 f3 0f 1e fa 80 3d 35 ed 0e 00 00 74 23 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 74 31 d2 31 c9 31 f6 31 ff 45 31 c0 45 31 db
Oct 27 11:30:58 mtspc kernel: RSP: 002b:00007ffe62ab63d8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
Oct 27 11:30:58 mtspc kernel: RAX: ffffffffffffffda RBX: 0000000028a6f8b0 RCX: 00007e50f0373334
Oct 27 11:30:58 mtspc kernel: RDX: 0000000000000008 RSI: 0000000028a6f8b0 RDI: 0000000000000001
Oct 27 11:30:58 mtspc kernel: RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000000
Oct 27 11:30:58 mtspc kernel: R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000008
Oct 27 11:30:58 mtspc kernel: R13: 00007e50f045b5c0 R14: 00007e50f0458e80 R15: 000000000047fe20
Oct 27 11:30:58 mtspc kernel: 
 </TASK>

This problem is still exist in driver 565.57.01:

> nvidia-smi   
Sun Oct 27 14:32:16 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.57.01              Driver Version: 565.57.01      CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| 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 RTX 4060 ...    Off |   00000000:01:00.0  On |                  N/A |
| N/A   44C    P3            590W /   55W |     584MiB /   8188MiB |      1%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+