Lenovo Legion Y7000 (2019)

In my previous blog, I mentioned I changed a new laptop. My older faulty laptop is Dell Vostro 5459, which was four years old. My current laptop is Lenovo Legion Y7000 2019 PG0 model 81T0, which as higher spec than the old one. Besides that, I added another 1T HDD, just in case I may doing machine learning study, or my work requires large disk space.

Note: All the instructions should follow official Arch Linux Wiki. The followings are only based on my experience of this installation.

Installation preparation

Since I have an extra HDD and plan for dual boot, I preserve the Windows in the SSD. Therefore in Windows, firstly disable Fast Boot, and secondly allow UTC time.

After this, I disable the Secure Boot through BIOS.

Since my primary OS is Arch Linux, I usually prepare two Live USBs, Arch Linux and SystemRescueCD. I just found that the recent SystemRescueCD is built based on Arch Linux.

SystemRescueCD is useful especially doing partitioning, shrinking/growing partition, and moving partitions, using GUI. Command-line like cfdisk and cgdisk can do partitioning, but moving partitions will be less intuitive comparing to GUI.

However, I failed to run SystemRescueCD with Xorg (running startx) due to graphic driver issue. (Though later, I found that it can be solved by going to BIOS, and change the Graphic Mode to “Switchable”, where the default is “Discrete”.)

As a result, I continued with Arch Linux Live USB. Due to the graphic driver issue, the TTY is not rendered properly. This can be solved by adding nomodeset parameter to the Kernel, by editing the GRUB menu during the boot.

Network

After boot into the Arch Linux installation Live USB, the first thing must solve is the networking. In this modern day, a laptop that cannot connect internet with WiFi is useless. However, the WiFi of Lenovo Legion Y7000 was blocked (plane mode) by default when running in Live USB. This can be solved by rfkill unblock all. Then, I started the network service with netctl.

Partitioning and boot loader

I believe most modern laptop and HDD support GPT. Since I am using command-line interface, cgdisk is sufficient for the partitioning. I created three partitions, for / (root), swap, and /home.

After partitioning and mounting, I installed the Arch through network.

Boot loader is a little troublesome. I chose GRUB. I believe most modern laptop supports EFI. So, I booted into Windows and used Disk Management to find the partition that is used for boot. One of the partitions is EFI.

Then in Arch Linux live media, I installed grub, os-probe, and efibootmgr.

Note: I installed the grub after I have run pacstrap. pacstrap will create /boot directory. So, I renamed it to /boot to /boot~, and create another /boot for GRUB installation.

I mounted the partition to /boot (in arch-chroot environment), then follow the instructions here.

os-probe is useful to allow dual boot to Windows, as it will generate the GRUB menu entry for Windows automatically.

After this, reboot to make sure we can boot into the new installation.

Note: Add nomodeset to the Kernel in the /etc/default/grub if rendering fails.

Network again

After boot into newly installed Arch Linux, I was not able to connect internet, because required packages were not installed. So, I needed to boot to the live media again, with the network connection, install wpa_supplicant, netctl, and dhcpcd. Then at least I can connect to internet with the newly installed Arch Linux.

NVIDIA

After the network, the second big problem is NVIDIA. I choose NVIDIA, because it supports CUDA, as it is important for machine learning, especially deep learning.

I used nvidia-dkms, which I have good experience with this package.

But I faced two main problems. One is the brightness not able to be controlled when running Xorg. The documentation mentioned that this can be solved by adding

option "RegistryDwords" "EnableBrightnessControl=1"

in /etc/X11/xorg.conf or relevant file, under “Device” section “nvidia” driver.

The above solution doesn’t work perfectly. When I boot into LightDM (display manager), sometimes the brightness is 100%, which I cannot reduce the brightness. But sometimes it works fine.

When the brightness is 100%, I need to restart the LightDM, or login and logout (I am using Openbox). Then the brightness is controllable.

The second problem is hibernation. I failed to resume from hibernation. It was a nightmare, as one of my testings failed to boot properly.

I have tried several solution, such as this, and this, and this. None of them work.

I also tried to use linux-lts. But it doesn’t solve the brightness problem, and the WiFi failed to work. So, I give up linux-lts.

And I give up the hibernation as well. It is useful, but I still can work without hibernation.

Note: After successful installation of NVIDIA, we can remove nomodeset from the GRUB entry.

Touchpad

I was using Synaptics. But it is no longer actively updated, and the official documentation suggest to use libinput.

So, I am using libinput now, but it sadly doesn’t support circular scrolling.

f.lux

I was using f.lux for health purpose. However, f.lux package doesn’t work on new laptop with NVIDIA. So, I switch to Redshift. The drawback is that, unlike f.lux GUI, Redshift is not able to change the colour temperature on the fly.

Leftover tasks

After these, I have to migrate a lot of data from my previous computer.

Danshari is necessary, so that not all data need to be migrated.

Family and personal photos (and some videos) are important, as they tell me who I was.

Personal data are important, as they tell me who I am.

Working data are important, as they allow me to continue what I am working with.

Configuration files are important, as I need not to waste my time to setup everything again. Especially Openbox, tint2, Mendeley Desktop, Postman, DBeaver, Emacs, VIM, bash, zsh, SSH, fcitx, fonts (and fontconfig), etc.

Other data files like movies, pictures, music are less important, but valuable. As I need not to collect them again.

Leave a comment