phelix001 / lenovo-yoga-c930-linux

Varions fixes to provide full hardware support of Lenovo Yoga C930 on Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linux on Lenovo Yoga C930

“We do not support Linux. Please call Linux to resolve this issue.”

Lenovo support, via jasonbhill

About

At this page you can find various notes about hardware support of Lenovo Yoga C930 on Linux. All solutions was tested with Fedora Workstation 29 but should work with any Linux distribution.

If your main question is "Should I buy this laptop for using with Linux now?" than answer is "No". Massive ACPI and Power Management issues, microphone, surround speakers and fingerprint sensor not working.

Summary

  • Minimum BIOS version: 8GCN32WW
  • Minimum kernel version: 5.1-rc1 (see Older kernels otherwise)
  • Latest tested kernel version: 5.1-rc6
Subsystem Status Notes
Internal storage ✔️ Working
Graphics ✔️ Working
Type-A port ✔️ Working
Type-C port ✔️ Working
Thunderbolt 3 ⚠️ Not tested
Keyboard ✔️ Working
Wi-Fi, Bluetooth ✔️ Working fix for kernels older than 5.1-rc1
Speakers ⚠️ Partially Fix needed for hinge soundbar, bottom speakers not working
Headphone plug ✔️ Working
Microphone ❌ Not working
Power Management ⚠️ Partially critical suspend issues, see notes
Touchscreen ✔️ Working
Active pen ✔️ Working does not report battery level
Rotation sensor ✔️ Working
Light sensor ✔️ Working
Fingerprint sensor ❌ Not working you can track development progress here
HDMI output ⚠️ Not tested
HDMI audio output ⚠️ Not tested
Webcam ✔️ Working

Fixes

Speaker

This laptop has 5.1 speaker configuration with only Front Left and Front Right working by default. This hack can enable another one (Front Center or LFE, not sure):

NOTE: This hack can make headphone sound quieter. Try setting pin 0x21 to "Override" with "Headphone" to resolve.

  • Install alsa-tools-gui package (alsa-utils in some distributions)
  • Run hdajackretask
  • Set "Show unconnected pins" tick in "Options"
  • Set pin with ID 0x17 to "Override" with "Dock Headphone"
  • Click "Install boot override" and enter sudo password
  • Reboot

You can also apply fix immediately but it will most likely fail due to soundcard is in use by pulseaudio. If you want to apply fix without rebooting you need to stop pulseaudio first.

It seems like to fix this issue either Lenovo should release BIOS update with correct pin mappings or some model definition should be added to snd-hda-intel module like it was done for another Lenovo laptops with surround sound. See Lenovo Y530 example.

Bug 203409 - Lenovo YOGA C930-13IKB (ALC298): internal mic and most of surround speakers not working

Notes

Older kernels

Kernel versions prior to 5.1-rc1 have a bug in ideapad-laptop module preventing wireless interfaces from being enabled.

$ rfkill list
0: ideapad_wlan: Wireless LAN
	Soft blocked: no
	Hard blocked: yes
1: ideapad_bluetooth: Bluetooth
	Soft blocked: yes
	Hard blocked: yes

If your devices are hard blocked by rfkill there are two ways of dealing with this:

Recommended: cherrypick this commit to desired branch and build a whole kernel or just ideapad-laptop module by yourself.

TODO: Guide how to build patched ideapad-laptop

Another solution is to prevent faulty module from being loaded on boot:

WARNING: This could break some ACPI functionality! Use at your own risk!

# sudo modprobe -r ideapad-laptop`
# echo "blacklist ideapad-laptop" | sudo tee -a /etc/modprobe.d/blacklist.conf

Power Management issues

S0 (s2idle) power state state battery drain

Our main troubleshooting guide: How to achieve S0ix states in Linux

The S0ix state is entered only when the low_power_idle_system_residency_us counter increases during the S2idle low power state.

$ cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec
0
$ cat /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us
0

So seems like S0ix is broken for now.

Fixed in kernels 5.3 and newer (not tested)

Bug 203383 - Lenovo YOGA C930-13IKB unable to enter S0ix

S3 (deep) power state not working

ACPI reports that system supports S3 state:

$ dmesg | grep S3
[    0.319612] ACPI: (supports S0 S3 S4 S5)

But as initially reported by user kawb here entering S3 state makes system completely unresponsive (black screen with no backlight, power LED on, fans on). The only way to escape is to power cycle laptop (poweroff with long power button press, wait about 10 seconds, press power button again).

Default mem_sleep state is s2idle, so to force entering S3 we have to set mem_sleep to deep:

$ cat /sys/power/mem_sleep
[s2idle] deep
$ echo deep | sudo tee /sys/power/mem_sleep
deep
$ # WARNING: deadlock ahead!
$ systemctl suspend

ACPI: button: The lid device is not compliant to SW_LID

cycle_count (not supported)

Fn lock

F1-F12 row behaviour can be changed in BIOS.

Conservation Mode

Conservation mode in some Lenovo laptops will stop the battery from charging above 60% to improve the lifespan of the battery.

Enable:

$ echo 1 | sudo tee /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode

Disable:

$ echo 0 | sudo tee /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode

NOTE: You will still see "Charging" state and estimated time to full while being in Conservation mode.

FW update

Battery firmware

I have wiped Windows partitions and installed Fedora right after purchasing this laptop and ensuring latest BIOS version is installed. After some time I've found out that battery stucked on 99% Charging and never goes 100% Full. If you're facing the same issue first of all: DO NOT PANIC. At least before recharging battery 3-5 full cycles. In my case this helped, the problem is gone.

But there're many similar problems with Lenovo batteries firmware in general (evidence from year 2014!) and Lenovo offers Battery Firmware Update for C930 too to fix an issue "where the battery capacity abnormal loss then the battery life might be reduced". In my case battery firmware was already updated and some recharge cycles have fixed the problem. But if you're facing some battery issues or just want to be sure about this, here's a guide to update battery firmware without Windows installed:

  • Find some WinPE ISO based on latest Windows version. Consider using MediCat DVD or Win10PESE.
  • Burn ISO to USB flash drive with woeusb. Remember you can't make Windows bootable drives with plain dd.
  • Mount resulting partition. Create a directory for downloaded drivers.
  • Find out your battery vendor:
$ upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep vendor
  vendor:               Celxpert
$ file yogac930_bat_cpt_201812.zip 
yogac930_bat_cpt_201812.zip: RAR archive data, v5

Nice trick, Lenovo! So, unrar this archive $ unrar x yogac930_bat_cpt_201812.zip . -v and copy resulting executable to the flash drive.

  • Poweroff laptop, press power button with holded Fn key. Choose "Boot menu", load from WinPE partition.
  • Install Energy Manager Driver (replace C: with B: in installation paths when needed). Then install Battery Firmware Update.
  • Done!

Links

Power Management

Misc

About

Varions fixes to provide full hardware support of Lenovo Yoga C930 on Linux


Languages

Language:Shell 100.0%