Ubuntu on Lenovo Legion Y540

December 15, 2019 (updated August 19, 2020)

I recently purchased a Lenovo Legion Y540 laptop. Prior research revealed that people were having problems with wireless connections, screen brightness and some other usual suspects.

My research also indicated that later versions of the Linux kernel fixed all/most of these issues. So I installed Xubuntu 20.04 LTS which provides kernel version 5.4. Standard Ubuntu 20.04 LTS or newer should give the same results.

This is not a review, but a collection of notes for those who intend to purchase the same laptop.

Hardware:

  • Nvidia GeForce RTX 2060
  • Intel Core i7-9750H
  • 16 GB DDR4 RAM
  • 1 TB SSD hard drive

Installation

Booting the live USB disk in normal mode caused the machine to hang. Safe graphics mode worked. You'll find the option in the GRUB loader when booting from the USB disk.

Secure Boot was disabled.

Screen brightness

I wasn't able to adjust the screen brightness using the fn keys on the keyboard, nor through Xfce's display brightness controls. Thankfully, there's an easy fix.

If you're using the proprietary NVIDIA drivers you can add an option to the Xorg configuration.

Edit (or create) /usr/share/X11/xorg.conf.d/10-nvidia.conf:

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "RegistryDwords" "EnableBrightnessControl=1;" # Add this
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection

This should fix the screen brightness controls.

Battery life

This is a gaming laptop, and gaming laptops aren't known for their battery life. A quick test showed that I was able to browse the Internet using Chrome and play around in the terminal for 2.5 hours before the battery level reached 10%.

$ uptime && cat /sys/class/power_supply/BAT0/capacity

15:17:51 up  2:30,  1 user,  load average: 0,32, 0,35, 0,34
10

The last line shows battery percentage.

The screen brightness was set to 70% and the keyboard backlight was turned off. I had both Bluetooth and WiFi enabled.

Note that Xubuntu uses the Xfce desktop environment which is considered fairly lightweight. On the other hand, the laptop ships with Nvidia GeForce RTX 2060 and Intel Core i7-9750H, both of which are quite powerful. You may want to look into TLP if you're interested in optimizing for battery life. The default TLP settings should give some extra battery minutes.

What Worked Out of the Box

I haven't noticed any problems with:

  • Keyboard backlight adjustment
  • Volume adjustment
  • Wireless connections/drivers
  • Proprietary NVIDIA drivers
  • The mousepad
  • Media controls on the keyboard
  • Bluetooth