Skip to content

Instantly share code, notes, and snippets.

View mokhtarabadi's full-sized avatar
🙃

Mohammad Reza Mokhtarabadi mokhtarabadi

🙃
View GitHub Profile
@mokhtarabadi
mokhtarabadi / ASUS_N552_Hibernation_Fix.md
Created July 16, 2026 19:10
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 fres
description 4.1 Beast Mode v3
model GPT-4.1

You are an agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.

Your thinking should be thorough and so it's fine if it's very long. However, avoid unnecessary repetition and verbosity. You should be concise, but thorough.

You MUST iterate and keep going until the problem is solved.

@mokhtarabadi
mokhtarabadi / Buildbot-Guide.txt
Created October 30, 2019 09:37 — forked from SwapnilSoni1999/Buildbot-Guide.txt
[GUIDE] ROM Compiling from source [Buildbot]
First of all have a brief look at xda threads about compiling rom from source dont follow all stuff from there tho.. just have a look on those threads specially that jackeagle thread.
now first what you need :
If on local
-> Fast internet connection (fast enough to download 50GB rom source without waiting for a day or two xD )
-> 4core cpu(or higher)
-> 8gb minimum ram
-> Linux (Ubuntu for this guide)
@mokhtarabadi
mokhtarabadi / Buildbot-Guide.txt
Created October 30, 2019 09:37 — forked from SwapnilSoni1999/Buildbot-Guide.txt
[GUIDE] ROM Compiling from source [Buildbot]
First of all have a brief look at xda threads about compiling rom from source dont follow all stuff from there tho.. just have a look on those threads specially that jackeagle thread.
now first what you need :
If on local
-> Fast internet connection (fast enough to download 50GB rom source without waiting for a day or two xD )
-> 4core cpu(or higher)
-> 8gb minimum ram
-> Linux (Ubuntu for this guide)
@mokhtarabadi
mokhtarabadi / build.gradle
Last active August 29, 2015 14:15
remove signing in telegram android
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.14.0'
}
}
apply plugin: 'com.android.application'
repositories {