Unable to reach higher than package C2 state with Skylake processor

Bug #1686448 reported by Leonardo Müller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Hello

I have a Lenovo Ideapad 310 with a Intel Core i3-6100U. I have noticed its battery last less time on Xubuntu 16.04 than on Windows 10. I have searched on internet what could cause it, and found with powertop it can't reach states higher than package C state 2, while it could reach package C state 10.

On this particular notebook model, I would expect the battery would last a bit more than 5 hours using only browser, as it happens with Windows 10 and CentOS 7. On Xubuntu, battery lasts slightly more than 4 hours. The best was 4h30min, so I am having at least 30 minutes less battery time, but generally it is one hour.

I have tried to get support on Ubuntu Forums, here is the link of the thread:
https://ubuntuforums.org/showthread.php?t=2357271

As everything we tried had no success, I am making this report.

As a reference, CentOS 7 functioned correctly and the battery lasted the same time than Windows 10, while Fedora 25 has this problem too.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-generic 4.4.0.75.81
ProcVersionSignature: Ubuntu 4.4.0-75.96-generic 4.4.59
Uname: Linux 4.4.0-75-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: usuario 4786 F.... pulseaudio
CurrentDesktop: XFCE
Date: Wed Apr 26 12:39:30 2017
HibernationDevice: RESUME=UUID=9f36068f-c6d6-4fd6-87d5-46f1f5247563
InstallationDate: Installed on 2016-12-31 (116 days ago)
InstallationMedia: Xubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
MachineType: LENOVO 80UG
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-75-generic.efi.signed root=UUID=0fbb0f28-6764-4447-a890-dc966d1f8adf ro quiet
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-75-generic N/A
 linux-backports-modules-4.4.0-75-generic N/A
 linux-firmware 1.157.8
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/10/2017
dmi.bios.vendor: LENOVO
dmi.bios.version: 0XCN39WW
dmi.board.asset.tag: NO Asset Tag
dmi.board.name: Toronto 4A2
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40679 WIN
dmi.chassis.asset.tag: NO Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo ideapad 310-14ISK
dmi.modalias: dmi:bvnLENOVO:bvr0XCN39WW:bd01/10/2017:svnLENOVO:pn80UG:pvrLenovoideapad310-14ISK:rvnLENOVO:rnToronto4A2:rvrSDK0J40679WIN:cvnLENOVO:ct10:cvrLenovoideapad310-14ISK:
dmi.product.name: 80UG
dmi.product.version: Lenovo ideapad 310-14ISK
dmi.sys.vendor: LENOVO

Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :
Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :
Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :

Here is the powertop output. Tuning additional options to "Good" from this point start to cause problems, as crackling sound and nonfunctional mouse.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Did this issue start happening after an update/upgrade? Was there a prior kernel version where you were not having this particular problem?

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.11 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11-rc8

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :

With this notebook, I am using Xubuntu 16.04 since I bought it. Since the start battery lasted less time than on Windows 10, but I didn't know why this was happening. The kernel at December 2016 was way more problematic, but nearly all the problems were solved, but this one, which reduces battery time, is still present.

I have tested the upstream kernel, and there are improvements: the package is reaching C3. While it is only one stage above, this single stage means 0,4 W of less consumption. When speaking about a system that uses 7 W, this 0,4 W means more than 5% of economy.

It is still not perfect, as http://www.intel.com/content/www/us/en/processors/core/6th-gen-core-family-mobile-u-y-processor-lines-datasheet-vol-1.html states, package can reach C10, so there is still something to do.

However, when installing the upstream kernel, there were warning messages:

update-initramfs: Generating /boot/initrd.img-4.11.0-041100rc8-generic
W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_01.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_14.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_huc_ver02_00_1810.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_huc_ver01_07_1398.bin for module i915
W: Possible missing firmware /lib/firmware/i915/skl_huc_ver01_07_1398.bin for module i915

I don't mind with bxt* and kbl*, as they are other generations processors, but there is one Skylake message, so I believe different problems can happen, and as they are related i915, I suppose it's graphics.

So, while there is a improvement, it is still saving energy as it could, so I believe the bug still exists.

Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :
tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :

The behavior has greatly improved using the kernel 4.16.0-rc6, the package is reaching the state C8. It's still not C10, but it is pretty close.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Try using r8168-dkms instead of r8169. Some platforms require features in r8168-dkms to hit deeper CPU package state.

Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :

r8168-dkms have not made it hit a higher package C state. On page 70 of the document I posted the link on comment 7, it shows the maximum package C state the Skylake U/Y would be able to reach, depending of screen resolution. As this notebook has a 1366x768 screen, I suppose that it would reach up to Package C8 without PSR (Panel Self-Refresh) disabled, but I have it enabled:

[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.16.0-041600rc6-generic root=UUID=6b4ae5c0-c78c-49a6-a1ba-029192618a7a ro i915.enable_psr=1
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.16.0-041600rc6-generic root=UUID=6b4ae5c0-c78c-49a6-a1ba-029192618a7a ro i915.enable_psr=1
[ 1.450734] Setting dangerous option enable_psr - tainting kernel

It may be on the maximum power save state already this particular notebook model can have. The remaining thing to test would be the powertop proposed changes.

Today is the first time I've seen that the notebook is using less than 5 W of power while in use. If its battery was as when it was new, I would be able to get more than 6 hours of battery.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

This articles says that enabling SATA LPM [1] can reach deeper then C3. But since your laptop already reaches C8, I guess it won't help.

https://mjg59.dreamwidth.org/41713.html?thread=1748721

Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :

I remember I read that article two days after the notebook had arrived. Its Linux support was really poor, even with it having Satux Linux (a really bad distribution). It had much more problems which quickly were corrected, but this one is one of the most persistent issues (tied with the wireless problem we're nearly solving).

From what I researched back then ( https://access.redhat.com/documentation/pt-br/red_hat_enterprise_linux/6/html/power_management_guide/alpm ), these SATA LPM options are changed by the following commands on this notebook:
echo 'min_power' > '/sys/class/scsi_host/host0/link_power_management_policy'
echo 'min_power' > '/sys/class/scsi_host/host1/link_power_management_policy'

And they work. As the powertop proposed changes were effective back then to enable Package C3 and now Package C8, I've done a systemd service to enable them on boot.

Only USB ports and the PCI Audio device aren't with its powersave modes, as setting them to save more power make problems start to appear.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.