Lenovo IdeaPad 5 14are05

From ArchWiki
Jump to navigation Jump to search

The IdeaPad 5 14are05 is a 14-inch Lenovo AMD Renoir (Ryzen 4000)-based laptop.

Hardware Support

BIOS

BIOS can be accessed by pressing F2 at the Splash screen.

Video

X works natively with a current linux and xf86-video-amdgpu.

Sound

Sound works with PulseAudio in linux out of the box.

Microphone

The internal microphone is properly recognized and working for linux >=5.8rc3 as long as the snd-acp3x-rn kernel module is loaded.

Wireless

It is available with different wifi chips but they should work out of the box.

Touchpad

There are unfortunately issues with the touchpad. For the 14" model the MSFT touchpad (MSFT0004:00 06CB:CD98) is used, not Elan, so the workaround with blacklisting elants_i2c will not work. It is important to make sure that the BIOS is updated to the latest version (atm 1.06), otherwise it is possible that the touchpad will not even be discovered let alone work. If touchpad device is found it's till possible that it will not work (either right after startup or after going out of suspend mode). In this case a new cold start might help (sometimes a reboot might be enough).

Display

The brightness works for linux >=5.7.6.1 , since the patch to fix brightness has been merged.

Issues

Suspend issues (S3 sleep fix)

Original solution is described on reddit and here.

About issue

Windows has introduced a new sleep mode a.k.a. Modern Standby. It's supposed to be more like a smartphone's deep sleep, which lets the system keep the wifi active and check for emails without needing to fully wake up.

For some reason, this new S0ix sleep mode only works if BIOS doesn't advertise support for the traditional S3 suspend-to-RAM sleep state. So Linux will do suspend-to-idle sleep, which results in bigger energy consumption.

Some systems have a "Sleep Mode: Windows / Linux" switch in the BIOS to turn S3 support on or off. This is unfortunately not the case for this Lenovo laptop.

Solution

  • Get acpidump and iasl, provided by the acpica package.
  • Dump all your ACPI files into a directory:
$ mkdir ~/acpi/
$ cd ~/acpi/
$ sudo acpidump -b
  • Decompile the DSDT table
$ iasl -e *.dat -d dsdt.dat
  • Patch the decompiled DSDT table (dsdt.dsl), using this patch:
$ patch -p1 < dsdt.patch
  • Compile the modified DSDT table
$ iasl -ve -tc dsdt.dsl
$ mkdir -p kernel/firmware/acpi
$ cp dsdt.aml kernel/firmware/acpi
$ find kernel | cpio -H newc --create > acpi_override
  • Copy created cpio file to boot:
# cp acpi_override /boot
  • GRUB needs to boot the kernel with a parameter setting the deep sleep state as default. Edit /etc/default/grub and add the following:
GRUB_CMDLINE_LINUX_DEFAULT="mem_sleep_default=deep"
GRUB_EARLY_INITRD_LINUX_CUSTOM=acpi_override
  • Regenerate the GRUB configuration:
# update-grub

as a result in the /boot/grub/grub.cfg for the corresponding menu entry(ies) one should be able to find lines that look similar to: initrd /boot/acpi_override

  • Reboot
  • To verify that things are working:
$ dmesg | grep ACPI | grep supports
[    0.195933] ACPI: (supports S0 S3 S4 S5)
$ cat /sys/power/mem_sleep
s2idle [deep]
  • Don't forget to set your system to go into 'deep' sleep
# echo deep > /sys/power/mem_sleep
  • Now try new suspend. Power led should have a slowly pulsing light.

Tips and tricks

System Performance Mode

There are 3 modes available: Intelligent Cooling, Extreme Performance and Battery Saving. To toggle it, you need to call some ACPI methods.

First install acpi_call (or acpi_call-lts for LTS kernel, acpi_call-dkms for other kernels) and load the kernel module:

 $ sudo modprobe acpi_call

Set it to Intelligent Cooling mode:

 $ echo '\_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x000FB001' | sudo tee /proc/acpi/call

Set it to Extreme Performance mode:

 $ echo '\_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x0012B001' | sudo tee /proc/acpi/call

Set it to Battery Saving mode:

 $ echo '\_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x0013B001' | sudo tee /proc/acpi/call

To verify your setting:

 $ echo '\_SB.PCI0.LPC0.EC0.STMD' | sudo tee /proc/acpi/call
 $ sudo cat /proc/acpi/call | cut -d '' -f1

As a result you get the value for the bit STMD (either 0x0 or 0x1).

 $ echo '\_SB.PCI0.LPC0.EC0.QTMD' | sudo tee /proc/acpi/call
 $ sudo cat /proc/acpi/call | cut -d '' -f1

As a result you get the value for the bit QTMD (either 0x0 or 0x1). To interpret the results the following table can be used:

STMD QTMD Mode
0x0 0x0 Extreme Performance
0x0 0x1 Battery Saving
0x1 0x0 Intelligent Cooling


Rapid Charge

Make sure you have set up acpi_call.

Turn on:

 $ echo '\_SB.PCI0.LPC0.EC0.VPC0.SBMC 0x07' | sudo tee /proc/acpi/call

Turn off:

 $ echo '\_SB.PCI0.LPC0.EC0.VPC0.SBMC 0x08' | sudo tee /proc/acpi/call

To verify your setting:

 $ echo '\_SB.PCI0.LPC0.EC0.FCGM' | sudo tee /proc/acpi/call
 $ sudo cat /proc/acpi/call | cut -d '' -f1

where 0x0 stands for off and 0x1 stands for on.

Also see the note

Battery Conservation

Similarly to the #Rapid Charge, make sure you have set up acpi_call.

Turn on:

 $ echo '\_SB.PCI0.LPC0.EC0.VPC0.SBMC 0x03' | sudo tee /proc/acpi/call

Turn off:

 $ echo '\_SB.PCI0.LPC0.EC0.VPC0.SBMC 0x05' | sudo tee /proc/acpi/call

To verify your setting:

 $ echo '\_SB.PCI0.LPC0.EC0.BTSG' | sudo tee /proc/acpi/call
 $ sudo cat /proc/acpi/call | cut -d '' -f1

where 0x0 stands for off and 0x1 stands for on.

There's also an alternative way to control the conservation mode of the battery.

Note

It is worth noting that the Lenovo Vantage software for Windows when turning on Battery Conservation mode also turns off #Rapid Charge (if it was on). The same is also valid for the #Rapid Charge: turning it on will bring the battery conservation mode down. The aforementioned acpi calls (#Rapid Charge and #Battery Conservation) won't do this for you. So it's possible to get the state where both battery conservation and rapid charge modes are active.