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
  • 336

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
  • 336