Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1828927 - Cherry Trail backlight on i915 graphics not working since kernel upgrade
Summary: Cherry Trail backlight on i915 graphics not working since kernel upgrade
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 31
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-28 15:27 UTC by Matthew
Modified: 2020-06-02 03:13 UTC (History)
17 users (show)

Fixed In Version: kernel-5.6.14-300.fc32 kernel-5.6.15-200.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-25 02:46:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
kernel 5.5.17 working (64.73 KB, text/plain)
2020-04-28 15:27 UTC, Matthew
no flags Details
kernel 5.6.6 not working (65.42 KB, text/plain)
2020-04-28 15:31 UTC, Matthew
no flags Details

Description Matthew 2020-04-28 15:27:13 UTC
Created attachment 1682534 [details]
kernel 5.5.17 working

Since upgrading F31 to kernel-5.6.6-200.fc31.x86_64 I have no backlight control on my Cherry Trail tablet. It was working fine with the previous kernel kernel-5.5.17-200.fc31.x86_64.

I have rebooted into 5.5.17-200 and the backlight is again working. I boot into 5.6.6-200 and it doesn't.

It can be reproduced by selectively booting the above kernel versions.

I haven't tried rawhide.

I am not running any modules that not shipped with directly Fedora's kernel?


7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

Attached

Comment 1 Matthew 2020-04-28 15:28:34 UTC
Non working journalctl to be supplied shortly. Just need to reboot.

Comment 2 Matthew 2020-04-28 15:31:25 UTC
Created attachment 1682538 [details]
kernel 5.6.6 not working

Comment 3 Matthew 2020-04-28 15:33:07 UTC
I noted this :

$ uname -a
Linux iota 5.6.6-200.fc31.x86_64 #1 SMP Tue Apr 21 15:34:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ dmesg | grep i915
[    7.273289] i915 0000:00:02.0: vgaarb: deactivate vga console
[    7.276705] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    7.277341] [drm:pwm_setup_backlight [i915]] *ERROR* Failed to configure the pwm chip  <----- HERE
[    7.295743] [drm] Initialized i915 1.6.0 20200114 for 0000:00:02.0 on minor 0
[    7.550745] fbcon: i915drmfb (fb0) is primary device
[    7.550756] i915 0000:00:02.0: fb0: i915drmfb frame buffer device

I've used this tablet with Fedora for years and actually it's pretty well supported usually :-)

Comment 4 Hans de Goede 2020-04-30 13:46:27 UTC
Thank you for the bugreport.

This is a weird bug, normally if there is an issue we fail to get a reference to the PWM controller. Here we do get the reference, but then we fail to configure the PWM controller.

I've prepared a test-kernel which makes the error somewhat more verbose. Can you please install that kernel and provide the new version of the "*ERROR* Failed to configure the pwm chip" error?

Here is the test-kernel: https://koji.fedoraproject.org/koji/taskinfo?taskID=43939522

And here are some instructions for directly installing a kernel from koji: https://fedorapeople.org/~jwrdegoede/kernel-test-instructions.txt

Comment 5 Matthew 2020-04-30 14:57:46 UTC
Hi Hans and thankyou!

$ uname -a
Linux iota 5.6.8-300.rhbz1828927.fc32.x86_64 #1 SMP Thu Apr 30 13:10:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ dmesg | grep -i i915
[    7.680755] i915 0000:00:02.0: vgaarb: deactivate vga console
[    7.684331] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    7.684971] [drm:pwm_setup_backlight [i915]] *ERROR* Failed to configure the SoC pwm chip: -16
[    7.699734] [drm] Initialized i915 1.6.0 20200114 for 0000:00:02.0 on minor 0
[    7.965207] fbcon: i915drmfb (fb0) is primary device
[    7.965215] i915 0000:00:02.0: fb0: i915drmfb frame buffer device

I had a look through the rest of the dmesg and there wasn't anything else seemed relevant in addition but please do let me know if I can do anything else.

Regards,
Matthew.

Comment 6 Hans de Goede 2020-04-30 20:54:11 UTC
Thank you for giving the test kernel a try. The error code points to an issue in the pwm-lpss driver, which however has not changed at all in 5.6 ...

I've prepared a new test kernel with a bit of a hack which might help and more importantly with a bunch of debugging dev_err calls added to help debug this.

At the moment this is building here:


This takes about 1 - 2 hours to complete.

After this has completed building please install the new test kernel, boot into it and then do:

dmesg --level=err

This should give a whole bunch of debug messages, put these in a file like this:

dmesg --level=err > dmesg.log

And then attach the generated dmesg.log here please.

It would also be interesting to know if controlling the backlight now works, please try changing the brightness setting.

After changing the brightness please collect a new log:

dmesg --level=err > dmesg2.log

And also attach that here.

Comment 7 Hans de Goede 2020-04-30 20:54:59 UTC
Oops, I forgot to put in the link to the new test-kernel build, it is:

https://koji.fedoraproject.org/koji/taskinfo?taskID=43952987

Comment 8 Matthew 2020-05-01 18:53:24 UTC
Thanks again.... I've installed that latest test kernel :

$ uname -a
Linux iota 5.6.8-300.rhbz1828927_2.fc32.x86_64 #1 SMP Thu Apr 30 21:37:16 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.6.8-300.rhbz1828927_2.fc32.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet

$ dmesg --level=err
[    8.070876] pwm-lpss 80862288:00: initial state 0xffffffff period 52 duty_cycle 0 enabled 1
[    8.070898] pwm-lpss 80862288:00: PWM_SW_UPDATE is set before update
[    8.070903] pwm-lpss 80862288:00: prepare 0xffffffff -> 0xff00a000
[   15.702936] pwm-lpss 80862288:00: prepare 0x800044af -> 0xc000a0c5
[   16.457480] Bluetooth: hci0: unexpected event for opcode 0xfc2f
[   25.962319] intel_atomisp2_pm 0000:00:03.0: can't change power state from D3cold to D0 (config space inaccessible)

And I'm happy to report that changing the brightness does now work :-) And for each brightness change I see the additional logs (one per change in brightness :

[   52.237394] pwm-lpss 80862288:00: prepare 0x8000a0c5 -> 0xc000a066
[   53.341512] pwm-lpss 80862288:00: prepare 0x8000a066 -> 0xc000a0d4
[   61.265888] pwm-lpss 80862288:00: prepare 0x8000a0d4 -> 0xc000a07d
[   62.112195] pwm-lpss 80862288:00: prepare 0x8000a07d -> 0xc000a0cc
[  172.298136] pwm-lpss 80862288:00: prepare 0x8000a0cc -> 0xc000a03b
[  173.238337] pwm-lpss 80862288:00: prepare 0x8000a03b -> 0xc000a0c5

Hope it's ok but I'm going to refrain from using attachments as it's not all that verbose.

Best regards,
Matthew.

Comment 9 Hans de Goede 2020-05-12 11:04:52 UTC
Ok, good news I think I've found the problem.

I've prepared a 5.6.12 kernel build with a patch added which should fix this:

https://koji.fedoraproject.org/koji/taskinfo?taskID=44412267

At the moment this is building, this takes about 1 - 2 hours to complete. Generic install instructions are still here:

https://fedorapeople.org/~jwrdegoede/kernel-test-instructions.txt

This kernel again will error out on the "PWM_SW_UPDATE is set before update" error which my previous test kernel ignored (as a test hack). This contains a fix so that the "PWM_SW_UPDATE is set before update" error should no longer happen.

Please give this kernel a test run when it has completed building.

This kernel still includes a patch for additional debug output. I would appreciate it if you can copy and paste that debug output here like last time (no need to attach it if it is not too much lines).

Comment 10 Matthew 2020-05-16 21:32:11 UTC
Yes, good news indeed! 

Please see below, all working as you predicted :-)

$ uname -a
Linux iota 5.6.12-300.rhbz1828927.fc32.x86_64 #1 SMP Tue May 12 11:39:36 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.6.12-300.rhbz1828927.fc32.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet
$ dmesg --level=err
[    7.814451] pwm-lpss 80862288:00: initial state 0x800044af period 50198 duty_cycle 15748 enabled 1
[    7.814467] pwm-lpss 80862288:00: prepare 0x800044af -> 0xc000a000
[   16.016919] pwm-lpss 80862288:00: prepare 0x8000a000 -> 0xc000a0f3
[   17.001309] Bluetooth: hci0: unexpected event for opcode 0xfc2f
[   27.311559] intel_atomisp2_pm 0000:00:03.0: can't change power state from D3cold to D0 (config space inaccessible)
[   27.317509] intel_atomisp2_pm 0000:00:03.0: can't change power state from D3cold to D0 (config space inaccessible)

and then once for each change in brightness (i.e. four changes shown here) :

[  182.529432] pwm-lpss 80862288:00: prepare 0x8000a0f3 -> 0xc000a097
[  183.854494] pwm-lpss 80862288:00: prepare 0x8000a097 -> 0xc000a0ca
[  184.835755] pwm-lpss 80862288:00: prepare 0x8000a0ca -> 0xc000a07b
[  185.769006] pwm-lpss 80862288:00: prepare 0x8000a07b -> 0xc000a0d2

Many thanks again for continuing to work on this!

Best regards,
Matthew.

Comment 11 Hans de Goede 2020-05-18 15:13:24 UTC
Thank you for testing the fix. I've submitted the fix upstream and added it as downstream patch to the Fedora kernels for now.

The fix will be included in the next official Fedora kernel build.

Comment 12 Fedora Update System 2020-05-21 13:41:22 UTC
FEDORA-2020-57bf620276 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-57bf620276

Comment 13 Fedora Update System 2020-05-21 13:41:45 UTC
FEDORA-2020-0c0b5d9004 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-0c0b5d9004

Comment 14 Fedora Update System 2020-05-21 13:42:12 UTC
FEDORA-2020-320f05784e has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-320f05784e

Comment 15 Fedora Update System 2020-05-22 03:02:21 UTC
FEDORA-2020-0c0b5d9004 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-0c0b5d9004`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-0c0b5d9004

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2020-05-22 04:24:02 UTC
FEDORA-2020-57bf620276 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-57bf620276`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-57bf620276

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2020-05-22 04:54:37 UTC
FEDORA-2020-320f05784e has been pushed to the Fedora 30 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-320f05784e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-320f05784e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 18 Fedora Update System 2020-05-25 02:46:39 UTC
FEDORA-2020-57bf620276 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Fedora Update System 2020-05-30 02:04:11 UTC
FEDORA-2020-5436586091 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-5436586091`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5436586091

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Fedora Update System 2020-06-02 03:13:38 UTC
FEDORA-2020-5436586091 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.