1

I tried to install Ubuntu on Acer Aspire 3 laptop but my HDD (WDC WD10SPZX-21Z10T0) wasn't recognized until doing suspend OS and wake up. This is dmesg | grep ata1 output before suspending:

[    0.604968] ata1: SATA max UDMA/133 abar m2048@0x4fb13000 port 0x4fb13100 irq 125
[    2.818041] ata1: SATA link down (SStatus 1 SControl 300)

and after

[  123.660687] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[  123.661423] ata1.00: ATA-10: WDC WD10SPZX-21Z10T0, 02.01A02, max UDMA/133
[  123.661425] ata1.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 32), AA
[  123.662151] ata1.00: configured for UDMA/133

Of course, I can install Ubuntu after waking up but it doesn't work (OS can't mount / partition while booting because of unrecognized HDD)

I tried to switch SATA mode in UEFI, disable fast boot and secure boot, update UEFI firmware, but the result is the same.

Linux versions are Ubuntu-desktop 18.04, linuxmint-20-cinnamon.

Upd1: I tried different kernels from Ubuntu repositories and from https://kernel.ubuntu.com/~kernel-ppa/mainline.

Upd2: Seems this is a Linux issue, not just Ubuntu, cause Fedora33-beta does not recognize HDD too.

Upd3: Acer support answered that they do not help with OS installation.

alokym
  • 306

1 Answers1

2

Since the hard disk is successfully recognized after suspension and followed wakeup, the workaround is to force the suspend before mounting / file system. The kernel built with CONFIG_PM_TEST_SUSPEND=y and booted with test_suspend=mem kernel parameter does it.

About CONFIG_PM_TEST_SUSPEND=y from kernel sources help:

This option will let you suspend your machine during bootup, and make it wake up a few seconds later using an RTC wakeup alarm. Enable this with a kernel parameter like "test_suspend=mem".

To install Linux on such laptop you need to:

  1. Boot from live-USB
  2. Suspend the laptop and wake it up
  3. Install Linux onto the internal drive
  4. Chroot into recently installed OS
  5. Download kernel sources
  6. Build and install the kernel with CONFIG_PM_TEST_SUSPEND=y
  7. Set test_suspend=mem into bootloader
  8. Reboot

More about some of the steps

  1. Chroot into recently installed OS

Except of bind mounting /dev, /dev/pts, /proc and /sys do not forget to do it for /run to allow access to the internet from chroot (if you need it).

  1. Set test_suspend=mem into bootloader (In case your bootloader is grub)

To do it, open /etc/default/grub (from chroot, of course), find row beginning with GRUB_CMDLINE_LINUX_DEFAULT= and replace quiet splash with test_suspend=mem. Then run

update-grub

alokym
  • 306
  • I'm trying to install Ubuntu 20.04 LTS on Acer Aspire 3. But its been over 3 days, I can't seem to install it. Maybe your method works. But I want to elaborate more about the 4th step. How to chroot? The answer might works for expert people, I'm a noob, how to proceed this! :-C – Pranav Apr 17 '21 at 06:20
  • Had you done step 3? I mean after suspending and waking up does ubuntu's installer recognize HDD or SSD? If your answer is no, this method doesn't help you. To do chroot:
    1. mount your / of the installed OS to /mnt/ of your live-usb OS.

    e.g. sudo mount /dev/sda1 /mnt where /dev/sda1 is your partition where you have installed Ubuntu 2. bind /dev, /dev/pts, /proc, /sys and /run sudo mount --bind /dev /mnt/dev sudo mount --bind /dev/pts /mnt/dev/pts sudo mount --bind /proc /mnt/proc and so on... sudo chroot /mnt

    – alokym Apr 20 '21 at 11:21
  • Please read here or google "chroot into different OS" – alokym Apr 20 '21 at 11:32
  • Thank you for the response even though I don't have that laptop where I couldn't install Ubuntu because of this issue. – Pranav Apr 23 '21 at 09:22
  • @alokym, could you explain a bit more? Source of the bug. The process you found the bug and the fix. Etc. I'm facing the same problem and fearing the prospect of having to build a kernel myself. I just want to install Ubuntu. :) – 3N4N Oct 08 '21 at 14:54
  • @klaus I do not know the source of the bug, just recognized that HDD becomes visible after suspend(to RAM)/wakeup cycle. So my workaround is to enforce suspend/wake before / mounting. Try to install 5.14 kernel from chroot, maybe the Kernel community fixed the bug. To do it (onto 20.04), run apt-get install linux-oem-20.04d – alokym Oct 08 '21 at 19:58