Lenovo Yoga c630 (lenovo-yoga-c630)

From postmarketOS
Lenovo Yoga C630
Manufacturer Lenovo
Name Yoga C630
Codename lenovo-yoga-c630
Released 2019
Category testing
Original software Windows
Original version 10
Hardware
Chipset Qualcomm Snapdragon 850 (SDM850)
CPU Octa-core (4x 2.9 GHz Kryo 385 Gold & 4x 1.7 GHz Kryo 385 Silver)
GPU Adreno 630
Display 1920x1080 IPS Touch + Stylus
Storage 128GB
Memory 8GB
Architecture AArch64
Type laptop
Unixbench Whet/Dhry score -
Features
Touchscreen
Works
Display
Works
WiFi
Works
FDE
Works
Mainline
Works
Battery
Works
3D Acceleration
Works
Audio
Partial
Bluetooth
Works
Camera
Broken
GPS
Partial
Mobile data
Works
Internal storage
Works
USB OTG
Works
Sensors
Hall Effect
Works
Power Sensor
Works
Misc
Keyboard
Works
Touchpad
Works
HDMI/DP
Broken
Stylus
Works


Note Support for this device is not merged yet, you'll need to check out the yoga-c630 branch of pmaports to try this out

Contributors

Users owning this device

Installation

Make the following changes in the EFI setup application:

EFI Config Option Value
Secure Boot Disabled
Linux Boot Enabled

Use pmbootstrap to build your own installation image (choose lenovo as the vendor and yoga-c630 as the device).

$ pmbootstrap init
$ pmbootstrap install --fde

The most straight forward way to install pmOS to the internal UFS storage (at least until ondev2), is to build a USB drive with a pmOS install, boot it, then use pmbootstrap to build/flash an image to the nvme disk. The process looks something like this:

# coreutils is optional, just for full fat dd with progress support
$ pmbootstrap install --disk /dev/<usb disk> --add pmbootstrap,gptfdisk,coreutils
# Boot the usb disk on the laptop
$ pmbootstrap init
# Figure out which storage device has your EFS partition on it, it should be the biggest and also contains windows.
# It's usually /dev/sda or /dev/sdf. Look for "EFI System Partition" in the output
$ sudo blkid
# Getting this wrong could leave your device hard bricked... Replace /dev/sdX with the correct device.
$ pmbootstrap install --sdcard /dev/sdX 
# Now make sure the ESP bit is set
$ sudo gdisk /dev/sdX
Command (? for help): x
...
Expert command (? for help): a
Partition number (1-2): 
Partition number (1-2): 1
Known attributes are:
0: system partition
1: hide from EFI
2: legacy BIOS bootable
60: read-only
62: hidden
63: do not automount

Attribute value is 0000000000000000. Set fields are:
  No fields set

Toggle which attribute field (0-63, 64 or <Enter> to exit): 0
Have enabled the 'system partition' attribute.
Attribute value is 0000000000000001. Set fields are:
0 (system partition)

Toggle which attribute field (0-63, 64 or <Enter> to exit): 

# Write out the new partition table and exit partitioning
Expert command (? for help): w

Manual partitioning

For manual flashing (e.g. to dual boot with windows or another distro) the following serves as a reference, but NOT a guide (you probably don't want to nuke the drive if you plan to keep windows).

$ sudo gdisk -l /dev/sdf
# Check that /dev/sdf is definitely the device with windows on, it should be the biggest and have an EFI system partition. If not then work out which device is.

$ sudo gdisk /dev/sdf

# Delete the entire partition table (your windows install will be gone)
Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y

# Then create a brand new ESP
Command (? for help): n
Partition number (1-128, default 1): 
First sector (6-29765626, default = 256) or {+-}size{KMGTP}: 
Last sector (256-29765626, default = 29765375) or {+-}size{KMGTP}: 512M
Current type is 8300 (Linux filesystem)
# !!! Don't forget to set the right partition type GUID
Hex code or GUID (L to show codes, Enter = 8300): ef00
Changed type of partition to 'EFI system partition'

# Create a new root partition
Command (? for help): n
Partition number (2-128, default 2): 
First sector (6-29765626, default = 131328) or {+-}size{KMGTP}: 
Last sector (131328-29765626, default = 29765375) or {+-}size{KMGTP}: 
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): 
Changed type of partition to 'Linux filesystem'

# It should now look like this
Command (? for help): p
Disk /dev/sdf: 29765632 sectors, 113.5 GiB
Model: H28S8Q302CMR    
Sector size (logical/physical): 4096/4096 bytes
Disk identifier (GUID): 5F036999-BEC0-41C1-B610-B709E6E15220
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 5
First usable sector is 6, last usable sector is 29765626
Partitions will be aligned on 256-sector boundaries
Total free space is 756 sectors (3.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1             256          131072   511.0 MiB   EF00  EFI system partition
   2          131328        29765375   113.0 GiB   8300  Linux filesystem

# Now set the bootable attributes on the ESP
Command (? for help): x
...
Expert command (? for help): a
Partition number (1-2): 
Partition number (1-2): 1
Known attributes are:
0: system partition
1: hide from EFI
2: legacy BIOS bootable
60: read-only
62: hidden
63: do not automount

Attribute value is 0000000000000000. Set fields are:
  No fields set

Toggle which attribute field (0-63, 64 or <Enter> to exit): 0
Have enabled the 'system partition' attribute.
Attribute value is 0000000000000001. Set fields are:
0 (system partition)

Toggle which attribute field (0-63, 64 or <Enter> to exit): 

# Write out the new partition table and exit partitioning
Expert command (? for help): w

# It should now look like this
$ sudo gdisk -l /dev/sdf
GPT fdisk (gdisk) version 1.0.9.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdf: 29765632 sectors, 113.5 GiB
Model: H28S8Q302CMR    
Sector size (logical/physical): 4096/4096 bytes
Disk identifier (GUID): 5F036999-BEC0-41C1-B610-B709E6E15220
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 5
First usable sector is 6, last usable sector is 29765626
Partitions will be aligned on 256-sector boundaries
Total free space is 756 sectors (3.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1             256          131072   511.0 MiB   EF00  EFI system partition
   2          131328        29765375   113.0 GiB   8300  Linux filesystem

# Now we can flash the postmarketOS boot and root partition images
$ pmbootstrap export
$ sudo dd if=/tmp/postmarketOS-export/lenovo-yoga-c630-boot.img of=/dev/sdf1 status=progress
$ sudo dd if=/tmp/postmarketOS-export/lenovo-yoga-c630-root.img of=/dev/sdf2 status=progress

Known issues

Display initialization is quite quirky and occasionally doesn't work. The GPU and display stack in general can be quite fragile, although once it's running it usually doesn't fall over.

See also

Support for the device isn't merged yet, so thinks links won't work.