Huawei Matebook D15 AMD R7 from 2020
krysopath opened this issue ยท 13 comments
battery thresholds and external microphone
I recently purchased Matebook D15 and am really glad you pioneered support. Most features do work right out of the box. I am missing control over battery thresholds, and an issue with my external microphone audio jack.
To Reproduce battery
Steps to reproduce the behavior:
- run
5.4.0-42-generic
in ubuntu 20.04 - Try to set battery charging thresholds in
/sys/class/power_supply
- device does not expose that interface via kernel sysfs
Expected behavior
I want to set charging thresholds via sysfs interface to have less wear on the battery.
To Reproduce audio
Steps to reproduce the behavior:
- run
5.4.0-42-generic
in ubuntu 20.04 - Plug a external headset
- pulseaudio will continue to record with internal microphone, as no external input is recognized
Expected behavior
I want to use external input source when plugging in external headset via that jack.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop:
Linux porta 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
with ubuntu focal 20.04
[...]
processor : 7
vendor_id : AuthenticAMD
cpu family : 23
model : 24
model name : AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx
stepping : 1
microcode : 0x8108109
cpu MHz : 1330.778
cache size : 512 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca
bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips : 4591.32
TLB size : 2560 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 43 bits physical, 48 bits virtual
power management: ts ttp tm hwpstate eff_freq_ro [13] [14]
the wmi related modules:
$ lsmod |grep wmi
snd_rawmidi 36864 1 snd_seq_midi
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
wmi_bmof 16384 0
snd 90112 27 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
huawei_wmi 16384 0
ledtrig_audio 16384 3 snd_hda_codec_generic,huawei_wmi,snd_hda_codec_realtek
sparse_keymap 16384 1 huawei_wmi
wmi 32768 2 huawei_wmi,wmi_bmof
alsa-info: http://alsa-project.org/db/?f=6e2af66bedb483f0f613cae40382c90a4d590efa
Additional context
I can help and will dedicate time if this behavior can be fixed via a contribution. Give me directions for more specific debug output.
Could you please provide an acpi dump? Refer to https://01.org/linux-acpi/utilities for more information.
Installed acpica-tools
via apt.
$ sudo acpidump > acpi-tables.out
$ sha256sum acpi-tables.out
775424a87f8e12e3f4047e8050237a9396465b1b268552d25268939433a5944c acpi-tables.out
gzipped to satisfy github contraints.
I also updated
lspci.txt
by running it with uid 0. Now includes Capabilities
for each device.
Can I help by further remote command execution or via learning how acpi actually does work?
Can you upload the output of dmidecode > dmidecode.txt
Could you please try building the module from the source and report what files get exposed under /sys/devices/platform/huawei-wmi/
$ modinfo huawei_wmi
filename: /lib/modules/5.4.0-89-generic/extra/huawei-wmi.ko
license: GPL v2
description: Huawei WMI laptop extras driver
author: Ayman Bagabas <ayman.bagabas@gmail.com>
alias: wmi:ABBC0F5B-8EA1-11D1-A000-C90629100000
srcversion: 9EE027D22741953CF93ADF0
alias: wmi:ABBC0F5C-8EA1-11D1-A000-C90629100000
alias: wmi:59142400-C6A3-40fa-BADB-8A2652834100
depends: ledtrig-audio,wmi,sparse-keymap
retpoline: Y
name: huawei_wmi
vermagic: 5.4.0-89-generic SMP mod_unload modversions
parm: battery_reset:Reset battery charge values to (0-0) before disabling it using (0-100) (bint)
parm: report_brightness:Report brightness keys. (bint)
$ tree /sys/devices/platform/huawei-wmi/
/sys/devices/platform/huawei-wmi/
โโโ charge_control_thresholds
โโโ driver -> ../../../bus/platform/drivers/huawei-wmi
โโโ driver_override
โโโ fn_lock_state
โโโ input
โ โโโ input8
โ โโโ capabilities
โ โ โโโ abs
โ โ โโโ ev
โ โ โโโ ff
โ โ โโโ key
โ โ โโโ led
โ โ โโโ msc
โ โ โโโ rel
โ โ โโโ snd
โ โ โโโ sw
โ โโโ device -> ../../../huawei-wmi
โ โโโ event7
โ โ โโโ dev
โ โ โโโ device -> ../../input8
โ โ โโโ power
โ โ โ โโโ async
โ โ โ โโโ autosuspend_delay_ms
โ โ โ โโโ control
โ โ โ โโโ runtime_active_kids
โ โ โ โโโ runtime_active_time
โ โ โ โโโ runtime_enabled
โ โ โ โโโ runtime_status
โ โ โ โโโ runtime_suspended_time
โ โ โ โโโ runtime_usage
โ โ โโโ subsystem -> ../../../../../../class/input
โ โ โโโ uevent
โ โโโ id
โ โ โโโ bustype
โ โ โโโ product
โ โ โโโ vendor
โ โ โโโ version
โ โโโ modalias
โ โโโ name
โ โโโ phys
โ โโโ power
โ โ โโโ async
โ โ โโโ autosuspend_delay_ms
โ โ โโโ control
โ โ โโโ runtime_active_kids
โ โ โโโ runtime_active_time
โ โ โโโ runtime_enabled
โ โ โโโ runtime_status
โ โ โโโ runtime_suspended_time
โ โ โโโ runtime_usage
โ โโโ properties
โ โโโ subsystem -> ../../../../../class/input
โ โโโ uevent
โ โโโ uniq
โโโ leds
โ โโโ platform::micmute
โ โโโ brightness
โ โโโ device -> ../../../huawei-wmi
โ โโโ max_brightness
โ โโโ power
โ โ โโโ async
โ โ โโโ autosuspend_delay_ms
โ โ โโโ control
โ โ โโโ runtime_active_kids
โ โ โโโ runtime_active_time
โ โ โโโ runtime_enabled
โ โ โโโ runtime_status
โ โ โโโ runtime_suspended_time
โ โ โโโ runtime_usage
โ โโโ subsystem -> ../../../../../class/leds
โ โโโ trigger
โ โโโ uevent
โโโ modalias
โโโ power
โ โโโ async
โ โโโ autosuspend_delay_ms
โ โโโ control
โ โโโ runtime_active_kids
โ โโโ runtime_active_time
โ โโโ runtime_enabled
โ โโโ runtime_status
โ โโโ runtime_suspended_time
โ โโโ runtime_usage
โโโ subsystem -> ../../../bus/platform
โโโ uevent
19 directories, 66 files
I'll try test on Huawei Matebook D15 with 3700U
@krysopath please test this #55 (comment)
@krysopath if you set "0 0" or "0 100" in charge_control_thresholds
then it turn on smart charge
#55 (comment)
Still not working is pulseaudios recording device change, when a microphone jack is plugged into the laptop, but I was able to verify smart charge device node working. Thank you all. <3
Now my battery can breathe a bit more freely with the 55% capacity it has left.
Is it feasible to solve the audio jack problem here as well?
@krysopath test please
#64