Linux on lenovo yoga 2 pro

Lenovo IdeaPad Yoga 2 Pro

Installing Arch on the HiDPI screen may be difficult as the text will be hard to read. To make the font more readable, before you hit install, disable mode settings. Hit Tab in the arch linux boot menu and append the option nomodeset along with nomodeset kernel parameter. For Intel graphics card you need to add i915.modeset=0 and for Nvidia graphics card you need to add nouveau.modeset=0 . For Nvidia Optimus dual-graphics system, you need to add all the three kernel parameters (i.e. «nomodeset i915.modeset=0 nouveau.modeset=0» ).

Be aware, adding nomodeset prevents the kernel from identifying the monitor. As a result brightness adjustment and xrandr will not work. This line should probably be removed after installation.

The ideapad_laptop module

Several problems come up if the ideapad_laptop module is in use. Namely, it blocks the network card and generates a massive stream of warning from the USB subsystem such as:

Dec 5 08:40:44 localhost kernel: [ 290.632613] xhci_hcd 0000:00:14.0: ep 0x81 - asked for 15360 bytes, 15117 bytes untransferred Dec 5 08:40:44 localhost kernel: [ 290.735110] xhci_hcd 0000:00:14.0: ep 0x81 - asked for 15360 bytes, 15117 bytes untransferred Dec 5 08:40:44 localhost kernel: [ 290.837534] xhci_hcd 0000:00:14.0: ep 0x81 - asked for 15360 bytes, 15117 bytes untransferred Dec 5 08:40:44 localhost kernel: [ 290.940070] xhci_hcd 0000:00:14.0: ep 0x81 - asked for 15360 bytes, 15117 bytes untransferred Dec 5 08:40:44 localhost kernel: [ 291.042570] xhci_hcd 0000:00:14.0: ep 0x81 - asked for 15360 bytes, 15117 bytes untransferred

You can silence these in the short run by running:

And you can unblock the wireless card by running:

However, in the long term, you will probably want to blacklist the ideapad_laptop driver so that neither of these occur in the first place. I am yet to find a disadvantage to doing so.

Keyboard and other hardware keys

To access boot menu or BIOS settings, you must use the alternate power button, next to the standard one.

No keypad available at all.

Keyboard special keys

Note: A working keymap means that there is some output in xev when the key combination is pressed OR that the functionality is built in and «just works». It does not mean that the keymap is linked to the functionality. For that it is often necessary to add a keyboard shortcut by the method of your choice or to use a desktop shell with built-in shortcut support for the keycode in question. For some of the keys the function operates on a BIOS level and no shortcut is needed.

Читайте также:  Примонтировать nfs в linux
Keys Function X sees
Fn+F1 Audio mute/unmute XF86AudioMute
Fn+F2 Audio volume down XF86AudioLowerVolume
Fn+F3 Audio volume up XF86AudioRaiseVolume
Fn+F4 Close application Alt_L+F4
Fn+F5 Refresh page F5
Fn+F6 Disable Touchpad ?
Fn+F7 Airplane mode ?
Fn+F8 Unknown Alt_L+Tab
Fn+F9 Turn off LCD ?
Fn+F10 Toggle display Super+p
Fn+F11 Dim LCD backlight XF86MonBrightnessDown
Fn+F12 Brighten LCD backlight XF86MonBrightnessUp

Hardware keys on right side

XF86AudioRaiseVolume XF86AudioLowerVolume Super_L+o

Touchscreen

Touchscreen USB device seems to come and go if the usbtouchscreen module is not loaded.

Multitouch gestures

You need to install touchegg in order to enable multitouch gestures. Optionally, you can install touchegg-gce-git AUR as a graphical front-end. See more details in the dedicated wiki page.

Touchscreen button

The touchscreen button with a Windows logo is mapped as Super . However, key_down and key_up are generated simultaneously on touch release. The haptic feedback (vibration) when touching this button is currently not controllable via software.

Touchscreen stops working after suspension

Sometimes touchscreen stops working after resuming from suspension mode. You should be able to fix the problem reloading the usbhid and usbtouchscreen kernel modules:

# modprobe -r usbhid usbtouchscreen

ACPI

I modified /etc/acpi/default.sh to allow for some debugging and additional features (see below):

#!/bin/sh set $* group=$ device=$2 id=$3 value=$4 log_unhandled() < logger "ACPI event unhandled: $*" >case "$group" in button) case "$action" in power) /etc/acpi/actions/powerbtn.sh ;; lid) /etc/acpi/actions/lid.sh ;; *) log_unhandled $* ;; esac ;; ac_adapter) case "$value" in *) log_unhandled $* ;; esac ;; *) echo $* > /dev/tty5 log_unhandled $* ;; esac

Touchpad

The touchpad sends random input from time to time, especially when lid is closed. If you like your computer to keep running when the lid is closed, you may want to disable the touchpad with ACPI events:

#!/bin/bash export DISPLAY=:0 if grep closed /proc/acpi/button/lid/LID0/state then synclient TouchpadOff=1 2>/dev/tty5 && echo "lid closed, disabling touchpad" >/dev/tty5 else synclient TouchpadOff=0 2>/dev/tty5 && echo "lid open, eênabling touchpad" >/dev/tty5 fi

Of course, the echo statement is optional and for debug purposes.

Backlight

With newer kernels (I am currently using 3.17.6-1-ARCH ) backlight works out-of-the-box.

«old» (ref needed) kernels require boot argument

Screen backlight brightness can be manually set with

# echo $VAL > /sys/class/backlight/intel_backlight/brightness

with $VAL between 0 and 937

It is possible that you will get a permission denied error, in which case you can run

# chmod a+rw /sys/class/backlight/intel_backlight/brightness

which makes the brightness editable by any user.

Note: Some users have experienced brightness being stuck under Windows (10) (when you change it there is no actual change), it will most likely work under arch.

Battery

Battery info can be accessed with

ls /sys/class/power_supply/BAT1/*

Unfortunately, the values obtained there have no units (older Lenovo products had rates in mA, battery voltage, etc.)

Graphics

Steam has been known to crash trying to run games complaining about missing i965 module. It seems some applications treat it as accelerated, and some do not.

Читайте также:  Linux vnc server port

Resolution seems to be not so well supported by some desktop environments/window managers. Gnome-based DEs like Cinnamon and Mate, as well as XFCE and fvwm seem to work fine.

Users may wish to boost font-sizes, as the HiDPI screen can be hard to read in some settings.

If you have trouble detecting a display with the micro hdmi port, consider filing the plastic on the male hdmi plug back a bit (not on the laptop). See here. The rubber case can prevent the plug from inserting fully.

Rotation/Conversion

You can easily rotate screen with xrandr, however it does not rotate touchscreen/touchpad input which makes it fairly awkward to use. There is a project attempting to address this. Keyboard hardware-disables in tablet mode, but touchpad is still active which needs to be addressed. No ACPI or keycode signals appear to be emitted for the various screen rotation states.

See also

  • The LinLap site has some good information — see [1];
  • a good Review of Arch Linux on a HiDPI Lenovo Yoga 2 Pro by KeithCU with useful comments [2];
  • an installation guide written by Ubuntu users: [3].
  • color profile for fixing the mustard-yellow issue: [4]

Источник

Zeitwaechter / Installing Arch Linux on Lenovo Yoga 2 Pro (2015).md

This Tutorial is based on the — via (Bit)Torrent — downloadable ISO (Version 2016-10-01) in the download overview (https://www.archlinux.org/download/) and installation via USB.

! Please do not use an older ISO than the possible downloadable listed one at the time of your Arch Linux installation.

Note: This tutorial describes only one way and might not be valid any more for further versions of Arch Linux. There are many other ways how to do it.

Note2: The Arch Linux Wiki is the best documentation I have ever seen so far so I totally recommend it in case of need: https://wiki.archlinux.org/index.php/Main_page

Note4: This guide includes GRUB2 and systemd partition encryption on a higher security default.

Replace values within brackets including the brackets with what you prefer.

First — if you whish to change your keyboard layout (de-latin1): loadkeys Linux on lenovo yoga 2 pro

WLAN — DHCP-enabled Router-only

wifi-menu sucked so I refered to the wpa_ * commands which worked out of the box. You might want to refer to https://wiki.archlinux.org/index.php/Network_configuration#Static_IP_address before executing the dhcpcd command.

  • rfkill unblock wlan
  • wpa_passphrase [SSID] [password] > [filePath1][fileName1].conf
  • wpa_supplicant -B -i wlp1s0 -c [filePath1][fileName1].conf
  • systemctl start rfkill-unblock@wlp1s0.service
  • ip link set wlp1s0 up
  • dhcpcd
  1. Get the list of all current packages online and install fish shell (fish shell is optional) pacman -Sy fish
  2. Use fish shell fish
  1. Wipe the HDD dd if=/dev/zero of=/dev/[device] bs=4M status=progress oflag=sync
  2. Create partitioning 1 (boot) fdisk /dev/[device]
  • n
  • [ENTER]
  • [ENTER]
  • [ENTER]
  • +768M
  1. Create partition 2 (root) Type:
  • n
  • [ENTER]
  • [ENTER]
  • [ENTER]
  • [ENTER]
  1. Write changes Type: w
  1. Encrypt root partition cryptsetup -v —cipher aes-xts-plain64 —key-size 512 —hash sha512 —iter-time 1000 —use-urandom —verify-passphrase luksFormat /dev/[device]2
  2. Open the encrypted partition cryptsetup luksOpen /dev/[device]2 [mappingName]
  3. Create physical volume, volume groupe and logical volumes root / swap (you might want to variate in the partition amount, etc. ) ! Please look up how big your swap should be
  • pvcreate /dev/mapper/[mappingName]
  • vgcreate [groupName] /dev/mapper/[mappingName]
  • lvcreate -L [amount]GB -n swap [groupName]
  • lvcreate -l 100%FREE -n root [groupName]
  1. Setup swap mkswap -L swap /dev/mapper/[groupName]-swap
  2. Format FS of encrypted root partition (in bash )
  • mkfs.ext4 -F -O metadata_csum,64bit /dev/mapper/[groupName]-root
  1. Format FS of unencrypted boot partition (in bash )
  • mkfs.ext4 -F -O metadata_csum,64bit /dev/[device]1
  1. Root mount /dev/mapper/[groupName]-root /mnt
  2. Boot
  • mkdir /mnt/boot
  • mount /dev/[device]1 /mnt/boot
Читайте также:  Узнать ip адрес через линукс

Make LVM available in /mnt , in any case

Pacstrap Arch Linux to mounted root

  1. Install core packages + additional core pkgs (change if you need others) pacstrap /mnt base base-devel fish python python2 docker clamav firejail fail2ban rsync btrfs-progs grub efibootmgr snapper git etckeeper reflector acpid cpupower ldns bind unbound expat sshfs intel-ucode
  2. Gen fstab
  • bash
  • genfstab -pU /mnt >> /mnt/etc/fstab
  • exit
  1. Setting up fstab automatically sucks most of the times nano /mnt/etc/fstab

Edit and replace options for SSDs with the following: rw,async,noatime,discard,data=ordered

  1. uncomment en_US.UTF-8 (and e.g. de_DE.UTF-8)
  2. Save, then generate locale-gen
  3. Replace content (for convenience) in nano /etc/locale.conf
LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LL_CTYPE=de_DE.UTF-8 LL_NUMERIC=de_DE.UTF-8 LL_COLLATE=de_DE.UTF-8 LL_MONETARY=de_DE.UTF-8 LL_MESSAGES=de_DE.UTF-8 LL_PAPER=de_DE.UTF-8 LL_NAME=de_DE.UTF-8 LL_ADDRESS=de_DE.UTF-8 LL_TELEPHONE=de_DE.UTF-8 LL_MEASUREMENT=de_DE.UTF-8
KEYMAP=de-latin1 FONT=lat9w-16

2.1. and add a line 127.0.1.1 [hostname].localdomain [hostname]

1.2. HOOKS — Comment original line out and add: HOOKS=(keyboard systemd modconf block sd-encrypt sd-lvm2 filesystems fsck)

  1. Install needed packages pacman -S grub dosfstools os-prober
  2. Mount LVM, in any case
  • mkdir /run/lvm
  • mount —bind /hostrun/lvm /run/lvm
  1. Execute grub-install grub-install —target=i386-pc /dev/[device]
  2. Check out UUIDs and copy all /dev/[device]* and /dev/mapper/[Name]* UUIDs to external file (best case) blkid
  3. Edit Grub nano /etc/default/grub

5.1. Edit/Replace Resolution GRUB_GFXMODE=»1024×768″

5.2. Preload LVM Add lvm to GRUB_PRELOAD_MODULES=(. ) .

5.3. lower timeout (optional) GRUB_TIMEOUT=3

5.4. Replace the existing line with something like this (check params at the end if necessary for your CPU): GRUB_CMDLINE_LINUX=»rd.luks.uuid=[device]2 luks.options=discard rd.lvm.lv=main/main-root rd.lvm.lv=main/main-swap resume=UUID=[enc_swap] root=UUID=[enc_root] fsck.mode=force acpi_osi=’!Windows 2012′ i915.enable_psr=1 i915.enable_fbc=1 i915.lvds_downclock=1″

5.5.1. Re-Generate grub-mkconfig -o /boot/grub/grub.cfg

5.5.2. Alternatives If you do not install on sda-drives but use the newer nvme0n1-ish (m.2) drives, try grub-install /dev/nvme0n1 instead

5.6. Re-Edit root=UUID=[UUID] at the beginning of every linux line if it needs to be done (old grub) nano /boot/grub/grub.cfg

Might be continued or not..

  • User + Groups
  • Sudores
  • Secure SSH Setup
  • Make Firefox fit for the web, again
  1. Exit chroot and unmount /mnt
  • exit
  • umount -R /mnt
  1. Reboot your freshly configured Arch Linux device and hope it runs OOB and nobody — wether you nor me — screwed up 😛 reboot

Источник

Оцените статью
Adblock
detector