Tried to fix hibernate, getting random freezes now

So I tried to fix my laptop’s hibernate issue, since it was not working from sleep recently. I looked at similar issues and played with some commands(had something to do with dracut). It didn’t actually fix the system and now I’m also getting issues with wifi, random and frequent freezes, hibernate problem persists, screen freezes even if I do restart-shows dekstop home screen and freezes
I did use the power button long press earlier but then I got to know “alt + Sysreq REISUB” is a better alternative. But now I find the system almost unusable because I am facing these issues too frequently and am not able to make it work. I believe I’ve broken it trying random commands.
I tried to update the system with yay, updated mirrorlists. What can I do to resolve this, any help is appreciated.
Hardware information and Boot log: https://0x0.st/X7P3.txt

Can you explain in detail what you changes you made or commands you ran?

Hi there @dalto , some of the commands I ran:

Updated mirrors with-
reflector --protocol https --verbose --latest 25 --sort rate --save /etc/pacman.d/mirrorlist

Uncommented [multilib] Include = /etc/pacman.d/mirrorlist from /etc/pacman.conf (while installing nvim I believe)

sudo pacman -Syu linux linux-headers

echo 'kernel.sysrq=1' | sudo tee /etc/sysctl.d/99-reisub.conf since REISUB was not enabled and I was using hard reboot before that

sudo reinstall-kernels

Created /etc/dracut.conf.d/resume.conf and wrote add_dracutmodules+=" resume " in it

Created /etc/dracut.conf.d/resume-from-hibernate.conf and wrote to it:
add_dracutmodules+=" resume "
install_items+=" /usr/lib/systemd/system/systemd-hibernate-resume.service "

sudo dracut-rebuild

Also I just noticed that both GUI restart and shut down are not working, neither is systemctl reboot. I pressed sleep button and then logged in but the wifi was not reconnecting so had to do REISUB to make it work again since there seems to be no other option.

what drivers do you have?

$ inxi -Na
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Acer Incorporated ALI driver: r8169 v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: 2000 bus-ID: 03:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  Device-2: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    vendor: Lite-On driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s
    lanes: 1 bus-ID: 04:00.0 chip-ID: 14c3:7961 class-ID: 0280
  Device-3: Lite-On Dell Wireless Device driver: hid-generic,usbhid
    type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-2:2
    chip-ID: 04ca:00bd class-ID: 0301
$ inxi -Gaz
Graphics:
  Device-1: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q]
    vendor: Acer Incorporated ALI driver: nouveau v: kernel non-free: 550.xx+
    status: current (as of 2024-09; EOL~2026-12-xx) arch: Turing code: TUxxx
    process: TSMC 12nm FF built: 2018-2022 pcie: gen: 3 speed: 8 GT/s lanes: 8
    link-max: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.0
    chip-ID: 10de:1f9d class-ID: 0302
  Device-2: Advanced Micro Devices [AMD/ATI] Lucienne
    vendor: Acer Incorporated ALI driver: amdgpu v: kernel arch: GCN-5
    code: Vega process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s ports: active: eDP-1
    empty: HDMI-A-1 bus-ID: 05:00.0 chip-ID: 1002:164c class-ID: 0300
    temp: 40.0 C
  Device-3: Chicony HD User Facing driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-3:3 chip-ID: 04f2:b64f
    class-ID: 0e02 serial: <filter>
  Display: wayland server: X.org v: 1.21.1.14 with: Xwayland v: 24.1.4
    compositor: kwin_wayland driver: X: loaded: amdgpu,modesetting
    alternate: fbdev,nouveau,nv,vesa dri: radeonsi,nouveau gpu: nouveau,amdgpu
    display-ID: 0
  Monitor-1: eDP-1 res: 1536x864 size: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: nvidia nouveau drv: amd radeonsi platforms:
    device: 0 drv: nouveau device: 1 drv: radeonsi device: 2 drv: swrast gbm:
    drv: nouveau surfaceless: drv: nouveau wayland: drv: radeonsi x11:
    drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.3 vendor: amd mesa v: 24.2.7-arch1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (radeonsi
    renoir LLVM 18.1.8 DRM 3.59 6.12.1-arch1-1) device-ID: 1002:164c
    memory: 500 MiB unified: no display-ID: :1.0
  API: Vulkan Message: No Vulkan data available.

$ inxi -Fxxxz
System:
  Kernel: 6.12.1-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: hpet
  Desktop: KDE Plasma v: 6.2.4 tk: Qt v: N/A wm: kwin_wayland vt: 8 dm:
    1: LightDM v: 1.32.0 2: SDDM note: stopped Distro: EndeavourOS
    base: Arch Linux
Machine:
  Type: Laptop System: Acer product: Aspire A715-42G v: V1.08
    serial: <superuser required>
  Mobo: LN model: Azalea_CAS v: V1.08 serial: <superuser required>
    part-nu: 0000000000000000 uuid: <superuser required> UEFI: Insyde v: 1.08
    date: 09/15/2021
Battery:
  ID-1: BAT1 charge: 22.1 Wh (67.8%) condition: 32.6/47.9 Wh (68.0%)
    volts: 11.3 min: 11.4 model: Murata AP18C4K type: Li-ion serial: <filter>
    status: discharging
CPU:
  Info: 6-core model: AMD Ryzen 5 5500U with Radeon Graphics bits: 64
    type: MT MCP smt: enabled arch: Zen 2 rev: 1 cache: L1: 384 KiB L2: 3 MiB
    L3: 8 MiB
  Speed (MHz): avg: 400 min/max: 400/2100 boost: enabled cores: 1: 400
    2: 400 3: 400 4: 400 5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400
    12: 400 bogomips: 50328
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q]
    vendor: Acer Incorporated ALI driver: nouveau v: kernel arch: Turing pcie:
    speed: 8 GT/s lanes: 8 bus-ID: 01:00.0 chip-ID: 10de:1f9d class-ID: 0302
  Device-2: Advanced Micro Devices [AMD/ATI] Lucienne
    vendor: Acer Incorporated ALI driver: amdgpu v: kernel arch: GCN-5 pcie:
    speed: 8 GT/s lanes: 16 ports: active: eDP-1 empty: HDMI-A-1
    bus-ID: 05:00.0 chip-ID: 1002:164c class-ID: 0300 temp: 39.0 C
  Device-3: Chicony HD User Facing driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-3:3 chip-ID: 04f2:b64f class-ID: 0e02
    serial: <filter>
  Display: wayland server: X.org v: 1.21.1.14 with: Xwayland v: 24.1.4
    compositor: kwin_wayland driver: X: loaded: amdgpu,modesetting
    alternate: fbdev,nouveau,nv,vesa dri: radeonsi,nouveau gpu: nouveau,amdgpu
    display-ID: 0
  Monitor-1: eDP-1 res: 1536x864 size: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: nvidia nouveau drv: amd radeonsi platforms:
    device: 0 drv: nouveau device: 1 drv: radeonsi device: 2 drv: swrast gbm:
    drv: nouveau surfaceless: drv: nouveau wayland: drv: radeonsi x11:
    drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.3 vendor: amd mesa v: 24.2.7-arch1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (radeonsi
    renoir LLVM 18.1.8 DRM 3.59 6.12.1-arch1-1) device-ID: 1002:164c
    display-ID: :1.0
  API: Vulkan Message: No Vulkan data available.
Audio:
  Device-1: Advanced Micro Devices [AMD/ATI] Renoir Radeon High Definition
    Audio vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel pcie:
    speed: 8 GT/s lanes: 16 bus-ID: 05:00.1 chip-ID: 1002:1637 class-ID: 0403
  Device-2: Advanced Micro Devices [AMD] ACP/ACP3X/ACP6x Audio Coprocessor
    vendor: Acer Incorporated ALI driver: N/A pcie: speed: 8 GT/s lanes: 16
    bus-ID: 05:00.5 chip-ID: 1022:15e2 class-ID: 0480
  Device-3: Advanced Micro Devices [AMD] Family 17h/19h HD Audio
    vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel pcie:
    speed: 8 GT/s lanes: 16 bus-ID: 05:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.12.1-arch1-1 status: kernel-api
  Server-1: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Acer Incorporated ALI driver: r8169 v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: 2000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: down mac: <filter>
  Device-2: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    vendor: Lite-On driver: mt7921e v: kernel pcie: speed: 5 GT/s lanes: 1
    bus-ID: 04:00.0 chip-ID: 14c3:7961 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-3: Lite-On Dell Wireless Device driver: hid-generic,usbhid
    type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 bus-ID: 3-2:2 chip-ID: 04ca:00bd
    class-ID: 0301
Bluetooth:
  Device-1: Lite-On Wireless_Device driver: btusb v: 0.8 type: USB rev: 2.1
    speed: 480 Mb/s lanes: 1 bus-ID: 1-4:2 chip-ID: 04ca:3802 class-ID: e001
    serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 5.2
    lmp-v: 11 class-ID: 6c010c
Drives:
  Local Storage: total: 476.94 GiB used: 130.98 GiB (27.5%)
  ID-1: /dev/nvme0n1 vendor: SK Hynix model: HFM512GD3JX016N
    size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 41020C20 temp: 31.9 C scheme: GPT
Partition:
  ID-1: / size: 458.73 GiB used: 130.96 GiB (28.5%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 1022 MiB used: 296 KiB (0.0%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: partition size: 8.8 GiB used: 19.7 MiB (0.2%)
    priority: -2 dev: /dev/nvme0n1p3
Sensors:
  System Temperatures: cpu: 40.5 C mobo: 36.0 C gpu: amdgpu temp: 39.0 C
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 8 GiB note: est. available: 7.1 GiB used: 4.28 GiB (60.4%)
  Processes: 300 Power: uptime: 29m states: freeze,mem,disk suspend: deep
    wakeups: 0 hibernate: platform Init: systemd v: 256 default: graphical
  Packages: pm: pacman pkgs: 1160 Compilers: clang: 18.1.8 gcc: 14.2.1
    Shell: Bash v: 5.2.37 running-in: konsole inxi: 3.3.36

Does this help?

reviewing your specs can you share the output for nvidia-smi? if you dont have that try sudo pacman -S nvidia nvidia-utils nvidia-settings also does this issue persist on xorg too? wayland is known for problems with nvidia

after reviewing at the first look ig its the problem with nvidia

however since this GPU supports Vulkan , it can be an issue with vulkan too cuz for me and some other guy we basically did not have the vulkan drivers for our gpu and they were causing us trouble too until i came up with a solution to install vulkan drivers for our gpus and it solved it , if installing nvidia-utils does not help it you can also try to install vulkan-nouveau and see if it resolves it

Hi @rudy-in thanks for your time

nvidia-smi was not working so I ran sudo pacman -S nvidia nvidia-utils nvidia-settings

$ nvidia-smi
Thu Dec  5 01:58:08 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 GTX 1650        Off |   00000000:01:00.0 Off |                  N/A |
| N/A   40C    P8              2W /   30W |       1MiB /   4096MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+

I am able to use GUI power off/restart now and also able to turn off wifi and reconnect but only before I put it on hibernate or sleep. The issues persist in case the system wakes up after sleep.

I just tried xorg while starting the PC but it’s the same, it’s working fine until it hibernates/sleeps.

Tried removing nvidia-utils and other nvidia pacakges to install nouveau[https://wiki.archlinux.org/title/Nouveau], following the mentioned steps to install NVK. Added nouveau.config=NvGspRm=1 to kernel parameters by appending it to GRUB_CMDLINE_LINUX_DEFAULT line in /etc/dafault/grub. It gave me the same issues but worse after hibernation, now my system is stuck on [ OK ] Reached target, Graphical Interface. Not able to start the laptop, REISUB is not working either it stops at this and I have no idea how to get through this. I am able to reach tty but idk if should revert the changes or what…

@joekamprad can you welp?

also dont add anything to grub cmdline just keep GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" and you’ll be alright also try to see if the issues persists after removing nouveau stuff and just getting nvidia stuff , also did you type in sudo update-grub after modifying the file?


It’s this currently, I had added the nouveau.config=NvGspRm=1
Will try to undo the changes and get back the packages that I’ve removed

After apping the above I ran sudo grub-mkconfig -o /boot/grub/grub.cfg

Created /etc/X11/xorg.conf.d/20-nouveau.conf and added

Section "Device"
    Identifier "Nvidia card"
    Driver "nouveau"
EndSection

Will try to revert the changes but then the hibernate issue will still be there

You should use nvidia drivers and set up with nvidia.

https://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/powermanagement.html

Edit: You may need also to set in

/etc/modprobe.d/nvidia-power-management.conf

NVreg_PreserveVideoMemoryAllocations=0

and with nvidia enable the nvidia systemd services for powermanagemet:
The NVIDIA systemd services then need to be enabled:


    sudo systemctl enable nvidia-suspend.service

    sudo systemctl enable nvidia-hibernate.service

    sudo systemctl enable nvidia-resume.service

BUT

I do not think it is a must have to install and setup nvidia driver to have sleep working. nouveau should be able to work for this too in general.

And with Nvidia drivers in use you also want to setup a method to even use the nvidia gpu, as without this it should not interfere with powermodes at all.

thats exactly it , his gpu supports vulkan and for nvidia its vulkan-nouveau package which can fix the issue its i guess nouveau itself acting weird yet another day

Hey, so I removed /etc/X11/xorg.conf.d/20-nouveau.conf and installed nvidia-dkms nvidia-utils nvidia-settings lib32-nvidia-utils and ran nvidia-inst too. Selected xorg while logging in.

I created /etc/modprobe.d/nvidia-power-management.conf and added
NVreg_PreserveVideoMemoryAllocations=0 to it but while installing other nvidia packages I saw the log ignoring bad line: NVreg_PreserveVideoMemoryAllocations=0 many times so I removed the file

My system does not have the directory /usr/share/doc/NVIDIA_GLX-1.0/samples/systemd/nvidia-suspend.service so how do I get the files? Do I have to create the service files manually?

It must need the suspend service installed and enabled and started as @joekamprad pointed out but I’m not 100% on it.

1 Like

Hey @joekamprad how can I install the suspend services, do I have to create them manually?
How do I setup to use nvidia gpu so that it works well with the powermodes it doesn’tseem to be using nvidia gpu from the output of

$  glxinfo | grep OpenGL
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Graphics (radeonsi, renoir, LLVM 18.1.8, DRM 3.59, 6.12.1-arch1-1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.3.1-arch1.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.3.1-arch1.1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.3.1-arch1.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
$ inxi -G
Graphics:
  Device-1: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: nvidia
    v: 565.57.01
  Device-2: Advanced Micro Devices [AMD/ATI] Lucienne driver: amdgpu
    v: kernel
  Device-3: Chicony HD User Facing driver: uvcvideo type: USB
  Display: x11 server: X.Org v: 21.1.14 with: Xwayland v: 24.1.4 driver: X:
    loaded: amdgpu,nvidia unloaded: modesetting dri: radeonsi gpu: amdgpu
    resolution: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: nvidia,radeonsi
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.6 vendor: amd mesa v: 24.3.1-arch1.1
    renderer: AMD Radeon Graphics (radeonsi renoir LLVM 18.1.8 DRM 3.59
    6.12.1-arch1-1)
  API: Vulkan v: 1.3.295 drivers: nvidia surfaces: xcb,xlib
[vikkk@django modprobe.d]$ nvidia-smi
Sat Dec  7 01:24:40 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 GTX 1650        Off |   00000000:01:00.0 Off |                  N/A |
| N/A   44C    P8              3W /   30W |       5MiB /   4096MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A       749      G   /usr/lib/Xorg                                   4MiB |
+-----------------------------------------------------------------------------------------+

Also nvidia-installer-check command is not found

You can check if any of those services are enabled.

systemctl status nvidia-suspend.service

Edit: Keep in mind your system is rendering on the amdgpu not the nvidia gpu. If it’s a hybrid laptop you have to switch to use nvidia. So likely the freeze is coming from the amdgpu possibly. So you can try setting up these for the nvidia card and see.

the services are part of NVIDIA proprietary packages, not usable when running open source nouveau from what i know of…
And @vik is using nouveau drivers still or not?