Giter Club home page Giter Club logo

build's Introduction

AArch64 Laptop Images

Warning - read this section first!

It is not currently possible to recover these devices if something horrible happens

This project was solely designed with a view to help users and developers bootstrap Linux on their supported devices. It is our aim, that in time, users will be able to take generic Linux distribution installers and use them directly to install Linux on these devices. In the meantime, we provide the parts required to trial specific distributions so users can get a feel.

We take no responsibility for any damage caused as a result of its use/abuse of any of the information or artifacts provided by this project. The software here is not locked down, hardened or tested to any commercially viable level. Any issues that arise (deletion of critical partitions, Windows no longer bootable, damage of sensitive or critial data as a result of exposed UFS partitions, etc) are solely the responsibility of the user and the user alone.

Contact us

IRC

Have a question? Fancy a chat? You can find us on IRC at #aarch64-laptops on Freenode

Mailing List

Updates and announcements are sent to the Mailing List. Sign-up HERE

Device Status

ASUS NovaGo TP370QL

  • Boots into Grub Normal Mode
  • Boots Linux kernel from rootfs' /boot partition (using Device Tree)
  • Boots to text Ubuntu login prompt/shell
  • SD Card Storage
  • USB
  • GUI Desktop (using Framebuffer)
  • Keyboard
  • Touchpad
  • Touchscreen
  • On-board Storage (UFS based)
  • WiFi
  • Bluetooth
  • LTE
  • Accelerated Graphics
  • Audio

HP Envy x2

  • Boots into Grub Normal Mode
  • Boots Linux kernel from rootfs' /boot partition (using Device Tree)
  • Boots to text Ubuntu login prompt/shell
  • SD Card Storage
  • USB
  • GUI Desktop (using Framebuffer)
  • Keyboard
  • Touchpad
  • Touchscreen
  • On-board Storage (UFS based)
  • WiFi
  • Bluetooth
  • LTE
  • Accelerated Graphics
  • Audio

Lenovo Miix 630

  • Boots into Grub Normal Mode
  • Boots Linux kernel from rootfs' /boot partition (using Device Tree)
  • Boots to text Ubuntu login prompt/shell
  • SD Card Storage
  • USB
  • GUI Desktop (using Framebuffer)
  • Keyboard
  • Touchpad
  • Touchscreen
  • On-board Storage (UFS based)
  • WiFi
  • Bluetooth
  • LTE
  • Accelerated Graphics
  • Audio

Lenovo Yoga C630

  • Boots into Grub Normal Mode
  • Boots Linux kernel from rootfs' /boot partition (using Device Tree)
  • Boots to text Ubuntu login prompt/shell
  • USB
  • GUI Desktop (using Framebuffer)
  • Keyboard
  • Touchpad
  • Touchscreen
  • On-board Storage (UFS based)
  • WiFi (UFS based)
  • Bluetooth
  • LTE
  • Accelerated Graphics
  • Camera
  • Audio
  • this works with recent kernels and instructions.

Overview

In recent months, various laptop manufacturers (Asus, HP, Lenovo, etc) have released devices based on Qualcomm's Snapdragon 835 and 845. The devices are delivered with Windows 10 pre-installed, but are able to run Linux. Unfortunately, due to some pretty serious obstacles, simply running the AArch64 version of the Ubuntu (or any distro for that matter) installer is not enough (even with Secure Boot disabled).

Installing

This project provides the user/owner some options to install Linux on these devices. The choices are as follows:

  1. Download a pre-built image and flash it onto an MicroSD card or USB flash drive
  2. Download an enabled version of a distrobution installer and install to UFS
  3. Use the quick-start.sh script to build your own image
  4. Execute each of the steps manually (still using the other helper scripts) to create your own bespoke image

Use an existing pre-built image

Only the latest Ubuntu LTS (currently Bionic) pre-built images are currently available.

Download THIS IMAGE and head to the Flashing the image then Booting into Ubuntu sections below.

Note: The default credentials for this image are; username: ubuntu and password ubuntu.

Use an enabled installer

  1. Update Windows
  • Note: Required because shipped firmware does not have support to boot ISO images
  • Boot into Windows and shut down, allow the updates to install (takes a while)
  • Once updated, it should be possible to boot ISOs
  1. Boot back into Windows and shrink the Windows partition
  • Resizing the Windows partition requires BitLocker to be disabled, as does booting without Secure Boot
    • Start Button > Settings > Update and Security > Device encryption > Turn off
  • Use the Disk Management tool to shrink the Windows partition
    • Right-click Start Button > Disk Management > Right-click C: > Shrink Volume
  • A shrink of anything upwards of (10000 MB) ~10GB should be okay
  1. Switch out of S mode
  • Note: In order to run 'cmd.exe' et. al, Windows {Home,Pro} is required
  • Click Start Button > Settings (cog icon) > Update & Security > Activation > Go to the Store > Get
  1. Disable Secure Boot in the BIOS
  • Note: Secure Boot will prevent unknown/unsigned images/ISOs to boot
  • Press 'Fn+F2' (or just 'F2' on some laptops) on boot to enter the BIOS
  • Select 'Security' tab > 'Secure Boot' > 'Disabled'
  • Select 'Exit' tab > 'Exit Saving Changes'
  1. Download Dimitri's Bionic installer from HERE
  2. Flash installer onto a USB stick using gnome-disks 'Restore Disk Image' option
  3. Boot the USB stick and select Install Ubuntu
  4. Follow the prompts
  • Partitioner nuances
    • WARNING: When you come to the partitioner, make sure Windows is detected
      • The top option should be "Install Ubuntu alongside Windows Boot Manager"
        • If it is not, STOP - there isn't a known way to recover Windows if it's trashed
    • ISSUE: Occational error during the partitioning phase of the install
      • During install the partitioner can offer to create 2 new partitions [IMAGE]
        • This is not correct - only a single partition should be set-up
      • Partitioning of EFI (#5 in this case) will fail with an error message [IMAGE]
      • If this happens, select "Install Ubuntu alongside Windows Boot Manager" again
        • This should culminate in a successful install
      • If the install appears to stall (no progress bar) after some time, you may need to reboot and start again. The partitioner should only offer to create a single partition (#5) this time and everything should go smoothly
  1. Once installed, boot back into Windows and open the Admin CMD console
  • Right-click Start Button > Command Prompt (Admin)
  • Carefully type bcdedit /set {bootmgr} path \EFI\ubuntu\grubaa64.efi
  1. Reboot
  2. Grub should now be the default bootloader
  • From here you can select to boot into 'Ubuntu' or 'Windows Boot Manager' [IMAGE]

Building your own image(s)

This option is helpful if you want to create bespoke images, or if you want to see how the build process works.

Note: Whichever method of building your own images you choose, please be aware that a lot of disk space will be required. The VM image, which will become the final image will be around 8GB and the Linux kernel source is around 1.5GB. On top of this, if one of the docker methods are selected, space will be required for the Docker images. Docker images are usually located in /var/lib/docker. It would be worth checking firstly where this is located/mounted and secondly how much free space is left on that partition.

There are more choices to make:

Note: Even the automatic method requires user input at the Ubuntu Installer stage.

  1. Automatically build an image using the quick-start.sh script (uses Docker containers)
  • Quickest and easiest
  • Doesn't allow for easy editing of the steps to create bespoke images
  • Keeps the host machine clean - doesn't install packages onto it
  • Only requirement is to have Docker installed
  1. Manually execute the steps to build an image inside a Docker container
  • Most control over how each component is installed - allows incremental edits
  • Keeps the host machine clean - doesn't install packages onto it
  • Only requirement is to have Docker installed
  1. Manually execute the stops to build an image on your host machine
  • Most control over how each component is installed - allows incremental edits
  • Host will be upgraded and packages will be installed directly onto the host
  • Only works on apt based distros (and only tested on Ubuntu)

Option 1: Automatically build an image using the quick-start.sh script

Note: This option uses Docker containers.

Firstly you will need to initialise the repository's sub-modules. See the Initialising the repository below.

Now issue the following command:

$ ./quick-start.sh

Note: Image creation using the quick-start.sh script is not a completely automated process. The user will still be required to manually go through the Ubuntu Installer and to enter their chosen username & password (twice - once for upload and the other to run the setup-vm.sh script with escalated privileges) during the package upload (to the VM) process.

IMPORTANT: It is of the utmost importance that SSH is installed as part of this process, or you will have to find a way to install it retroactively (it is possible, but is a pain). SSH is used to transport the package archive and configure scripts into the VM for installation/execution.

If successful an image named aarch64-laptops-ubuntu.img should be located in the output directory.

If it's present, head to the Flashing the image then Booting into Ubuntu sections below.

Option 2: Manually execute the steps to build an image inside a Docker container

Firstly you will need to initialise the repository's sub-modules. See the Initialising the repository below.

Building these images within containers is the least intrusive method to build your own image presented here. The only prerequisite is that Docker is installed on the host (for help with this, please refer to your distro's documentation). All other requirements pertain only to the running image/container, ensuring the host machine is kept as clean as possible.

Note: Something to bear in mind/read-up on; Running LibVirt in Docker requires the --privileged flag for networking purposes.

Installing Ubuntu into the VM

This stage requires the most amount of user interaction. Once the installer starts you will be required to go through each stage to install your bespoke version of Ubuntu Bionic.

IMPORTANT: It is of the utmost importance that SSH is installed as part of this process, or you will have to find a way to install it retroactively (it is possible, but is a pain). SSH is used to transport the package archive and configure scripts into the VM for installation/execution.

Using the containerised build environment to build Ubuntu

If it is likely that you will be building more than one image, the same image multiple times or you think there is a chance of build failure, it is recommended that a base image is installed using the provided Dockerfile. This will ensure the following, time consuming actions only take place once:

  1. Upgrade Bionic
  2. Install this project's basic prerequisites
  3. Install LibVirt/QEMU to run AArch64 VMs
  4. Install required packages to build the Linux kernel
  5. Install required packages to build the Grub bootloader
$ docker build -t aarch64-laptops-build-env:0.1 .
$ docker run -ti --privileged --name aarch64-laptops-ubuntu-vm                             \
       -v $PWD/isos:/isos -v $PWD/output:/output -v $PWD/scripts:/scripts                  \
       -v $PWD/src:/src   -v $PWD/output:/var/lib/libvirt/images                           \
       aarch64-laptops-build-env:0.1 /scripts/make-image.sh --install-ubuntu
Skipping the containerised build environment stage

If however, you just want to go for it, hope for the best and not install the pre-configured build environment, use the raw ubuntu:bionic image instead.

Note: Using the containerised build environment is advised. If anything goes wrong during the install, you will have to upgrade the system and re-install all of the prerequisites again. This all takes quite a lot of time.

$ docker run -ti --privileged --name aarch64-laptops-ubuntu-vm                             \
       -v $PWD/isos:/isos -v $PWD/output:/output -v $PWD/scripts:/scripts                  \
       -v $PWD/src:/src   -v $PWD/output:/var/lib/libvirt/images                           \
       ubuntu:bionic /scripts/make-image.sh --install-ubuntu

To save this container (required for further steps) do:

$ docker commit aarch64-laptops-ubuntu-vm aarch64-laptops-ubuntu-vm:0.1

# Optionally, remove the unused container
$ docker rm aarch64-laptops-ubuntu-vm
Building the Linux kernel

The Linux kernel is built from source. It should have been checked out during the initialisation stage (if you did not see the Initialising the repository section below and carry out the actions, please do so before executing this step). The Linux kernel source is located in src/linux.

$ docker run -ti --rm --name aarch64-laptops-kernel                                        \
       -v $PWD/isos:/isos -v $PWD/output:/output -v $PWD/scripts:/scripts -v $PWD/src:/src \
       aarch64-laptops-build-env:0.1 /scripts/make-image.sh --build-kernel
Building the Grub bootloader

The Grub bootloader is built from source. It should have been checked out during the initialisation stage (if you did not see the Initialising the repository section below and carry out the actions, please do so before executing this step). The Grub bootloader source is located in src/grub.

$ docker run -ti --rm --name aarch64-laptops-grub                                          \
       -v $PWD/isos:/isos -v $PWD/output:/output -v $PWD/scripts:/scripts -v $PWD/src:/src \
       aarch64-laptops-build-env:0.1 /scripts/make-image.sh --build-grub
Installing built packages into the VM and executing the configure stage
$ docker run -ti --rm --privileged --name aarch64-laptops-ubuntu-vm-setup                  \
       -v $PWD/isos:/isos -v $PWD/output:/output -v $PWD/scripts:/scripts                  \
       -v $PWD/src:/src   -v $PWD/output:/var/lib/libvirt/images                           \
       aarch64-laptops-ubuntu-vm:0.1 /scripts/make-image.sh --setup-vm

If successful an image named aarch64-laptops-ubuntu.img should be located in the output directory.

If it's present, head to the Flashing the image then Booting into Ubuntu sections below.

Option 3. Manually execute the steps to build an image on your host machine

Note: Only works on apt based distros (and only tested on Ubuntu).

Firstly you will need to initialise the repository's sub-modules. See the Initialising the repository below.

If there is a compelling reason preventing the use of Docker, the scripts/make-image.sh script can be executed directly on the host. It requires escalated privileges and will firstly upgrade the current system, then install packages directly onto the host.

$ scripts/make-image.sh --install-ubuntu
$ scripts/make-image.sh --build-kernel
$ scripts/make-image.sh --build-grub
$ scripts/make-image.sh --setup-vm

If successful an image named aarch64-laptops-ubuntu.img should be located in the /var/lib/libvirt/images directory.

If it's present, head to the Flashing the image then Booting into Ubuntu sections below.

Flashing the image

Note: An 8G MicroSD card or USB flash drive (or larger if you plan on installing packages) will be required.

The final image may be in one of two states; raw or xz compressed. If the image is compressed you will require xz utilities to extract the image before flashing can commence. Please check your Distro's documentation to find out which package they reside.

If the image has an *.xz file extension it is xz compressed. These images are firstly extracted using xzcat and flashed to the MicroSD card or USB flash drive using dd:

Option 1

Use the provided scripts/flash-prebuilt.sh script.

For example, if you want to boot the image on the Lenovo Yoga C630:

$ ./scripts/flash-prebuilt.sh lenovo-yoga-c630 /dev/<DEVICE> <IMAGE>

Note: is the whole device, not a partition e.g. /dev/sda and NOT /dev/sda1.

Note: See the help for more options/devices.

Option 2

Manually copy the image to the boot media.

If the image has an *.xz file extension it is an XZ compressed image. This images are flashed using a combination of xcat and dd:

$ xzcat <IMG>.xz | sudo dd of=/dev/<DEVICE> oflag=direct bs=1M status=progress iflag=fullblock

If the image has an *.img file extension it is a raw image. These images are flashed using dd only:

$ sudo dd if=<IMG>.img of=/dev/<DEVICE> oflag=direct bs=1M status=progress

Note: is the whole device, not a partition e.g. /dev/sda and NOT /dev/sda1.

If you created a generic image (i.e. not using ./quick-start.sh <MODEL>), then you will need to mount the boot device and link laptops.dtb with the specific DTB for your hardware.

For example, if you have the Lenovo Yoga C630:

$ sudo mount /dev/<DEVICE>2/ /mnt
$ cd /mnt/boot
$ ln -s laptop-lenovo-yoga-c630.dtb laptop.dtb
$ cd -
$ umount /mnt

Booting into Ubuntu

This project doesn't yet support Secure Boot. Thus it needs to be disabled before we can boot into this project's resultant Linux image.

Disabling Secure Boot on the ASUS NovaGo TP370QL

  1. Power off the machine
  2. Hold down the Power and Volume Up buttons until the BDS Menu appears
  3. Either press '1' or use the arrow keys to highlight the 1 Disable Secure Boot option and press return
  4. Press Volume Up to confirm
  5. Press any other key to continue
  6. Select 6 Shutdown option (same method as above)

Disabling Secure Boot on the HP Envy x2

Note: The HP Envy x2 does not appear to boot from the MicroSD Card automatically.

  1. Power off the machine
  2. Press and release the Power button, then press Esc repeatedly - the Startup Menu should appear
  3. BEWARE: THIS STEP IS NOT ADVISED - DO THIS AT YOUR OWN RISK !!
  • During testing we used the Clear All Secure Boot Keys to boot Linux
    • Obviously this might have serious side-effects - thus we do not condone this action

Disabling Secure Boot on the Lenovo C630

Note: While you are in the BIOS, another option you might wish to toggle is under Configuration / Hotkey Mode. This lets you change the row of function keys, so that they behave as F1-F12 by default, rather than having to press 'Fn' first.

Option 1 - Using a key combination

  1. Press Fn-F2 (or F2 if Hotkey Mode has already been toggled) during power up, to enter the BIOS
  2. Go into the Security tab
  3. Change Secure Boot to Disabled

Option 2 - Using Microsoft Windows

  1. Boot into Microsoft Windows
  2. Go into Settings
  3. Select the Update & Security tile
  4. Select Recovery from the left side panel
  5. Under Advanced setup select Restart now
  6. Highlight Troubleshoot and press Enter
  7. Highlight Advanced options and press Enter
  8. Highlight UEFI Firmware Settings and press Enter
  9. Select Restart
  10. Go into the Security tab
  11. Change Secure Boot to Disabled

Option 3 - Using the Grub bootloader

  1. Boot to the Grub menu
  2. Select System Setup
  3. Go into the Security tab
  4. Change Secure Boot to Disabled

Booting from MicroSD card on the ASUS NovaGo TP370QL

The MicroSD card is inserted into a small plastic (fragile) receiver/slide which is pushed into the side of the laptop chassis. To eject it you will require a paperclip or similar thin, stiff implement. Push your tool of choice into the tiny hole and the receiver/slide should protrude out. Simply, but very carefully insert the MicroSD card into the receiver/slide and gently push it back into the machine - it should lay flush.

Now power up the machine. It should boot to a Ubuntu login prompt. The credentials of which you set-up during the install stage.

Booting the HP Envy x2 from MicroSD card (booting from USB should be automatic)

Note: The HP Envy x2 does not appear to boot from the MicroSD Card automatically.

  1. Power off the machine
  2. Press and release the Power button, then press Esc repeatedly - the Startup Menu should appear
  3. Press the F9 key for Boot Device Options
  4. Select Boot From EFI File
  5. Navigate to the MicroSD card (it will be one of the VenHw*HD(Part1 devices)
  • Once selected, only <EFI> should be present.
    • If it's missing or there are more than just this directory shown, press Esc and try another device
  • The MicroSD card was always the 3rd one from the bottom during our testing
  1. Navigate though <EFI> -> <BOOT> -> BOOTAA64.EFI

Now power up the machine. It should boot to a Ubuntu login prompt. The credentials of which you set-up during the install stage.

Booting from USB

  1. Place the USB flash drive into the USB port

Now power up the machine. It should boot to a Ubuntu login prompt. The credentials of which you set-up during the install stage.

Using larger SD cards or USB flash drives

Since this project uses pre-built images, the root partition is limited to around 7GB. If you have used a larger device and wish to expand the partition please search the internet for something along the lines of "reclaim SD card space". There are literally 100s of articles on how to do this, mostly pertaining to the Raspberry Pi.

Note: We found that simply opening it up in gparted was the simplest option.

Further Reading

Initialising the repository

Seeing as this option requires the image to be built from source, the Linux kernel and Grub bootloader source is required. Fortunately, this project includes them as sub-modules. To pull down the source issue the following commands:

$ git submodule init
$ git submodule update # 1.5GB takes around 20 minutes on a 10Mb connection to checkout the Linux kernel

If there have been updates since the submodules were initialised, issues these commands to pull down the changes:

git submodule update --remote src/linux
git submodule update --remote src/grub

Testing GPU support

Please see the GPU README

Testing WiFi support

Please see the WiFi README.

Trouble Shooting

Updating from an older image/installer

Note: An older image will contain a v5.0.1 kernel

$ uname -r
5.0.1-laptops0.1-generic

Option 1: BEST

If at all possible, please reinstall using the latest installer using these instructions

Note: Doing so will save lots of messing around with kernel versions

Option 2: SUBOPTIMAL

Note: Only choose this option if you can't reinstall or used the new image/installer

WARNING: This option will require a little messing around

  1. Ensure no other instance of apt is running
$ sudo fuser -vki /var/lib/dpkg/lock
  1. Remove snapd (or the update process will freeze during the upgrade)
$ sudo apt remove snapd
  1. Update Bionic's installed packages
$ sudo apt update && sudo apt dist-upgrade
  1. Remove the currently running kernel (or it will clash the the new versioning semantics)
$ sudo apt remove *5.0.1-laptops* *5.2.0-99* linux-generic \
    linux-headers-generic linux-image-generic
$ sudo apt install linux-generic
  • Select 'No' when presented with "abort installation" ncurses screeen
  1. Ensure the EFI workaround will persist over the upgrade
$ sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="efi=novamap /' \
    /etc/default/grub
  1. Tell the Update Manager to conduct 'normal' (instead of LTS) upgrades
$ sudo sed -i s/Prompt=lts/Prompt=normal/ /etc/update-manager/release-upgrades
  1. Do the upgrade
$ sudo do-release-upgrade
  • Follow the prompts
  1. Reboot
$ sudo reboot
  1. Re-install snapd
$ sudo apt install snapd

build's People

Contributors

0x011011110 avatar mahiuchun avatar rfs613 avatar rhenwood-arm avatar shawnguo2 avatar sleepyeldrazi avatar sonicadvance1 avatar xnox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

build's Issues

Ubuntu update hangs

Looks like there is some problem with 'snapd'. It causes the 'apt upgrade' command to hang on my system.

The 'work-around' is to open another window, and 'pkill snapd' which unblocks the update. While this allows the upgrade to complete, I feel like there may be a better solution.

KVM-enabled kernel and a couple of other questions

  1. Is it possible to build a c630 image with a KVM-enabled kernel to see if virtualization works?
  2. Is it possible to build Ubuntu 19.10 for c630? Will the server version work without a desktop environment?
  3. Has anyone built any new preinstalls or ISO installers since Ubuntu 18.04?

sound fix (hack) ubuntu 20.04 5.5.7-rc1

using ucm2 files from;
https://git.linaro.org/people/srinivas.kandagatla/alsa-ucm-conf.git/

My machine lists the sound card as disabled with dummy output on cold boot, everytime i shutdown in panics reboots, on reboot sound card comes up and can be used after switching to headphones out then move volume bar then select speakers. To have sound on cold boot, first get sound working
then switch output to headphones.
sudo alsactl store
sudo chattr +i /var/lib/alsa/alsa.state
Now cold boot should present enabled soundcard just switch to headphones change volume and switch back to speakers
heres a script to do the switching and sound stuff for you. depending on boot my card is sometimes 0 sometimes 1 and the sleeps made it work %100 of. just add it to autostart

#!/bin/sh
#port 1
pacmd set-sink-port 1 "[Out] HeadPhones"
pactl set-sink-volume 1 +5%
sleep 1
pactl set-sink-volume 1 -5%
pacmd set-sink-port 1 "[Out] Speakers"
#port 0
pacmd set-sink-port 0 "[Out] HeadPhones"
pactl set-sink-volume 0 +5%
sleep 1
pactl set-sink-volume 0 -5%
pacmd set-sink-port 0 "[Out] Speakers"

GPU evaluation tutorial is missing information about getting a630_zap.{b00,b01,b02} firmwares, or link to utility for it's extraction from qcdxkmsuc850.mbn

Hello!

While hardware accelerated rendering works for me (after reboot from Windows to Linux) with both of gpu branch and wip/c630-v5.5 branch, I just noticed I been missing a630_zap.{b00,b01,b02} firmwares, mentioned in:

a630_zap.mdt and a630_zap.b0{0,1,2,3}

qcom/a630_zap.{mdt,b00,b01,b02} extracted from qcdxkmsuc850.mbn

As I understand from GPU tutorial I could get a630_zap.mdt just by renaming qcdxkmsuc850.mbn, but I can't find anywhere how to get a630_zap.{b00,b01,b02} or how to extract it from qcdxkmsuc850.mbn?

Sometimes boot is delayed due to UFS initialization error

I noticed that sometimes Linux 5.2.0-99.5laptops1 from PPA boot delayed by following error:

[   33.772190] ufshcd-qcom 1d84000.ufshc: ufshcd_abort: Device abort task at tag 7
[   33.774946] sd 0:0:0:5: [sdf] tag#7 CDB: Read(10) 28 00 00 00 00 00 00 00 01 00
[   33.777732] host_regs: 00000000: 1587031f 00000000 00000210 00000000
[   33.780508] host_regs: 00000010: 01000000 00010217 00000c96 00000000
[   33.783281] host_regs: 00000020: 00000000 00030e75 00000000 00000000
[   33.786061] host_regs: 00000030: 0000010f 00000001 80000010 00000000
[   33.788842] host_regs: 00000040: 00000000 00000000 00000000 00000000
[   33.791616] host_regs: 00000050: 661cd000 00000002 ab000080 00000000
[   33.794403] host_regs: 00000060: 00000001 ff1fffff 00000000 00000000
[   33.797195] host_regs: 00000070: 661cc000 00000002 00000000 00000000
[   33.799987] host_regs: 00000080: 00000001 00000000 00000000 00000000
[   33.802763] host_regs: 00000090: 00000002 15710000 00000000 00000003
[   33.805525] ufshcd-qcom 1d84000.ufshc: hba->ufs_version = 0x210, hba->capabilities = 0x1587031f
[   33.808338] ufshcd-qcom 1d84000.ufshc: hba->outstanding_reqs = 0xab000080, hba->outstanding_tasks = 0x0
[   33.811144] ufshcd-qcom 1d84000.ufshc: last_hibern8_exit_tstamp at 0 us, hibern8_exit_cnt = 0
[   33.813951] ufshcd-qcom 1d84000.ufshc: No record of pa_err uic errors
[   33.816735] ufshcd-qcom 1d84000.ufshc: No record of dl_err uic errors
[   33.819496] ufshcd-qcom 1d84000.ufshc: No record of nl_err uic errors
[   33.822236] ufshcd-qcom 1d84000.ufshc: No record of tl_err uic errors
[   33.824947] ufshcd-qcom 1d84000.ufshc: No record of dme_err uic errors
[   33.827660] ufshcd-qcom 1d84000.ufshc: clk: core_clk, rate: 200000000
[   33.830371] ufshcd-qcom 1d84000.ufshc: clk: core_clk_unipro, rate: 150000000
[   33.833118] HCI Vendor Specific Registers 00000000: 000000c8 00000000 00000000 00000000
[   33.835858] HCI Vendor Specific Registers 00000010: 00000000 00000000 00000001 5c5c052c
[   33.838566] HCI Vendor Specific Registers 00000020: 3f0113ff 30010001 00000000 00000000
[   33.841258] HCI Vendor Specific Registers 00000030: 00000000 00000000 02500000 00000000

Full log:
dmesg_ufs.zip

After booting completion UFS storage is accessible (but you already can see that in full log).

Sound unsupported

The Qualcomm Aqstic sound device does not seem to be supported, which means no sound whatsoever (at least not on my Yoga C630).
If someone else has sound working I'd like to know that. If it's indeed unsupported at this point please add it to the list of unsupported features on the main page so people know not to expect that.

Thanks.

UEFI add entry in UEFI menu (efi=novamap)

I want to add a UEFI entry on the native disk of a ASUS NovaGo TP370QL.

With kernel option efi=novamap, I can boot Ubuntu from USB but I cannot modify the UEFI table (cannot write into /sys/firmware/efi/efivars).

Without kernel option efi=novamap, I cannot boot Ubuntu from USB.

Any idea to solve this dilemna?

grub version 2.04 in Eoan today won't boot windows.

For reference: If you update to the Eoan today (Ubuntu 19.10), the version of grub you get (2.04) won't boot a windows partition if it is present on the laptop.

I fixed this using this PPA to install 2.02 version that is known to work:
https://launchpad.net/~aarch64-laptops/+archive/ubuntu/grub

After a recent search, I see there is a 2.04 for Eoan from Xnox -- which I haven't tried but might be a better option.
https://launchpad.net/~xnox/+archive/ubuntu/aarch64-laptops?field.series_filter=eoan

Failed recovery of WCN3990 firmware crash cause WiFi connection drop and makes system unstable

Hello!

On Linux 5.7 (from this branch) and 5.8 (from this or this branch) I observe frequent WiFi firmware crashes that cause three issues:

  1. Obviously WiFi connection get dropped.

  2. Continuous stream of following error into system logs eats up all free space on flash. This error literally eats gigabytes of disk space (in syslog, kernel.log and journalctl at the same time) very fast:

[ 3845.586537] ieee80211_restart_work called with hardware scan in progress
[ 3845.586648] WARNING: CPU: 7 PID: 11742 at net/mac80211/main.c:260 ieee80211_restart_work+0xf4/0x100 [mac80211]
[ 3845.586650] Modules linked in: rfcomm fuse xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv4 ip6table_filter ip6_tables iptable_filter bridge stp llc af_alg bnep q6asm_dai q6afe_dai q6routing q6asm q6adm q6dsp_common snd_soc_wsa881x regmap_sdw snd_soc_wcd934x soundwire_qcom gpio_wcd934x venus_enc wcd934x venus_dec regmap_slimbus videobuf2_dma_sg qrtr_smd msm qcom_spmi_adc5 venus_core qcom_vadc_common v4l2_mem2mem uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common hci_uart btqca btbcm snd_soc_sdm845 qcom_spmi_temp_alarm bluetooth snd_soc_rt5663 snd_soc_qcom_common videodev q6afe reset_qcom_pdc q6core ecdh_generic apr pdr_interface ti_sn65dsi86 mc snd_soc_rl6231 ecc hid_multitouch crct10dif_ce some_battery soundwire_bus drm_kms_helper qcom_rng ath10k_snoc ath10k_core ath mac80211 libarc4 cfg80211 slim_qcom_ngd_ctrl socinfo rfkill slimbus icc_osm_l3 qrtr
[ 3845.586708]  rmtfs_mem ns qnoc_sdm845 icc_rpmh icc_bcm_voter qcom_q6v5_pas ip_tables x_tables ipv6 nf_defrag_ipv6 btrfs blake2b_generic libcrc32c xor xor_neon zstd_decompress zstd_compress raid6_pq i2c_hid camcc_sdm845 i2c_qcom_geni qcom_q6v5_mss mdt_loader phy_qcom_qusb2 qcom_common qcom_glink_smem qcom_q6v5_ipa_notify qcom_sysmon qmi_helpers qcom_q6v5 panel_simple drm
[ 3845.586745] CPU: 7 PID: 11742 Comm: kworker/7:1 Not tainted 5.8.0-050800-generic #202007122030
[ 3845.586747] Hardware name: LENOVO 81JL/LNVNB161216, BIOS 9UCN33WW(V2.06) 06/ 4/2019
[ 3845.586775] Workqueue: events_freezable ieee80211_restart_work [mac80211]
[ 3845.586780] pstate: 80c00005 (Nzcv daif +PAN +UAO BTYPE=--)
[ 3845.586805] pc : ieee80211_restart_work+0xf4/0x100 [mac80211]
[ 3845.586827] lr : ieee80211_restart_work+0xf4/0x100 [mac80211]
[ 3845.586829] sp : ffff8000178c3d70
[ 3845.586831] x29: ffff8000178c3d70 x28: ffffd337f1357000 
[ 3845.586833] x27: ffff0000bdf5c748 x26: ffffd337f157ccf0 
[ 3845.586836] x25: 0000000000000000 x24: ffff0001efda1d20 
[ 3845.586838] x23: ffff0001fb8c1900 x22: ffff0001efda1d18 
[ 3845.586841] x21: ffff0001efda07e0 x20: ffff0000c8861b00 
[ 3845.586843] x19: ffff0001efda1d18 x18: 0000000000000000 
[ 3845.586845] x17: 0000000000000000 x16: ffffd337ef98b928 
[ 3845.586847] x15: ffffd337f1371000 x14: ffffd337f1581090 
[ 3845.586850] x13: 0000000000007428 x12: ffffd337f1580000 
[ 3845.586852] x11: ffffd337f1371000 x10: ffffd337f15806d8 
[ 3845.586854] x9 : 0000000000000001 x8 : 0000000000000000 
[ 3845.586856] x7 : 0000000000000004 x6 : 000000000000068a 
[ 3845.586859] x5 : 0000000000000001 x4 : 0000000000000000 
[ 3845.586861] x3 : 0000000000000001 x2 : ffff0001fb8b41f0 
[ 3845.586863] x1 : b50adb3cc93bdf00 x0 : 0000000000000000 
[ 3845.586866] Call trace:
[ 3845.586889]  ieee80211_restart_work+0xf4/0x100 [mac80211]
[ 3845.586900]  process_one_work+0x1bc/0x338
[ 3845.586903]  worker_thread+0x50/0x420
[ 3845.586906]  kthread+0x130/0x148
[ 3845.586912]  ret_from_fork+0x10/0x34

full dmesg (repeating part was cut out to make file smaller)

  1. When issue described in Item 2 happening it's become impossible to close applications that access network, perform reboot or shutdown, as shutdown always get stuck on stopping network-related system daemons.

Issue is reproducible with following 5 GHz access points:

  • QCA9880-BR4A (wireless adapter installed into SolidRun ClearFog Pro, in WiFi-5 mode)
  • ASUS RT-N56U A1 with Ralink RT3662F wireless adapter
  • ASUS RT-N56U B1 with MediaTek MT7612EN wireless adapter

Issue is reproducible with following 2.4 GHz access points:

  • MSM8996 (several SD820-based smartphones in Access Point mode)
  • ASUS RT-N56U A1 with Ralink RT3092L wireless adapter
  • NanoPi-R1 with Ampak AP6212 wireless adapter

linux-firmware package version is 1.188, wlanmdsp.mbn sha256sum is 92e1501254e6de78c0f2e2cf091507d488b608d07e53acd14813a82744823ec2

board-2.bin was generated by this script, because using this one lead to ath10k_snoc firmware loading error:

[    9.459510] ath10k_snoc 18800000.wifi: qmi chip_id 0x30214 chip_family 0x4001 board_id 0xff soc_id 0x40030001
[    9.459538] ath10k_snoc 18800000.wifi: qmi fw_version 0x2009856b fw_build_timestamp 2018-07-19 12:28 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1
[    9.462302] ath10k_snoc 18800000.wifi: failed to fetch board data for bus=snoc,qmi-board-id=ff from ath10k/WCN3990/hw1.0/board-2.bin
[    9.462387] ath10k_snoc 18800000.wifi: failed to find board file fw entry
[    9.462412] ath10k_snoc 18800000.wifi: failed to fetch board-2.bin or board.bin from ath10k/WCN3990/hw1.0

Service firmware partitions is available to user, even from file manager

Hello!

~$ lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda       8:0    0 113,6G  0 disk 
โ”œโ”€sda1    8:1    0   260M  0 part 
โ”œโ”€sda2    8:2    0   128M  0 part 
โ”œโ”€sda3    8:3    0   4,9G  0 part 
โ”œโ”€sda4    8:4    0 107,4G  0 part 
โ””โ”€sda5    8:5    0   950M  0 part 
sdb       8:16   0     4M  0 disk 
โ”œโ”€sdb1    8:17   0   3,5M  0 part 
โ””โ”€sdb2    8:18   0   128K  0 part 
sdc       8:32   0     4M  0 disk 
โ”œโ”€sdc1    8:33   0   3,5M  0 part 
โ””โ”€sdc2    8:34   0   128K  0 part 
sdd       8:48   0   128M  0 disk 
โ”œโ”€sdd2    8:50   0   128K  0 part 
โ””โ”€sdd3    8:51   0     1M  0 part 
sde       8:64   0     4G  0 disk 
โ”œโ”€sde1    8:65   0     8M  0 part 
โ”œโ”€sde2    8:66   0     8M  0 part 
โ”œโ”€sde3    8:67   0   128K  0 part 
โ”œโ”€sde4    8:68   0     1M  0 part 
โ”œโ”€sde5    8:69   0   256K  0 part 
โ”œโ”€sde6    8:70   0   256K  0 part 
โ”œโ”€sde7    8:71   0    16M  0 part 
โ”œโ”€sde8    8:72   0     8K  0 part 
โ”œโ”€sde9    8:73   0   256K  0 part 
โ”œโ”€sde10   8:74   0    16K  0 part 
โ”œโ”€sde11   8:75   0   512K  0 part 
โ”œโ”€sde12   8:76   0     2M  0 part 
โ”œโ”€sde13   8:77   0   128K  0 part 
โ”œโ”€sde14   8:78   0   512K  0 part 
โ”œโ”€sde15   8:79   0    16M  0 part 
โ”œโ”€sde16 259:0    0     5M  0 part 
โ”œโ”€sde17 259:1    0    64K  0 part 
โ”œโ”€sde18 259:2    0     4K  0 part 
โ”œโ”€sde19 259:3    0     2M  0 part 
โ”œโ”€sde20 259:4    0   512K  0 part 
โ”œโ”€sde21 259:5    0     2M  0 part 
โ”œโ”€sde22 259:6    0   128K  0 part 
โ”œโ”€sde23 259:7    0   512K  0 part 
โ”œโ”€sde24 259:8    0    16M  0 part 
โ”œโ”€sde25 259:9    0     5M  0 part 
โ”œโ”€sde26 259:10   0    64K  0 part 
โ””โ”€sde27 259:11   0     2M  0 part 
sdf       8:80   0   1,5G  0 disk 
โ”œโ”€sdf2    8:82   0     2M  0 part 
โ”œโ”€sdf3    8:83   0     2M  0 part 
โ”œโ”€sdf4    8:84   0     2M  0 part 
โ””โ”€sdf5    8:85   0   128K  0 part 
sdh       8:112  1  59,6G  0 disk 
โ”œโ”€sdh1    8:113  1   512M  0 part /boot/efi
โ””โ”€sdh2    8:114  1  59,1G  0 part /

(Ignore sdh, it's microSD I use to boot system.)

As you can see on screenshot below some partitions from list above is even available for mounting in Nautilus:

123

I'm afraid editing files on these devices (besides sda) or wrong device in dd command could cause grave consequences for motherboard. I don't know if my fear is justified, but if it's possible to brick motherboard, LTE modem or any other component by editing or removing files (intentionally or by accident) on these partitions, or by removing partitions itself, I think kernel driver should hide all block devices from UFS besides sda on these laptops, at least by default. To put this issue in perspective (again, only if my understanding of partitions content is correct, and only if it's possible to brick board/component this way) I have to note that it's impossible to repair for example Lenovo Yoga C630 WOS in countries where Lenovo doesn't sell it, even for money.

Surface Pro X

Hi! What are those Surface Pro X ACPI files for and how to use it here? Thanks in advance!

No touchpad on Yoga C630

Touchpad does not seem to be working on Lenovo Yoga C630 even though the documentation says it does.
If someone actually got it to work please provide the necessary information, if it's not working let's at least correct the documentation.

Any guide for c630?

I booted into the Ubuntu 18.04 installer in trial mode - but neither the desktop installer nor gparted can see the eUFS disk. I have shrunken the windows partition from within Windows - but what's the easiest way can I get Ubuntu onto the unallocated space and ensure GRUB will work when I change the boot manager?

low amperage usb devices dont work

my usb meter only shows .00 but anything like my ftdi usb2serial even with led on shows .00 any and all devices that show .00 will not work;
usb 1-1: new full-speed USB device number 9 using xhci-hcd
[ 1744.708325] usb 1-1: device descriptor read/64, error -71
[ 1744.943858] usb 1-1: device descriptor read/64, error -71
[ 1745.180184] usb 1-1: new full-speed USB device number 10 using xhci-hcd
[ 1745.307877] usb 1-1: device descriptor read/64, error -71
[ 1745.544013] usb 1-1: device descriptor read/64, error -71
[ 1745.657037] usb usb1-port1: attempt power cycle
[ 1746.316452] usb 1-1: new full-speed USB device number 11 using xhci-hcd
[ 1746.316715] usb 1-1: Device not responding to setup address.
[ 1746.524701] usb 1-1: Device not responding to setup address.
[ 1746.733083] usb 1-1: device not accepting address 11, error -71
[ 1746.860112] usb 1-1: new full-speed USB device number 12 using xhci-hcd
[ 1746.860416] usb 1-1: Device not responding to setup address.
[ 1747.072251] usb 1-1: Device not responding to setup address.
[ 1747.280475] usb 1-1: device not accepting address 12, error -71
[ 1747.281296] usb usb1-port1: unable to enumerate USB device

if an idle device jumps between .00 and .01 50 percent of the time, then it will enumerate 50 percent of the time. If i simply add a small load to these devices with a resistor or a inline usb vol/amp meter then they work fine.
im using the 5.7 patches ive tried the interconnect dts patches (dunno if that even makes sense) i know that enabling wifi in dts would break my right side usb port until recent patches. i may try with wifi and panel removed from dts and the min max regulator settings that come with those too and see if its any different.

Add support for Allview Allbook Q

Hello, I've just got a new Allview Allbook Q, which comes with Windows 10 Home. It doesn't seem to be among your supported laptops so I want to help out.

But first, what do I need to do to help? What should I provide, what should I test on my own etc.

SoC: Snapdragon 835
Internal storage: UFS (Universal Flash Storage) from Qualcomm. I assume already supported.
iGPU: Adreno 540
Touchpad + keyboard: I2C HID device (ACPI\QCOM001F\6 for bus, ACPI\QTEC0001\3 for device)

Any other details, available on request (as long as you can tell me how to get them). I can run acpidump on this system as well (32-bit x86 executables work since it's regular Windows 10).

shutdown without reboot hack

for sum reason on all kernels especially 5.7.x te shutdown is dicey IE it reboots instead of turning off because of errors. But my machine shutsdown fine if i disconnect the wifi (NOT shut it off) before shutting down. But I forget to disconnect so i made a systemd service to disconnect the wifi on shutdown early enuff for network-manager, qrtr to shutdown properly
/etc/systemd/system/iw-disconnect.service
[Unit]
Description=disconnect wifi
Before=shutdown.target

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/local/bin/disconnect-wifi.sh
TimeoutStartSec=0

[Install]
WantedBy=shutdown.target

AND the contents of /usr/local/bin/disconnect-wifi.sh

#!/bin/bash
nmcli device disconnect wlan0
exit

Now it boots and shutsdown perfectly

kernel 5.7.6 breaks sound

I saw a diff new? set ucm2 files at https://github.com/Srinivas-Kandagatla/alsa-ucm-conf/tree/C630 tried those but no help; error;

msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia1 mapping ok
msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia2 mapping ok
msm-snd-sdm845 soc@0:sound: CPU DAI SLIMBUS_0_RX for rtd SLIM Playback does not support capture
msm-snd-sdm845 soc@0:sound: ASoC: can't create pcm SLIM Playback :-22
msm-snd-sdm845 soc@0:sound: Sound card registration failed
msm-snd-sdm845: probe of soc@0:sound failed with error -22

removed checks from sound/soc/soc-pcm.c and sound/soc/sof/nocodec.c and i have sound again. still need to boot with /var/lib/alsa/asound.state set to headphones out to have sound on everyboot.

unrelated to sound needed to change; drivers/net/wireless/ath/regd.c ;
if (reg->current_rd != COUNTRY_ERD_FLAG && reg->current_rd != 0)
to
if (reg->current_rd != COUNTRY_ERD_FLAG)
or id have strange reg domain issues that could even lead to firmware crashes in certain situations.

my current kernel with horrible git commits (just earning git) and directions files for sound etc
https://github.com/bm16ton/yoga-c630-linux-kernel

Kernel doesn't boot after update

The kernel command line needs 'efi=novamap'. This may get dropped after 'update-grub2' is run -- which may happen after automatic kernel upgrade.

For a permanent solution, you can add 'efi=novamap' into the GRUB_CMDLINE_LINUX_DEFAULT string in this file:

/etc/default/grub

Battery status reading

Hello!

Maybe it's good idea to add "Battery status" into list of supported features on https://github.com/aarch64-laptops/build page?

In my case on Lenovo Yoga C630 WOS battery status is not available by default, however updating kernel from 5.0.0 to 5.2.0 (from PPA) and adding acpi=force to grub.cfg allow to workaround this issue.

Question about the firmware/booting ISOs

Not really an issue and off-topic - but since there's nowhere else to discuss I thought I would ask the question here:

Does anyone know which of the snapdragon laptops can boot Windows on ARM ISOs from external USB for restoring the operating system when the internal hard drive is completely erased?

Is the firmware different between, say, the HP Envy x2 (the first snapdragon laptop) and C630 (the more recent Lenovo offering)? I was hoping it would have got upgraded after all the issues with the earlier snapdragon laptops.

No mention of other distros

Is there a documented way to experiment with other linux distros on aarch64 laptops? I would be interested in seeing if a Fedora port is possible

Unstable USB devices detection on Lenovo Yoga C630 WOS

Hello!

I find that at least in case of branchy USB hub topology USB devices detection is unstable.

Topology:
Lenovo Yoga C630 WOS is connected to Belkin USB-C 3.1 Express Dock HD F4U093 via front host USB-C port
StarTech.com USB-C Hub HB30C5A2CSC and Dell UP3017 USB Hub is connected Belkin USB-C dock Type-A ports on the back.

Below is example of Kingston Digital 128GB Data Traveler Micro Duo USB 3C Flash Drive (DTDUO3C/128GB) connect attempt via Type-C port on StarTech.com USB-C Hub:

[17294.014401] usb 4-1.3.4.4: new SuperSpeed Gen 1 USB device number 17 using xhci-hcd
[17299.078299] usb 4-1.3.4.4: device descriptor read/8, error -110
[17299.186159] usb 4-1.3.4.4: new SuperSpeed Gen 1 USB device number 17 using xhci-hcd
[17304.454327] usb 4-1.3.4.4: device descriptor read/8, error -110
[17304.766292] usb 4-1.3.4.4: new SuperSpeed Gen 1 USB device number 18 using xhci-hcd
[17309.830210] usb 4-1.3.4.4: device descriptor read/8, error -110
[17309.938033] usb 4-1.3.4.4: new SuperSpeed Gen 1 USB device number 18 using xhci-hcd
[17315.206215] usb 4-1.3.4.4: device descriptor read/8, error -110
[17315.315568] usb 4-1.3.4-port4: attempt power cycle

Same issue is reproducible with Transcend JetFlash 850 Silver 64GB (TS64GJF850S). Both flash drives works fine via same ports of same hub on same laptop, on Windows.

Below is example of Sony 64GB USB Flash Drive (USM64CA1/S) connect attempt via Type-C port on StarTech.com USB-C Hub:

[18555.400071] usb 4-1.3.4.4: new SuperSpeed Gen 1 USB device number 22 using xhci-hcd
[18555.429835] usb 4-1.3.4.4: New USB device found, idVendor=054c, idProduct=09c3, bcdDevice= 1.00
[18555.429866] usb 4-1.3.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[18555.429883] usb 4-1.3.4.4: Product: Storage Media
[18555.429899] usb 4-1.3.4.4: Manufacturer: Sony
[18555.429914] usb 4-1.3.4.4: SerialNumber: 9C6211812173600009
[18555.432636] usb-storage 4-1.3.4.4:1.0: USB Mass Storage device detected
[18555.433416] scsi host1: usb-storage 4-1.3.4.4:1.0
[18556.583379] scsi 1:0:0:0: Direct-Access     Sony     Storage Media    0100 PQ: 0 ANSI: 6
[18556.584842] scsi 1:0:0:0: alua: supports implicit and explicit TPGS
[18556.584876] scsi 1:0:0:0: alua: No target port descriptors found
[18556.586645] sd 1:0:0:0: Attached scsi generic sg2 type 0
[18556.587005] sd 1:0:0:0: [sdc] 123715584 512-byte logical blocks: (63.3 GB/59.0 GiB)
[18556.587815] sd 1:0:0:0: [sdc] Write Protect is off
[18556.587829] sd 1:0:0:0: [sdc] Mode Sense: 43 00 00 00
[18556.588567] sd 1:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[18556.595070]  sdc: sdc1
[18556.599782] sd 1:0:0:0: [sdc] Attached SCSI removable disk
[18557.054323] FAT-fs (sdc1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[18595.707381] xhci-hcd xhci-hcd.0.auto: ERROR mismatched command completion event
[18595.707391] xhci-hcd xhci-hcd.0.auto: Timeout while waiting for setup device command
[18597.723418] xhci-hcd xhci-hcd.0.auto: Timeout while waiting for setup device command
[18597.931328] usb 4-1.3.4.4: device not accepting address 22, error -62

After that laptop reboot, this doesn't happen in Windows, as you can guess.

Unfortunately, Sony flash drive is not my, so I would not be able to reproduce "reboot after device not accepting address" in the future (that why I didn't register this reboot issue separately) but I write down logs of this behavior just in case it could be useful.

On other hand Kingston and Transcend flash drives is my, so I will be able to reproduce "device descriptor read error" or test fixes for this issue in the future.

Default swappiness to 0

In almost all cases these laptops are based on flash media (some of which has no discard support and may even my soldered down) and have a fairly decent quantity of RAM. Whilst shipping with swap enabled is sensible to cope with a few bits and pieces it might be good to set a low value for swappiness so we prefer to flush the page cache (some of which will be clean so no writes happen) rather than write anonymous memory out to swap.

Setting swappiness should just be a matter of dropping a file into /etc/sysctl.d containing the following:

vm.swappiness = 0

Update the kernel source

It appears that the ./quick-start.sh scripts will install a version of the kernel from the PPA (5.0.1) that's newer than the source linked in the linux submodule (5.0-rc5). If rebuilding from source, which branch should we be using to reproduce what's in the PPA?

Audio on Lenovo Yoga C630 WOS

Hello!

After reading this comment I copied mentioned firmwares to Linux partition and tried to boot kernel from wip/c630-v5.5 branch of this repository with this config. Unfortunately, audio driver doesn't start with following errors:

[   25.890873] msm-snd-sdm845 sound: ASoC: can't get playback BE for Primary TDM0 Playback
[   25.890878] msm-snd-sdm845 sound: ASoC: can't get playback BE for Primary MI2S Playback
[   25.890883] msm-snd-sdm845 sound: ASoC: can't get playback BE for Secondary MI2S Playback
[   25.890888] msm-snd-sdm845 sound: ASoC: can't get playback BE for Tertiary MI2S Playback
[   25.890893] msm-snd-sdm845 sound: ASoC: can't get playback BE for Quaternary MI2S Playback
[   25.890899] msm-snd-sdm845 sound: ASoC: can't get playback BE for Slimbus6 Playback
[   25.890905] msm-snd-sdm845 sound: ASoC: can't get playback BE for Slimbus5 Playback
[   25.890910] msm-snd-sdm845 sound: ASoC: can't get playback BE for Slimbus4 Playback
[   25.890916] msm-snd-sdm845 sound: ASoC: can't get playback BE for Slimbus3 Playback
[   25.890921] msm-snd-sdm845 sound: ASoC: can't get playback BE for Slimbus2 Playback
[   25.890926] msm-snd-sdm845 sound: ASoC: can't get playback BE for Slimbus1 Playback
[   25.890955] msm-snd-sdm845 sound: ASoC: can't get playback BE for Display Port Playback
[   25.890960] msm-snd-sdm845 sound: ASoC: can't get playback BE for HDMI Playback

Here is full dmesg
dmesg550.log

Video output via USB doesn't work on Lenovo Yoga C630 WOS

Hello!

After testing three USB-C hubs with HDMI (Belkin USB-C 3.1 Express Dock HD F4U093, Dell DA300 and Dell WD15) I can certainly conclude that output video via USB doesn't work on Lenovo Yoga C630 WOS. With Windows video output via right USB port works with all three USB-C hubs.

Linux 5.3rc1 log of Dell DA300 attaching to the right USB port

However, I not sure what actual problem here - USB driver bug or some unimplemented feature? Should I report it to upstream like issue #17 ?

Condition for packaging up kernel, grub and dts for delivery into virtual machine is always false

Hello!

Currently scripts/make-image.sh --setup-vm always fail for me with /patch/to/build/output/grub-linux-dtb.tgz: No such file or directory error, while all necessary files and folder is present in output (grub folder, three kernel deb packages and dts files).

If I didn't miss anything it's seems like this condition is always false for two reasons:

  1. "[ -d grub ]" is false because current directory in this part of the script is $PWD instead of $OUTDIR
  2. Even if current directory would be $OUTDIR instead of $PWD [ -f linux-*.deb ] and [ laptop*.dtb ] will always throw [: too many arguments error because there is more than one deb and more than one dts in $OUTDIR

As for item 2 I guess something like this should work:

if [ -d grub ] && [ "$(ls | grep 'linux-.*.deb' )" ] && [ "$(ls | grep 'laptop.*.dtb' )" ]; then

Sometimes reconnect is required after WCN3990 recovery

Hello!

From time to time I see WC3990 firmware crash right after "arm-smmu 15000000.iommu: Unhandled context fault" error in dmesg, then remoteproc detect crash and trying to handle crash, at least according to what I see dmesg. Three is three possible outcomes at this point:

  1. Device can not be recovered which lead to #51

  2. WCN3990 successfully recovered and normal operation continue.

  3. WCN3990 successfully recovered and ath10k_snoc tells system that it's still connection, but no traffic coming through WiFi connection. I have to reconnect to get WiFi working again.

In dmesg you can observer behavior number 2 from line 1025 to line 1068.
Behavior number 3 can be observed from line 1076 to line 1125 (at line 1125 I give up waiting and decided to apply workaround - reconnect).

WiFi on Lenovo Yoga C630?

Just curious if there is any chance of the internal WiFi on Lenovo Yoga C630 becoming functional? I can of course use a USB dongle / adapter, was just wondering if its possible to somehow activate the internal to avoid using the dongle. If not, totally understandable, just thought I would ask!

Linux 5.3rc1 from gpu branch doesn't boot on Lenovo Yoga C630 WOS

Hello!

I find that Linux 5.3rc1 from gpu branch doesn't boot on Lenovo Yoga C630 WOS. Boot stuck at following error message:

EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
found a panel-id!
EFI stub: Exiting boot services and installing virtual address map...

How kernel was installed:
sdm850-lenovo-yoga-c630.dtb copied to /boot (not sure, if this was necessary, as sdm850-lenovo-yoga-c630.dtb is also present in /usr/lib/linux-image-5.3.0-rc1-00055-g3b90f3cd6c59/qcom/ anyway).
firmware copied to /lib/libfirmware/qcom
linux-image-5.3.0-rc1_arm64-gpu.deb was installed with dpkg.
Workaround from issue #10 was removed (file /boot/laptop.dtb is deleted) just in case.

ath10k tons chaninfo messages fix

I didnt realize the firmware coming down from linux-firmware /lib/firmware/ath10k/WCN3990/hw1.0/firmware-5.bin was missing the firmware flag single-chan-info-per-channel. Ez enuff grab ath10k-fwencoder https://github.com/qca/qca-swiss-army-knife edit it and change
'mgmt-tx-by-ref': ATH10K_FW_FEATURE_MGMT_TX_BY_REF,
to;
'mgmt-tx-by-reference': ATH10K_FW_FEATURE_MGMT_TX_BY_REF,
its unrelated to our thing but still required. now
./ath10k-fwencoder --modify --features=wowlan,mgmt-tx-by-reference,non-bmi,single-chan-info-per-channel firmware-5.bin

The list of Firmware from Windows on the Lenovo Yoga c630 used by Linux

In order to get Wifi, GPU, etc working, we currently need to pull binary firmware off the Windows partition. @Celliwig has a script to do this automatically: https://github.com/Celliwig/Lenovo-Yoga-c630/tree/master/yoga_fw_extract

This Issue is to record a list of the file paths to the relevant firmware blogs on the Windows partition. Once the list is completed, an interested party could begin to pursue licensing these blobs for distribution in the Linux Kernel tree. With firmware included in the tree, the out-of-box Linux experience for these laptops can be significantly improved.

GPU rendering stall on Lenovo Yoga C630 WOS

Hello!

Today while browsing Steam store in Firefox (with enabled hardware acceleration) on Lenovo Yoga C630 WOS with Linux 5.3.2 (with patches and build config from gpu branch) rendering stop working, i.e. mutter froze, cursor doesn't move, switching to other VT doesn't work.

Relevant part from dmesg:

[15987.071656] WARNING: CPU: 6 PID: 934 at drivers/gpu/drm/msm/msm_gem_vma.c:37 msm_gem_purge_vma+0x60/0x68 [msm]
[15987.071659] Modules linked in: xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp fuse ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv4 ip6table_filter ip6_tables iptable_filter bridge stp llc dm_mod uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 rt2800usb rt2800lib videobuf2_common crc_ccitt rt2x00usb videodev mc rt2x00lib crct10dif_ce msm ath10k_snoc ath10k_core mac80211 hid_multitouch ti_sn65dsi86 reset_qcom_pdc libarc4 ath cfg80211 qcom_q6v5_mss qrtr qcom_q6v5_pas qcom_sysmon qcom_q6v5 qmi_helpers mdt_loader qcom_common qcom_glink_smem remoteproc ip_tables x_tables ipv6 nf_defrag_ipv6 btrfs libcrc32c xor xor_neon zstd_decompress zstd_compress raid6_pq i2c_qcom_geni
[15987.071702] CPU: 6 PID: 934 Comm: kswapd0 Not tainted 5.3.2 #1
[15987.071704] Hardware name: LENOVO 81JL/LNVNB161216, BIOS 9UCN33WW(V2.06) 06/ 4/2019
[15987.071708] pstate: 40c00005 (nZcv daif +PAN +UAO)
[15987.071725] pc : msm_gem_purge_vma+0x60/0x68 [msm]
[15987.071742] lr : msm_gem_purge_vma+0x60/0x68 [msm]
[15987.071744] sp : ffff00001337ba00
[15987.071745] x29: ffff00001337ba00 x28: 000000000000017c 
[15987.071747] x27: ffffca992fec0f00 x26: ffff00001337bbe8 
[15987.071750] x25: ffff00001337bbe8 x24: ffff490287977ac0 
[15987.071752] x23: dead000000000100 x22: dead000000000122 
[15987.071753] x21: ffffca980bd41dc0 x20: ffffca980bd41d10 
[15987.071755] x19: ffffca98a1223b00 x18: 0000000000000010 
[15987.071757] x17: 0000000000000000 x16: ffff4902f0d9678c 
[15987.071758] x15: ffffffffffffffff x14: ffff4902f238b6c8 
[15987.071760] x13: ffff00009337b777 x12: ffff00001337b780 
[15987.071761] x11: ffff4902f23a4000 x10: ffff00001337b700 
[15987.071763] x9 : 00000000ffffffd0 x8 : ffff4902f1281e78 
[15987.071764] x7 : 0000000000000532 x6 : ffffca993b8c21d8 
[15987.071766] x5 : ffffca993b8c21d8 x4 : 0000000000000000 
[15987.071768] x3 : ffffca993b8c9118 x2 : 0f047b1c4af1d100 
[15987.071769] x1 : 0000000000000000 x0 : 0000000000000024 
[15987.071771] Call trace:
[15987.071789]  msm_gem_purge_vma+0x60/0x68 [msm]
[15987.071806]  put_iova+0x74/0xc8 [msm]
[15987.071823]  msm_gem_purge+0x9c/0x158 [msm]
[15987.071839]  msm_gem_shrinker_scan+0x124/0x190 [msm]
[15987.071848]  do_shrink_slab+0x13c/0x248
[15987.071850]  shrink_slab+0xb4/0x2c8
[15987.071852]  shrink_node+0xd8/0x4d0
[15987.071854]  balance_pgdat+0x2c8/0x558
[15987.071856]  kswapd+0x1d4/0x380
[15987.071861]  kthread+0x12c/0x130
[15987.071866]  ret_from_fork+0x10/0x18
[15987.071868] ---[ end trace 9c65bcdece34d055 ]---

Full dmesg

Ubuntu 19.10 with today updates.
Firefox 69.0.1
Mesa 19.2.0

P.S. On the bright side, at this moment this issue happened once, which already much, much more stable than Adreno driver for Windows.

cpu opp table 5.9.2, working cpu boost/turbo patch

So updating from 5.9.1 to 5.9.2 i lost 2.84ghz as a possible speed. The update includes a check that compares the hardware interface listings against the opp table. The 2.8ghz entry was/is 2803200000 which is not valid on my yoga c630 (A diff between sdm845 and sdm850?) , and since the LUT doesnt have a corresponding OPP entry it wont work. Also the yoga has a 2956800000 entry in LUT. So I added the 2 entries

	cpu4_opp33: opp-2841600000 {
		opp-hz = /bits/ 64 <2841600000>;
		opp-peak-kBps = <7216000 25497600>;
	};
	
	cpu4_opp34: opp-2956800000 {
		opp-hz = /bits/ 64 <2956800000>;
		opp-peak-kBps = <7216000 25497600>;
	};

Now 2.84ghz is back. I also see the same thing in regards to the 2.96ghz entry now as i do on previous kernels. cpufreq-info lists 2.96 but also says "frequency should be within 826 MHz and 2.84 GHz"
cat /sys/devices/system/cpu/cpufreq/policy4/scaling_boost_frequencies returns 2956800
but even in coldest conditions with all cpu cores maxed it never switches to 2.96ghz and I dont know of anyway to force turbo mode. cat cat /sys/kernel/debug/opp/cpu4/opp:2956800000/turbo would return N so I added turbo-mode; to the opp entry but it stil wont jump. Anyone been able to get turbo modes working? I see in a patch for qcom-cpufreq-hw here https://patchwork.kernel.org/project/linux-pm/patch/[email protected]/ that his available freq maxout at 2.6ghz and 2803200 listed as his turbo freq. I find it a little suspicious that the turbo boost on the sdm850 is only 110mhz. So im worried my available freqs actually have turbo freqs mixed in?

UPDATE: I just patched qcom-cpufreq-hw.c to remove turbo flag from last cpu freq, then dropped the cpu thermal trips by 5c and crit by 10c in sdm845.dtsi . It now lists 2.96ghz as usable and everything scales nicely under load, staying at 2.96ghz for a fair amount then auto adjusts to 2.84ghz max for even longer, then eventually under max load hits 2.75ghz max and stays. As soon as the temp drops the higher freqs become available again. This seems fine to me, and basically how turbo works except that 2.96ghz is select-able? Anyway any ideas or suggestions on how to do this the correct way is appreciated.

UPDATE2: so simply adding cpufreq_enable_boost_support(); to line 317 of qcom-cpufreq-hw.c I now can "echo 1 > /sys/devices/system/cpu/cpufreq/boost" to enable turbo frequencies!! Well along with the opp table additions added above

patch with above changes plus a 5c lower temp alert here;
bm16ton/yoga-c630-linux-kernel@a266263

UPDATE3: even tho functionally it doesnt make any difference i moved the new freqs to sdm850-lenovo-yoga-c630.dts it seems the correct way and now the new freqs wont show in /sys/kernel/debug/opp for sdm845 devices (not that it matters) and split everything into 3 patches;
add boost support to qcom-cpufreq-hw
https://github.com/bm16ton/yoga-c630-linux-kernel/commit/a702ba94e8a8f5c32ad5d30a5f996b9f39b64af6.patch
add the 2 freqs to sdm850 dts
https://github.com/bm16ton/yoga-c630-linux-kernel/commit/301f0047da5750ddc6b528e084540d621124f466.patch
drop temp alerts by 5c and crit by 10c in sdm845.dtsi
https://github.com/bm16ton/yoga-c630-linux-kernel/commit/0f9e46aa812f74a56012ccf8fac9d2032d22ff42.patch

I emailed these to what i hope was the appropriate maintainers, the 2 new freqs i have received a response and hopefully will go thru. still waiting to hear about qcom-cpufreq-hw.

Yoga c630 venus

Im currently using the wip-5.5.0 branch , audio,wifi,bt,lcd brightness, even gps is working. Just cant get the venus video coders to work... on the 5.5 branch dmesg says;

qcom-venus aa00000.video-codec: Adding to iommu group 7
qcom-venus aa00000.video-codec: failed to reset venus core
qcom-venus: probe of aa00000.video-codec failed with error -110

on the few 5.7 kernels i could get to boot, where very little hardware worked it would say;

qcom-venus aa00000.video-codec: Adding to iommu group 8
qcom-venus aa00000.video-codec: non legacy binding
qcom-venus aa00000.video-codec: invalid firmware metadata
qcom-venus aa00000.video-codec: fail to load video firmware
qcom-venus: probe of aa00000.video-codec failed with error -22

Ive tried every version of the venus-5.2 firmware files i can find, on both 5.5 and 5.7 kernels same results as stated. Not sure if i should trust the 5.7 "invalid firmware metadata" or not.

UPDATE: copied qcvss850.mbn from windows partition, used pil-splitter and copied the files to firmware diectory. now I get.
[ 3.965785] qcom-venus aa00000.video-codec: Adding to iommu group 4
[ 3.967932] qcom-venus aa00000.video-codec: non legacy binding
[ 4.270350] qcom-venus aa00000.video-codec: failed to reset venus core
[ 4.276469] qcom-venus: probe of aa00000.video-codec failed with error -110

powertop drops cpu max freqs to lowest

So with PowerTOP version v2.11-1-g7ef7f79 from official repo for Ubuntu 20.04 powertop will lower the max cpu freq to lowest possible setting. Sometimes it does this only for the 4 lower cores, sometimes only the 4 higher cores and sometimes all cores. Dmesg doesnt show any msgs and the only thing I can see thats changed is
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
and/or
/sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq
everything can be "fixed" by simply;
sudo echo 2956800 > /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq
sudo echo 1766400 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq

My assumption is its the "Frequency stats" section is the problem. Tho on occasion the problem hasnt started until I change "tunables" then make changes to wifi and bluetooth. Usually changing the bluetooth and or wifi states drops both sets of cpu core to minimum, but that could just be timing IE the cre speeds where gonna drop anyway and I just happened to be enabling/disabling wifi/bt stuff. The commands it runs for BT and wifi work fine on their own from cli with no change in cpu speed, /bin/hciconfig hci0 up &> /dev/null &
iw dev wlan0 set power_save off
iw dev wlan0 set power_save on

After powertop exits I do get the message;
modprobe cpufreq_stats failedLoaded 0 prior measurements
RAPL device for cpu 0
RAPL device for cpu 0
glob returned GLOB_ABORTED
Leaving PowerTOP

This could very well be just a powertop issue, I didnt know if anyone else had any information about this before I started to dig too deeply and reinvent the wheel.

UPDATE: Seems I waisted everyones time. Looks like the the scaling_max_frequency restore after a cpu "wiggle" in powertop was the culprit. I edited abstract_cpu.cpp and commented out the lines that "restore" scaling_max_frequency and so far so good. If anyone wants it
https://github.com/bm16ton/yoga-c630-linux-kernel/raw/master/C630/powertop_2.11-1build3_arm64.deb
Only mods made where abstract_cpu.cpp and for sum reason there was a fair amount of autoconf related issues building from the official repo source. Uninstalling autoconf-archive and replacing the pthread check at begining of configure.ac with CXXFLAGS="$CXXFLAGS -pthread" did the trick

Keyboard doesn't work with upstream Linux 5.4.0rc8 on Lenovo Yoga C630 WOS

Hello!

I found that keyboard doesn't work with Linux 5.4.0rc8 Snapdragon build installed from mainline ppa (unlike 5.3 from eoan repository builds from mainline ppa supposed to be based on upstream code with minimum changes that you can see in patches at the top of the page). I wonder if that config issue or upstream kernel actually missing some code that necessary for keyboard support?

kernel 5.9.? purging X bytes message

So a new msg started spamming dmesg very recently (sumwhere between 5.9.1 and 5.9.3) ;

[11866.832760] Purging 20971520 bytes
[11866.857594] Purging 8429568 bytes
[11866.861663] Purging 10485760 bytes
[12369.120969] Purging 786432 bytes
[12380.074388] Purging 565248 bytes
[12380.604109] Purging 569344 bytes
[12381.151748] Purging 8519680 bytes
[12385.085723] Purging 8421376 bytes
[12449.150418] Purging 634880 bytes
[12464.443418] Purging 741376 bytes
[12479.710876] Purging 2424832 bytes
[12501.224198] Purging 524288 bytes
[12523.581713] Purging 1482752 bytes
[12523.708330] Purging 1314816 bytes
[12524.878558] Purging 2097152 bytes

It took a min but i believe this is coming from;
drivers/gpu/drm/msm/msm_gem_shrinker.c
I dont know how detrimental that message is but maybe changing line
pr_info_ratelimited("Purging %lu bytes\n", freed << PAGE_SHIFT);
to
pr_info_ratelimited("msm_gem_shrinker Purging %lu bytes\n", freed << PAGE_SHIFT);
would help identify issues

upower fix for battery

upower wasnt seeing the max voltage and guessing something slightly off, so i edited src/linux/up-device-supply.c replaced voltage_full_design with charge_full_design all seems well now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.