Git Product home page Git Product logo

linux-on-huawei-matebook-13-2019's Introduction

Linux on Huawei MateBook 13 (2019)

Brain dump: MateBook 13 (Wright-W19) running Debian heavily inspired by lidel's documentation of running Linux on MateBook X.

Background

Huawei MateBook 13, released in 2019, has at least two modifications (different CPUs, integrated vs. dedicated graphics). Both come with Microsoft Windows 10 and there initially was no information at all concerning Linux support.

I am running Debian on the more simple MateBook 13 variant, model Wright-W19. This repository documents what works and what does not.

Reportedly, it also holds true for at least one 2020 Huawei Matebook 13 (AMD Ryzen 5 3500) running Elementary OS.

If you like this page and want it to get even better and more useful, feel free to contribute issues and pull requests, or just buy me a coffee.

Linux Support Matrix

Device Model Works Notes
Processor Intel Core i5-8265U ✔ Yes 8 cores, power states etc seem to work out of the box
Graphics Intel UHD Graphics 620 ✔ Yes via standard kernel driver
Memory 8192 MB ✔ Yes
Display 13 inch 2:3, 2160x1440 (2K) ✔ Yes resolution is correctly detected by xrandr, backlight control works via native function keys and can be controlled by KDE settings, see below for details on scaling issues
Storage Samsung SSD, 256 GB ✔ Yes via standard kernel driver
Wifi Intel Cannon Point Wireless-AC 8265 (a/b/g/n/ac) ✔ Yes requires kernel 4.14 and firmware (firmware-iwlwifi non-free package)
Bluetooth Intel Bluetooth 5.0 ✔ Yes works as expected
Soundcard Intel Cannon Point-LP High Definition Audio ✔ Yes see below for details
Speakers ✔ Yes
Microphone ✔ Yes out of the box
Webcam HD Camera (13D3:56C6) ✔ Yes works out of the box, indicating light too
Ports 2 × USB-C ✔ Yes charging works only via left port, external display only via right one, but it is a known hardware limitation of the laptop
Power button ✔ Yes needs to be pressed for at least a second to generate event
Fingerprint Reader Goodix GXFP5187 ❌ No located on the power button, see below for details
Battery Dynapack HB4593J6ECW (42 Wh) ✔ Yes see below for details
Lid ACPI-compliant ✔ Yes works as expected, though ACPI complains in logs
Power management ✔ Yes works, see below for details
Keyboard ✔ Yes see below for details
Touchpad ELAN962C:00 04F3:30D0 ✔ Yes touchpad is detected and works in KDE (though not in Debian installer), see below for details
Port Extender MateDock 2 dongle included with the laptop ✔ Yes D-SUB, full-size HDMI, USB-C and USB-A work as expected

BIOS updates

Huawei provides downloadable BIOS updates packaged for Windows. With some effort, these can be installed from Linux.

To update BIOS, make sure fwupd is installed. You'll also need firmware-packager script and gcab that it depends on. I strongly advice having a bootable USB drive for bootloader recovery close at hand, too. Laptop should be on AC power for firmware updater to work.

PLEASE read through all the steps before you start and make sure you have at least a vague understanding of the process! Don't hold me responsible if you trash your system or brick your BIOS!!!

  1. Download BIOS from Huawei website. As of version 1.28 the BIOS comes in a .zip file that is somewhat of a "Russian doll" that needs to be unpacked.

    1. The downloadable .zip contains a signature and another .zip file with the same name.

    2. That second .zip file contains a WRIWU128.EXE file that is a self-extractable archive. In Linux, you can use 7z to unpack it (7z x WRIWU128.EXE).

    3. Inside there is BIOS_1.28.exe that is the actual BIOS file. You need to put it in the directory you have firmware-packager in.

  2.  ./firmware-packager --firmware-name HuaweiBIOS --device-guid 4ab52f4e-04c0-47ec-af33-a4f5c28ce0b7 --developer-name Huawei --release-version 0.1.28 --exe ./BIOS_1.28.exe --bin ./UEFI_FW.bin --out bios.cab
    
  3.  fwupdmgr install bios.cab
    
  4. Reboot (or hibernate) and hold F12 upon boot to select updater from list of devices. It reboots again during the process, so make sure to press F12 during the second reboot, too, for the process to continue.

  5. Now your new BIOS is installed and you may check its version holding F2 during the next reboot. However, your UEFI boot record is likely messed up as the result of Step 4, so your system won't boot from SSD any longer.

  6. Fix your bootloader using the bootable USB drive. I used a Debian Live image with persistence that had grub-efi-amd64 and its dependencies pre-installed, so it was only a matter of mounting /boot and /boot/efi to /mnt/system/ and issuing

     sudo grub-install --boot-directory=/mnt/system/boot --bootloader-id=debian --target=x86_64-efi --efi-directory=/mnt/system/boot/efi
    

Your mileage may vary.

For older versions, the doll was less complex. For 1.0.5 the second .zip contained the .bin BIOS directly, so you'd have the second .zip in your firmware-packager directory and the command would be:
 ./firmware-packager --firmware-name HuaweiBIOS --device-guid 4ab52f4e-04c0-47ec-af33-a4f5c28ce0b7 --developer-name Huawei --release-version 0.1.0.5 --exe ./MateBook_13_BIOS_1.05.zip --bin ./MateBook_13_BIOS_1.05/WRIWU105.bin --out bios.cab

Temperature

Out of the box fan control is very much acceptable, with fans starting up as processor heats up under load and shutting down when not required. In general, under "office workload" the laptop remains cool and fans remain switched off.

If you want correct CPU temperature displayed in byobu status notifications, add the following line to your .byobu/statusrc:

MONITORED_TEMP=/sys/class/hwmon/hwmon1/temp1_input

Display

Fractional Scaling

On KDE, Deepin and other Qt-based desktop environments, fractional scaling is supported without any hassle but this is not the case for GTK-based desktop environments such as GNOME and XFCE. Using Wayland can be an option, but the apps that don't support Wayland natively will still have issues such fuzziness all over the window. A workaround for Xorg allows for 150% scaling without any tear at the cost of a little performance drop: Copy 20-intel.conf and 10-monitor.conf to /etc/X11/xorg.conf.d/ and reboot. It is worth noticing that kernels between 5.0 and 5.5 have known issues with desktop scaling, fixed in 5.5. Ubuntu users can use Ubuntu-18.04-HWE kernel that contains the fix and also is free of the log flooding issue.

Soundcard

Sound generally works OK out of the box, the only thing not working is headphones autodetection (i.e. it is necessary to manually switch from speakers to headphones and back). This can be fixed, as pointed out by ffftwo and Feodor Rusanov:

sudo sh -c "echo 'options snd-hda-intel model=alc255-acer,dell-headset-multi' >> /etc/modprobe.d/sound.conf"

You may need to reset ALSA after this for the headphones to work:

sudo alsactl restore

The headset microphone will not be switched to automatically when a microphone-enabled headset is plugged. However, there will be an option to switch to it, and the system will automatically switch back to the internal microphone as soon as the headset is unplugged.

Fingerprint Reader

There's currently no way to make this model work in Linux, however, there's work in progress to make this happen.

Battery

Main battery features, such as current status, charging/discharging rate and remaining time estimates work out of the box.

Battery protection

Huawei's proprietary PC Manager allows to switch on battery protection with several modes for charge/discharge threshold while connected to AC power. For instance, it is possible to make the laptop maintain the battery charge between 40% and 70%, which is supposed to greatly reduce battery wear (batteries are known to lose capacity when constantly sitting at close to 100% charged). The problem is that Huawei PC Manager is a Windows-only piece of software.

You can use matebook-applet to have GUI on Linux for this functionality. Under the hood it utilizes Huawei-WMI device driver that fully supports Matebook 13, including settings for battery protection, since version 3.0. The driver only works with Linux kernel 5.0 and newer (you can install 5.2 from Debian Backports). Kernels 5.5 and newer have the sufficient version of the driver already included.

Furthermore, since GNOME does not provide a system tray out-of-box for the applet to use, there is Huawei WMI Controls extension implementing a similar interface.

For those running older kernels I developed a script (you can download archive with this and the other script from releases page). The script depends on ioport (available as package in Debian) and needs to be run as root:

sudo batpro [help|status|off|home|office|travel]

The first three options are self-explanatory. home sets thresholds to 40% and 70%, office to 70% and 90%, travel to 95% and 100% (these are the three modes Huawei PC Manager makes available). You can also do

sudo batpro custom [1-100] [1-100]

to set the thresholds to any percentages you like. This batpro script is really a modification of a more general script by aymanbagabas, so you can use that one instead if you like. Both are based on a dirty hack, and the proper solution is using Huawei-WMI driver.

Battery protection works by not charging the laptop if battery is already above the minimal threshold when plugged into AC, and stopping the charging as soon as the battery charge reaches the maximum threshold. The battery controller is known to restore the thresholds to defaults after time: on MateBook X it is known to happen after a reboot or three, and Angry Ameba demonstrated (source in Russian) that battery controller settings get reset after several hours on a switched off MateBook 13. Obviously, Huawei PC Manager monitors this and restores these settings as required. Huawei-WMI driver and my script don't.

This behaviour may be really annoying: you hibernate your laptop, wake it up next Monday, work for several hours, plug it in for a night and go to bed, only to find out in the morning that battery protection is off and the battery stayed on 100% for good six hours. If you're using Huawei-WMI driver, this situation can easily be fixed using a solution provided by Rouven Spreckels (these pieces get installed automatically if you use matebook-applet's Debian repository):

$ git clone https://github.com/qu1x/huawei-wmi.git
$ cd huawei-wmi
$ sudo make install

You may then use the same Makefile to set thresholds so that they are reinstated after wakeups and reboots:

$ sudo make [off|home|office|travel]

You can also add your user to the huawei-wmi group:

$ sudo usermod -a -G huawei-wmi $USER

In this case you don't need sudo to set thresholds.

Beware, though, that if you plug the laptop in before waking it up, the magic won't work (knowing that Windows' behaviour is exactly the same may provide some consolation).

Power Management

Suspend to S3 state works out of the box. For hibernation to work Secure boot must be disabled in BIOS. Laptop seems to wake up without any issues.

Keyboard

Keyboard mostly works out of the box, including the not-so-documented hotkeys (Fn+Left for Home, Fn+Right for End, Fn+Up for PgUp, Fn+Down for PgDn). However, Microphone Mute, WiFi Switch and Huawei keys don't work out of the box.

To have them working there's a driver that is already incorporated in Linux kernel, just not yet in Debian. It can be installed (v1.0) using DKMS .deb package that the author provides.

Version 2.0 of the same driver allows for the Microphone LED to work, too. This requires running kernel 5.0 or later (5.2 is avalable from Debian Backports).

Fn-Lock

Behaviour of the top row of keys on MateBook 13 is somewhat complex. By default, they behave as special keys (brightness, volume, etc.), but if you press them simultaneously with Fn or any modifier (Ctrl, Alt, Shift) they behave as F-keys (F1 through F12). You can press Fn once so that an LED on it lights up, then the top row of keys starts behaving as F-keys, with or without any modifier (including Fn itself). This behaviour can be lived with, but you can't do things like Ctrl+Ins or Alt+Shift+PrtSc (because Ins and PrtSc are F11 and F12, respectively, and pressing them with modifier forces them to be F-keys).

Since BIOS v1.05 this behaviour was changed slightly for PrtSc and Ins keys (F11 and F12). Without Fn key, the keys work as follows:

Key Shift Ctrl Alt
F10 Shift+F10 Ctrl+F10 Alt+F10
F11 Shift+PrtSc Ctrl+PrtSc no keypress
F12 Shift+Ins Ctrl+Ins Alt+Ins

Still no way to do Alt+PrtSc.

Fortunately, Huawei's PC Manager has an option to invert this behaviour. If an option is activated (we call this option Fn-Lock), the upper row of keys become F-keys, and act like special keys only when Fn is pressed or switched on. In this mode other modifiers don't change behaviour, so it becomes possible to do Alt+PrtSc. Unfortunately, PC Manager is Windows-only.

Huawei-WMI driver since version 2.0 makes it possible to use Fn-Lock on Linux. For those running Linux kernel older than 5.0 there's a simple script (you can download archive with this and the other script from releases page).

The script depends on ioport (available as package in Debian) and needs to be run as root:

sudo fnlock [on|off|toggle|status]

GUI for this functionality is also included in matebook-applet.

Touchpad

General features like two-finger scrolling and three-finger touch work out of the box, more options can be made available by installing xserver-xorg-input-synaptics. No pressure sensitivity or palm detection, though.

Log flooding issue

Out of the box touchpad floods system logs with error messages incomplete report (14/65535) upon every touch - up to the point where rubbing your finger against touchpad produces 15% CPU usage by syslog. The corresponding patch is available in backported kernel 5.2 in Debian. If you want to use stock kernel instead, patching the kernel with adapted patch fixes this issue.

A quick (and, admittedly, dirty) way to patch a Debian kernel:

$ apt source linux
$ cd linux-4.19.28 		<<< or whatever version is current
$ bash debian/bin/test-patches ../elan-touchpad-oldkernel.patch 	<<< or whichever one you're applying, and you can apply more than one here

<<< have a beer or three, this is going to take quite some time

$ cd ..
$ sudo dpkg -i linux-image-4.19.0-4-amd64-unsigned_4.19.28-2a~test_amd64.deb	<<< or whichever you've just compiled

Credits

Thanks to Angry Ameba for kindly supplying the information necessary to make battery protection and Fn-Lock work.

Eternal gratiude and enormous thanks to Ayman Bagabas for single-handedly developing Huawei-WMI driver and sharing tons of useful information.

Also thanks to Mert Demir for giving information about fractional scaling and adding the related info.

linux-on-huawei-matebook-13-2019's People

Contributors

egormanga avatar frusanov avatar hleonardoms avatar nekr0z avatar validatedev avatar yungcheeze 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

linux-on-huawei-matebook-13-2019's Issues

how to patch archlinux kernel for issue on touchpad log flooding?

Been reading this
https://github.com/nekr0z/linux-on-huawei-matebook-13-2019#log-flooding-issue

Recently i tested this, and yeah it sucks,
My CPU is going Up When Im moving mouse with touchpad
especially when i keep scrolling.... or use 2 finger and just do a circular motion...scrolling...

ive downgrade and upgrade my kernel from lts to latest but no avail to fix...
but i dont have idea how to manually patch my kernel...

anyone can help thanks

Suspension Wake Up

Hi,

I'm running manjaro 18.04 Illyria KDE when i suspend using the lid the system wakes up the screen randomly and consumes a lot of battery while in this state.

Do you have any recommendation?

Mic led

Hi,

After looking at the DSDT table, I've come to these methods SMLS and PAFF which seem to turn something on and off, and also called from the AMW0 device (WMI device) in SSDT5. Using a tool like acpi_call could you provide the return values and observe any changes to your system using the following?

$ echo "\_SB.PCI0.LPCB.H_EC.ECCC 0x48 0xA0 Zero Zero" | sudo tee /proc/acpi/call
$ sudo cat /proc/acpi/call
$ echo "\_SB.PCI0.LPCB.H_EC.ECCC 0x48 0xA1 Zero Zero" | sudo tee /proc/acpi/call
$ sudo cat /proc/acpi/call
$ echo "\_SB.PCI0.LPCB.H_EC.ECCC 0x45 0xA0 Zero Zero" | sudo tee /proc/acpi/call
$ sudo cat /proc/acpi/call
$ echo "\_SB.PCI0.LPCB.H_EC.ECCC 0x45 0xA1 Zero Zero" | sudo tee /proc/acpi/call
$ sudo cat /proc/acpi/call

Thank you!

matebook 2020 amd, ppi 102/200

Hi! The density of pixels per inch on my macbook 13 2020 amd 102. It is stated in the characteristics of 200. Free AMD GPU driver problem?
image

Battery protection settings

Hey!
Could you please try this script for setting charging/discharging thresholds. I got it to work on my matebook x pro 2018 it would be really nice to test it on another device. Thanks!

About HiDPI support

What can you do when you try to change DPI to 150%? Cannot find a way that works perfect.

Matebook 13 2020 i7: unkown device found as a battery

Hi,
I don't know if it is the right repo to post that but since I installed ubuntu on my computer I got an unknown device called ELAN224A:00 04F3:2841:

  ID-1: BAT0 charge: 35.4 Wh condition: 42.3/41.6 Wh (102%) 
  model: DYNAPAC HB4593J6ECW-31T0 status: Charging 
  Device-1: hid-0018:04F3:2841.0002-battery model: ELAN224A:00 04F3:2841 
  charge: N/A status: N/A ```

Does anyone got that problem or know what is this device? (Possibly wrongly detected as a battery)

headphone jack detection

Try this, it works for me.

cat /etc/modprobe.d/sound.conf
options snd_hda_intel model=dell-headset-multi

Any update how Matebook 13 2020 works?

Hello, I want to buy Matebook 13 2020 with Ryzen 7-3700U, RX Vega 10 [code: Heng-W29A]. Is there a update somewhere how it works with linux?
Regards.

ACPI Error

Hi,
I have this error with ACPI in Debian Buster 10.

Sep 28 00:15:41 DESKTOP-8C1C69N kernel: [ 4.182598] ACPI BIOS Error (bug): Could not resolve symbol [_SB.PCI0.LPCB.H_EC.CHRG.PPSS.FCHG], AE_NOT_FOUND (20200110/psargs-330)
Sep 28 00:15:41 DESKTOP-8C1C69N kernel: [ 4.182793] ACPI Error: Aborting method _SB.PCI0.LPCB.H_EC.CHRG.PPSS due to previous error (AE_NOT_FOUND) (20200110/psparse-531)
.
Do anyone help me?
Thanks

Trackpad tap sensitivity?

I'm finding that the trackpad is too sensitive for my tastes, especially when you want to use tap-to-click. By default, approximately one skin cell is needed to trigger the tap event.

This page shows how a Linux user might change trackpad sensitivity:

xinput --set-prop [device number] "Synaptics Finger" 50 80 257

which seems to work for everyone else, can't help us, because MateBook trackpad doesn't seem to have "Synaptics Finger".

Anybody got a solution? Not sure if anybody else cares about this issue, or if I should just learn to keep my paws off the pad.

What is the maximum battery life you had with matebook 13 in your installation?

I wanna confirm if im the only one experiencing a fast battery depletion in my huawei matebook 13
its like 2 and half hours then the batery runs out..

before in windows im getting 6-7 hrs ...

most of the time im just surfing web, and coding, and compiling stuff...

i should be getting a decent amount of batterylife like before in windows..

If anyone have a good advice please share it

batpro: iopl failed

I'm using Matebook 13 AMD version, get this when trying to run batpro:
Screenshot from 2019-11-22 19-19-40

My dmidecode:

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.1.1 present.
Table at 0xAE5DB000.

Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
	Vendor: HUAWEI
	Version: 1.04
	Release Date: 09/10/2019
	Address: 0xE0000
	Runtime Size: 128 kB
	ROM Size: 8192 kB
	Characteristics:
		PCI is supported
		PNP is supported
		BIOS is upgradeable
		BIOS shadowing is allowed
		Boot from CD is supported
		Selectable boot is supported
		EDD is supported
		ACPI is supported
		USB legacy is supported
		Smart battery is supported
		BIOS boot specification is supported
		Targeted content distribution is supported
		UEFI is supported
	BIOS Revision: 1.4
	Firmware Revision: 1.4

Handle 0x0001, DMI type 1, 27 bytes
System Information
	Manufacturer: HUAWEI
	Product Name: HN-WX9X
	Version: M1010
	Serial Number: -
	UUID: 20191006-acd5-6498-ef71-acd56498ef72
	Wake-up Type: Power Switch
	SKU Number: C500
	Family: MateBook

Handle 0x0002, DMI type 2, 16 bytes
Base Board Information
	Manufacturer: HUAWEI
	Product Name: HN-WX9X-PCB
	Version: M1010
	Serial Number: -
	Asset Tag: TBD
	Features:
		Board is a hosting board
		Board is replaceable
	Location In Chassis: Not Specified
	Chassis Handle: 0x0003
	Type: Motherboard
	Contained Object Handles: 0

Handle 0x0003, DMI type 3, 23 bytes
Chassis Information
	Manufacturer: HUAWEI
	Type: Notebook
	Lock: Not Present
	Version: M1010
	Serial Number: -
	Asset Tag: TBD
	Boot-up State: Safe
	Power Supply State: Safe
	Thermal State: Safe
	Security Status: None
	OEM Information: 0x00000000
	Height: Unspecified
	Number Of Power Cords: 1
	Contained Elements: 0
	SKU Number: Heng-W19BL

Handle 0x0004, DMI type 4, 48 bytes
Processor Information
	Socket Designation: FP5
	Type: Central Processor
	Family: Zen
	Manufacturer: Advanced Micro Devices, Inc.
	ID: 81 0F 81 00 FF FB 8B 17
	Signature: Family 23, Model 24, Stepping 1
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
		SEP (Fast system call)
		MTRR (Memory type range registers)
		PGE (Page global enable)
		MCA (Machine check architecture)
		CMOV (Conditional move instruction supported)
		PAT (Page attribute table)
		PSE-36 (36-bit page size extension)
		CLFSH (CLFLUSH instruction supported)
		MMX (MMX technology supported)
		FXSR (FXSAVE and FXSTOR instructions supported)
		SSE (Streaming SIMD extensions)
		SSE2 (Streaming SIMD extensions 2)
		HTT (Multi-threading)
	Version: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx  
	Voltage: 1.2 V
	External Clock: 100 MHz
	Max Speed: 3700 MHz
	Current Speed: 2100 MHz
	Status: Populated, Enabled
	Upgrade: None
	L1 Cache Handle: 0x0005
	L2 Cache Handle: 0x0006
	L3 Cache Handle: 0x0007
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified
	Core Count: 4
	Core Enabled: 4
	Thread Count: 8
	Characteristics:
		64-bit capable
		Multi-Core
		Hardware Thread
		Execute Protection
		Enhanced Virtualization
		Power/Performance Control

Handle 0x0005, DMI type 7, 27 bytes
Cache Information
	Socket Designation: L1 - Cache
	Configuration: Enabled, Not Socketed, Level 1
	Operational Mode: Write Back
	Location: Internal
	Installed Size: 384 kB
	Maximum Size: 384 kB
	Supported SRAM Types:
		Pipeline Burst
	Installed SRAM Type: Pipeline Burst
	Speed: 1 ns
	Error Correction Type: Multi-bit ECC
	System Type: Unified
	Associativity: 8-way Set-associative

Handle 0x0006, DMI type 7, 27 bytes
Cache Information
	Socket Designation: L2 - Cache
	Configuration: Enabled, Not Socketed, Level 2
	Operational Mode: Write Back
	Location: Internal
	Installed Size: 2048 kB
	Maximum Size: 2048 kB
	Supported SRAM Types:
		Pipeline Burst
	Installed SRAM Type: Pipeline Burst
	Speed: 1 ns
	Error Correction Type: Multi-bit ECC
	System Type: Unified
	Associativity: 8-way Set-associative

Handle 0x0007, DMI type 7, 27 bytes
Cache Information
	Socket Designation: L3 - Cache
	Configuration: Enabled, Not Socketed, Level 3
	Operational Mode: Write Back
	Location: Internal
	Installed Size: 4096 kB
	Maximum Size: 4096 kB
	Supported SRAM Types:
		Pipeline Burst
	Installed SRAM Type: Pipeline Burst
	Speed: 1 ns
	Error Correction Type: Multi-bit ECC
	System Type: Unified
	Associativity: 16-way Set-associative

Handle 0x0008, DMI type 9, 17 bytes
System Slot Information
	Designation: PCI-1
	Type: x1 PCI Express x1
	Current Usage: Available
	Length: Other
	ID: 2
	Characteristics:
		PME signal is supported
		Hot-plug devices are supported
	Bus Address: 0000:00:02.2

Handle 0x0009, DMI type 11, 5 bytes
OEM Strings
	String 1: $HUA001CN10000
	String 2: $HUA0833
	String 3: OemString3

Handle 0x000A, DMI type 13, 22 bytes
BIOS Language Information
	Language Description Format: Long
	Installable Languages: 2
		zh|CN|unicode,0
		en|US|iso8859-1,0
	Currently Installed Language: en|US|iso8859-1,0

Handle 0x000B, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 8 GB
	Error Information Handle: Not Provided
	Number Of Devices: 2

Handle 0x000C, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x000B
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 4096 MB
	Form Factor: SODIMM
	Set: None
	Locator: DIMM 0
	Bank Locator: P0 CHANNEL A
	Type: DDR4
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 2400 MT/s
	Manufacturer: Hynix
	Serial Number: 00000000
	Asset Tag: Not Specified
	Part Number: --VK    
	Rank: 1
	Configured Memory Speed: 2400 MT/s
	Minimum Voltage: 1.2 V
	Maximum Voltage: 1.2 V
	Configured Voltage: 1.2 V

Handle 0x000D, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x000B
	Error Information Handle: Not Provided
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 4096 MB
	Form Factor: SODIMM
	Set: None
	Locator: DIMM 0
	Bank Locator: P0 CHANNEL B
	Type: DDR4
	Type Detail: Synchronous Unbuffered (Unregistered)
	Speed: 2400 MT/s
	Manufacturer: Hynix
	Serial Number: 00000000
	Asset Tag: Not Specified
	Part Number: --VK    
	Rank: 1
	Configured Memory Speed: 2400 MT/s
	Minimum Voltage: 1.2 V
	Maximum Voltage: 1.2 V
	Configured Voltage: 1.2 V

Handle 0x000E, DMI type 19, 31 bytes
Memory Array Mapped Address
	Starting Address: 0x00000000000
	Ending Address: 0x001FFFFFFFF
	Range Size: 8 GB
	Physical Array Handle: 0x000B
	Partition Width: 2

Handle 0x000F, DMI type 20, 35 bytes
Memory Device Mapped Address
	Starting Address: 0x00000000000
	Ending Address: 0x000FFFFFFFF
	Range Size: 4 GB
	Physical Device Handle: 0x000C
	Memory Array Mapped Address Handle: 0x000E
	Partition Row Position: Unknown
	Interleave Position: Unknown
	Interleaved Data Depth: Unknown

Handle 0x0010, DMI type 20, 35 bytes
Memory Device Mapped Address
	Starting Address: 0x00000000000
	Ending Address: 0x000FFFFFFFF
	Range Size: 4 GB
	Physical Device Handle: 0x000D
	Memory Array Mapped Address Handle: 0x000E
	Partition Row Position: Unknown
	Interleave Position: Unknown
	Interleaved Data Depth: Unknown

Handle 0x0011, DMI type 21, 7 bytes
Built-in Pointing Device
	Type: Touch Pad
	Interface: Other
	Buttons: 2

Handle 0x0012, DMI type 22, 26 bytes
Portable Battery
	Location: in the back, on the bottom side
	Manufacturer: DYNAPACK
	Manufacture Date: 08/03/2019
	Serial Number: 0566
	Name: -
	Chemistry: Lithium Ion
	Design Capacity: 0 mWh
	Design Voltage: 11400 mV
	SBDS Version: Not Specified
	Maximum Error: 1%
	OEM-specific Information: 0x00000042

Handle 0x0013, DMI type 248, 12 bytes
OEM-specific Type
	Header and Data:
		F8 0C 13 00 01 4C E0 00 00 00 18 00

Handle 0xFEFF, DMI type 127, 4 bytes
End Of Table

My lsmod | grep wmi:
Screenshot from 2019-11-22 19-25-30

My uname -a:

Linux melvin-PC 5.3.0-18-generic #19-Ubuntu SMP Tue Oct 8 20:14:06 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Any insights on this?

Issue with Huawei WMI and TLP - no boost frequency

Ever since I'd installed Huawei WMI I've noticed that the CPU won't boost. Its maximum frequency stays where I've set "CPU_SCALING_MAX_FREQ_ON_BAT" in TLP. Even manually setting TLP mode to AC (sudo tlp set ac) does not help. The only way I can get it to boost is if I reboot with the power cable plugged in.
Has anybody else noticed this/knows how to fix it?

OS: Ubuntu 19.04

Matebook 13 2020 (intel GPU / i5-102100U) - Arch linux with sway

This is to say a big thank you for your detailed guide and help with the matebook. Unfortunately there is no other area where I can write about this.

My question is that I cannot set manually the batery charging levels even with root for some reason. I found a script (I cannot find it again) to set the levels at boot using systemd.

I was using first Manajaro KDE and fractional scaling as well as hardware video decode for chromium work out of the box.

Then onto arch with sway (new to both so a bit of a learning curve) and setting the scale to 1.5 in the sway settings works fine but only for wayland apps.

Now I am using Arch with sway without fractional scaling. This might not suit everyone (as I don't use a second monitor) but I managed to get everything working in wayland and xwayland with no blurriness.

Some gtk apps will scale fine with gsettings (i.e firefox)
gsettings set org.gnome.desktop.interface text-scaling-factor 1.5

Electron apps will scale as well by settings the xft.dpi in the ~/.Xdefaults file (I set mine to 144).

QT apps scale as well.

Obviously it's a mess to setup but the result is well worth it but again only when using the laptop screen.

Anyway big thank you again for your work and it is amazing that I do not hear the fan go of once on Arch where in windows as soon as it starts it goes loud for quite some time before settling.

Disable wifi switch?

I don't really see the purpose of having a wifi switch in my day to day life. I've only pressed it by accident (or when cleaning something off), often causing me to wonder what caused my wifi to drop. If I want to disable wifi, I can do so fairly quickly already with just a few key presses.

Is it possible to disable the wifi toggling key, and/or does somebody have any tips on how to achieve this? It would be especially cool if I could re-purpose it for something more useful (bringing up a wifi menu?), but given that it's probably a hardware switch, I'm not sure if that's possible.

Battery protection resets after reboot

I am setting the battery protection levels using the /sys/devices/platform/huawei-wmi/charge_control_thresholds, but after a reboot they go back to 0 100. Is there a way of making it persistent that doesn't involve making a script that runs on boot?

Process for generating bios.cab different as of version 1.28

running the following didn't work

./firmware-packager --firmware-name HuaweiBIOS --device-guid 4ab52f4e-04c0-47ec-af33-a4f5c28ce0b7 --developer-name Huawei --release-version 0.1.28 --exe ./MateBook_13_BIOS_1.28.zip --bin ./MateBook_13_BIOS_1.28/WRIWU128.bin --out bios.cab

because the zip file contained an executable that was a little more complex.
checking the contents of the zip with unzip -l MateBook_13_BIOS_1.28.zip revealed the following contents

Archive:  MateBook_13_BIOS_1.28.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
  1141162  07-23-2020 10:37   HUAWEI MateBook BIOS Upgrade Guide.docx
   982092  07-23-2020 10:36   HUAWEI MateBook BIOS?????.docx
  6423296  06-15-2020 09:26   WRIWU128.exe
---------                     -------
  8546550                     3 files

and checking the contents of WRIWU128.exe with 7z l WRIWU128.exe reveals

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
                    .....                      7765  $PLUGINSDIR/InstallOptions.dll
2019-07-19 03:02:14 .....                       141  $PLUGINSDIR/ioSpecial.ini
2019-07-19 03:02:14 .....                      1481  $PLUGINSDIR/modern-wizard.bmp
2020-06-12 12:00:34 .....                   6343758  BIOS_1.28.exe                    <--- THIS IS THE FILE WANT
                    .....                      3125  $PLUGINSDIR/nsExec.dll
------------------- ----- ------------ ------------  ------------------------
2020-06-12 12:00:34                         6356270  5 files

we can extract BIOS_1.28.exe with 7z x WRIWU128.exe again with 7z l WRIWU128.exe and inspect the contents of BIOS_1.28.exe to find the location of the .bin file

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
                    .....                      7765  $PLUGINSDIR/InstallOptions.dll
2019-07-19 03:02:14 .....                       141  $PLUGINSDIR/ioSpecial.ini
2019-07-19 03:02:14 .....                      1481  $PLUGINSDIR/modern-wizard.bmp
2020-04-22 07:52:32 .....                     12779  CapAgent.efi
2020-06-09 09:03:18 .....                   5852875  UEFI_FW.bin                   <-- BINGO
2020-04-24 02:54:34 .....                     48971  WUExeAgent_1.0.0.9.exe
2020-04-23 09:13:44 .....                    134470  bcdedit.exe
2020-03-30 06:31:14 .....                    122284  msvcp140.dll
2020-03-30 06:31:14 .....                     39982  vcruntime140.dll
                    .....                      3125  $PLUGINSDIR/nsExec.dll
------------------- ----- ------------ ------------  ------------------------
2020-06-09 09:03:18                         6223873  10 files

so the command I used to generate the bios.cab in this case was

./firmware_packager --firmware-name HuaweiBIOS --device-guid 4ab52f4e-04c0-47ec-af33-a4f5c28ce0b7 --developer-name Huawei --release-version 0.1.28 --exe ./BIOS_1.28.exe --bin ./UEFI_FW.bin --out bios.cab

Might be useful to add this info in README, especially for those less familiar with all this.

Fractional scalling - cuted desktop

When I used this trick "Copy 20-intel.conf and 10-monitor.conf to /etc/X11/xorg.conf.d/ and reboot" It ends with cuted screen.
IMG_20210127_205626

What Im doing wrong? Could you please help me guys?
I have Matebook 13 with Intel UHD Graphics 620 OS: elementary OS 6

Battery protection not working

Hi, I can't seem to get the battery protection to work.
I am using a Matebook 13, running on Ubuntu 18.04 initially. I followed the instructions to install the Huawei-WMI drivers using dkms tarball. I used the version 3.2 one since that version of Ubuntu had linux kernel 5.0.
However, after installation I couldn't find the threshold parameter files for controlling the battery protection. Am I doing it right?
-->"Battery protection can accessed from either /sys/class/power_supply/BAT0/charge_control_{start,end}_threshold or /sys/devices/platform/huawei-wmi/charge_control_thresholds"

Or did I misunderstand the instructions?
I then tried to upgrade to ubuntu 19.10 to be able to use the latest version of the drivers, but it still doesnt work.

Could somebody help me out?

Tested: Matebook 13 2020 with intel i5 10th generation cpu

Hi all,
I just wanted to report that I was able to run Linux Mint 20 Cinnamon and Kubuntu 20.04 flawlessly. Every functionality in the matrix on the README file works except fingerprint reader of course. Fn keys are fully functional.

Kubuntu is especially smooth on 8gb RAM.

I also find Slimbookbattery tool particularly useful for creating energy profiles.

Audio jack after suspend

I did as you wrote under audio section.
sudo sh -c "echo 'options snd_hda_intel model=dell-headset-multi' >> /etc/modprobe.d/sound.conf"
Seems to work ok, but after suspend, it doesn't work anymore.
When plugging in headset after suspend, nothing happens, need a new reboot in order to use headset.
alsactl restore after suspend does not work.

alsactl restore alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: File exists alsactl: load_state:1683: Cannot open /var/lib/alsa/asound.state for reading: File exists alsa-lib main.c:1021:(snd_use_case_mgr_open) error: failed to import hw:0 (empty configuration) Found hardware: "HDA-Intel" "Realtek ALC256" "HDA:10ec0256,19e5320f,00100002" "0x19e5" "0x3e09" Hardware is initialized using a generic method

Have been googling but can't really find anything that works.
Any suggestions?

Unable to change mouse acceleration on Kubuntu 2020.

I've got the new AMD version. Tried most of the solutions from the stack answers related to ubuntu LTS 16 and 18, tried a lot including xset and different xorg configs but to no avail. Was proposed to install the mtrack driver recently but after that, I'm still unable to fully disable the touchpad acceleration.

CPU heating after kernel update 5.3

Anyone faced a problem?

Updated my
Matebook to Linux Mint 19.3 along with linux kernel
4.15 --> 5.3

The CPU temp went crazy
This is just after a few minutes of usage (fans are active)
Had to enable nvidia drivers (with them CPU temp seems to be more stable)

But the problem is that the laptop is doing nothing and it show 50+ CPU temp
Downgrade kernel or upgrade? :)

On Windows 10 everything works well, and no problems with CPU temp

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +54.0°C  (high = +100.0°C, crit = +100.0°C)
Core 0:        +53.0°C  (high = +100.0°C, crit = +100.0°C)
Core 1:        +53.0°C  (high = +100.0°C, crit = +100.0°C)
Core 2:        +53.0°C  (high = +100.0°C, crit = +100.0°C)
Core 3:        +54.0°C  (high = +100.0°C, crit = +100.0°C)

inxi -Fxz ouput

System:
  Host: uaer-MACH-WX9 Kernel: 5.3.0-46-generic x86_64 bits: 64 compiler: gcc 
  v: 7.5.0 Desktop: Cinnamon 4.4.8 Distro: Linux Mint 19.3 Tricia 
  base: Ubuntu 18.04 bionic 
Machine:
  Type: Laptop System: HUAWEI product: MACH-WX9 v: M11 serial: <filter> 
  Mobo: HUAWEI model: MACH-WX9 v: M11 serial: <filter> UEFI: HUAWEI v: 1.28 
  date: 03/15/2019 
Battery:
  ID-1: BAT0 charge: 43.7 Wh condition: 54.7/56.3 Wh (97%) 
  model: DYNAPACK HB4593R1ECW status: Unknown 
CPU:
  Topology: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP 
  arch: Kaby Lake rev: A L2 cache: 8192 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 31999 
  Speed: 600 MHz min/max: 400/4000 MHz Core speeds (MHz): 1: 697 2: 692 
  3: 645 4: 697 5: 648 6: 683 7: 698 8: 648 
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Huawei driver: i915 v: kernel 
  bus ID: 00:02.0 
  Device-2: NVIDIA GP108M [GeForce MX150] vendor: Huawei driver: nvidia 
  v: 440.82 bus ID: 01:00.0 
  Display: x11 server: X.Org 1.19.6 driver: modesetting,nvidia 
  unloaded: fbdev,nouveau,vesa resolution: 3000x2000~60Hz 
  OpenGL: renderer: GeForce MX150/PCIe/SSE2 v: 4.6.0 NVIDIA 440.82 
  direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Huawei 
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
  Sound Server: ALSA v: k5.3.0-46-generic 
Network:
  Device-1: Intel Wireless 8265 / 8275 vendor: Huawei driver: iwlwifi 
  v: kernel port: 3000 bus ID: 3c:00.0 
  IF: wlp60s0 state: up mac: <filter> 
  IF-ID-1: br-0a055b1654f2 state: down mac: <filter> 
  IF-ID-2: br-11c267e078c7 state: down mac: <filter> 
  IF-ID-3: br-330bb42bde16 state: down mac: <filter> 
  IF-ID-4: br-65a8cd924b64 state: down mac: <filter> 
  IF-ID-5: br-7724f76da2c5 state: down mac: <filter> 
  IF-ID-6: br-7b1c50a5f03a state: down mac: <filter> 
  IF-ID-7: br-b041a28dd8e1 state: down mac: <filter> 
  IF-ID-8: br-c49d4eccbd8b state: down mac: <filter> 
  IF-ID-9: br-c9a5d0a0f688 state: down mac: <filter> 
  IF-ID-10: br-dfb155f1ec14 state: down mac: <filter> 
  IF-ID-11: br-fcb4b75ad4c4 state: down mac: <filter> 
  IF-ID-12: docker0 state: down mac: <filter> 
Drives:
  Local Storage: total: 709.83 GiB used: 141.18 GiB (19.9%) 
  ID-1: /dev/nvme0n1 vendor: LITE-ON model: CA3-8D512 size: 476.94 GiB 
  ID-2: /dev/sda type: USB vendor: Samsung model: Portable SSD T5 
  size: 232.89 GiB 
Partition:
  ID-1: / size: 228.73 GiB used: 141.15 GiB (61.7%) fs: ext4 dev: /dev/sda1 
Sensors:
  System Temperatures: cpu: 60.0 C mobo: N/A gpu: nvidia temp: 64 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 288 Uptime: 29m Memory: 15.39 GiB used: 3.23 GiB (21.0%) 
  Init: systemd runlevel: 5 Compilers: gcc: 7.5.0 Shell: bash v: 4.4.20 
  inxi: 3.0.32

USB-C to HDMI, then HDMI to VGA adapter not working

If you use an HDMI to VGA adapter at the HDMI output of the USB-C to HDMI adapter, the output looks bad. It has vertical lines and weird colors and borders (photo below). However, it looks fine using the same setup on the same laptop on windows. Therefore, it must be a driver issue.

My adapter is not the Matedock 2. It is a generic USB-C to (USB-C input + USB-A output + HDMI output). But still, the HDMI output of my adapter is working on linux, as I tested it on some HDMI TVs. The issue appears only when a secondary video adapter (to VGA) is placed and only on linux.

photo5086986702089726052

Russian Language Support

Hi Evgeny, add please russian language for russian users linux on matebook. And update please information for MateBook 13 2020 and AMD Edition. Big thanks :)

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.