Skip to content

Instantly share code, notes, and snippets.

@mokhtarabadi
Created July 16, 2026 19:10
Show Gist options
  • Select an option

  • Save mokhtarabadi/29b612e39ae5f0edd017334bff1b17b7 to your computer and use it in GitHub Desktop.

Select an option

Save mokhtarabadi/29b612e39ae5f0edd017334bff1b17b7 to your computer and use it in GitHub Desktop.
Ultimate Fix for ASUS N552 Linux Hibernation (sysvinit)

The Ultimate Guide: Fixing Linux Hibernation on ASUS N552 (MX Linux / sysvinit)

If you own an ASUS N-series laptop (like the N552VW/VX) with an Intel Sunrise Point chipset and an Nvidia Optimus GPU, you likely know that hibernation (S4 sleep) on Linux is notoriously broken.

This guide provides a surgical, battery-friendly fix for MX Linux (or any sysvinit / pm-utils Debian-based distro) that avoids the blunt, battery-draining pcie_aspm=off hack.

The Symptoms

  1. The Nvidia ACPI Freeze: Adding acpi_osi=linux causes a hard freeze during early boot (ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch).
  2. The Suspend Abort (Error -110): The laptop tries to sleep but immediately wakes back up. dmesg shows an Active State Power Management (ASPM) PCIe AER error flood, followed by xhci_hcd 0000:04:00.0: PM: failed to freeze async: error -110.
  3. The Quiesce Timeout: The laptop powers off successfully, but upon waking, it ignores the hibernation image and boots fresh because the temporary boot kernel timed out trying to freeze the USB controller.

Why not pcie_aspm=off?

Many forums suggest disabling ASPM globally to fix the PCIe AER flood. While this works, it prevents your CPU and PCIe devices from entering low-power states, drastically reducing your laptop's battery life. The solution below fixes the bug without disabling ASPM.


The 3-Step Surgical Fix

Step 1: The ASUS ACPI Spoof & Resume Target

We must tell the kernel where the swap partition is, and trick the poorly-coded ASUS BIOS into using its stable Windows 10 power tables to prevent the Nvidia driver from crashing.

  1. Find your Swap UUID using sudo blkid | grep swap.
  2. Edit /etc/default/grub.
  3. Modify the default command line to include your resume target and the Windows 2015 spoof:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=YOUR-SWAP-UUID acpi_osi=! acpi_osi=\"Windows 2015\""
    
  4. Update GRUB: sudo update-grub

(Note: Ensure /etc/initramfs-tools/conf.d/resume also contains RESUME=UUID=YOUR-SWAP-UUID)

Step 2: Fix the Sleep Phase (pm-utils Unload)

To prevent the USB 3.0 controller (xhci_hcd) from timing out and aborting the hibernation, we use pm-utils to dynamically unload the driver for the 3 seconds it takes to sleep, and reload it on wake.

  1. Create a pm-utils config file: sudo nano /etc/pm/config.d/unload_modules
  2. Add this exact line:
    SUSPEND_MODULES="xhci_pci xhci_hcd"
    

Step 3: Fix the Wake/Quiesce Phase (Initramfs Blacklist)

When the laptop wakes up, a temporary kernel loads from initramfs to read the swap image. If this temporary kernel loads the USB driver, it will hit the same ASUS PCIe bug when it tries to freeze (quiesce) the hardware to restore your OS, causing a -110 timeout and a resume failure.

We fix this by blinding the temporary kernel to the USB ports entirely.

  1. Create a modprobe blacklist for the initramfs: sudo nano /etc/modprobe.d/blacklist_xhci_suspend.conf
  2. Add these lines:
    # Block temporary boot kernel from loading USB to prevent quiesce timeout
    blacklist xhci_pci
    blacklist xhci_hcd
    
  3. Rebuild the initramfs: sudo update-initramfs -u -k all

Testing

Reboot your computer to apply the new initramfs and GRUB parameters. Open a few applications, then run sudo pm-hibernate. Your screen will go black, the system will completely power off, and upon pressing the power button, your session will flawlessly restore.

(Note: If you see an NMI received for unknown reason message in dmesg after waking up, ignore it. It is a harmless firmware artifact from the ASUS BIOS restoring PCIe power).

@mokhtarabadi

Copy link
Copy Markdown
Author

⚠️ Important Update (Jul 25, 2026) — Side Effect Discovered

This fix works perfectly for hibernation, but after extensive testing, a significant side effect was found:

External USB ports stop working after resume. Internal devices (webcam, Bluetooth, touchscreen) work fine, but plugging anything into the physical USB ports yields no response.

Root Cause

  • acpi_osi=! unsets all ACPI _OSI responses, which is required to prevent the Nvidia Optimus _DSM freeze on ASUS N552VW/VX hardware
  • But this prevents the ASUS BIOS from correctly running ACPI methods for USB port power provisioning after S4 wake
  • Kernel warns: usb: port power management may be unreliable
  • The ASMedia ASM1142 USB 3.1 controller additionally suffers PCIe AER corrected errors

Verdict

On the ASUS N552 with Nvidia Optimus, working hibernation and working external USB ports are mutually exclusive. This is an ASUS BIOS/firmware bug, not a Linux kernel bug. No known workaround preserves both.

Trade-off accepted: hibernation works ✅, external USB sacrificed ❌.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment