[Bug 1019337] New: Can't set backlight on the GPD Win
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 Bug ID: 1019337 Summary: Can't set backlight on the GPD Win Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.2 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-maintainers@forge.provo.novell.com Reporter: adrien.plazas@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- I installed Leap 42.2 with the latest vanilla kernel (https://build.opensuse.org/project/show/Kernel:vanilla) on a GPD Win. I can't change the brightness using GNOME's menus or xbacklight, the expected result would be for the backlight to change accordingly to my demands. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 Adrien Plazas <adrien.plazas@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adrien.plazas@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 Takashi Iwai <tiwai@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tiwai@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c1 --- Comment #1 from Takashi Iwai <tiwai@suse.com> --- The hardware information is needed. Possibly the backlight control (pmw driver or such) is missing, but who knows. I requested the information in bug 1019316, so we can share the information. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c2 --- Comment #2 from Adrien Plazas <adrien.plazas@suse.com> --- I attached the output of hwinfo to bug 1019316. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c3 Takashi Iwai <tiwai@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(adrien.plazas@sus | |e.com) --- Comment #3 from Takashi Iwai <tiwai@suse.com> --- Boot with drm.debug=0x0e boot option and give the kernel message (dmesg output). It'll show whether i915 driver detects its backlight control. The ACPI provides multiple backlight control, and one of them might actually work. Check /sys/class/backlight/*. You can change the value directly by writing to "brightness" file (up to the max value found in "max_brightness"), e.g. echo -n 10 > /sys/class/backlight/xxx/brightness Also, if none of them works, try to pass acpi_backlight=vendor boot option, too. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c4 --- Comment #4 from Adrien Plazas <adrien.plazas@suse.com> --- Created attachment 709745 --> http://bugzilla.opensuse.org/attachment.cgi?id=709745&action=edit dmesg output with drm.debug=0x0e Here is the output of dmesg with the drm.debug=0x0e boot option. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c5 --- Comment #5 from Adrien Plazas <adrien.plazas@suse.com> --- I tried setting to 10 the 8 /sys/class/backlight/acpi_video[0-7]/brightness with no success, and when adding the 'acpi_backlight=vendor' boot option /sys/class/backlight was empty. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c6 --- Comment #6 from Takashi Iwai <tiwai@suse.com> --- The i915 driver failed to manage the backlight control: [ 4.874966] [drm:pwm_setup_backlight [i915]] *ERROR* Failed to own the pwm chip [ 4.875237] [drm:intel_panel_setup_backlight [i915]] failed to setup backlight for connector DSI-1 It seems that a few kernel configs are disabled for Atom SoC, e.g. CONFIG_INTEL_SOC_PMIC=y CONFIG_PWM_CRC=y might be needed. Are you building a kernel manually? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c7 --- Comment #7 from Adrien Plazas <adrien.plazas@suse.com> --- (In reply to Takashi Iwai from comment #6)
Are you building a kernel manually?
No but if needed and with some guidance I can, I can also fork it on OBS, let OBS build it and use the resulting repo (I suspect compiling a kernel on an Atom isn't a good idea). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c8 --- Comment #8 from Takashi Iwai <tiwai@suse.com> --- OK, now I'm building a test kernel package in OBS home:tiwai:bnc1019337. It takes some time (maybe 1 or 2 hours). Give it a try later. Even if it doesn't work, please take the kernel log with drm.debug=0x0e with this kernel again. There might be some problem in the module load order. Some drivers might be needed before i915 driver. For checking this, try to boot with "nomodeset" option. Then login on Linux console, and run like: # rmmod i915 # modprobe i915 modeset=1 This will reload i915 with KMS again. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c9 --- Comment #9 from Adrien Plazas <adrien.plazas@suse.com> --- Created attachment 709982 --> http://bugzilla.opensuse.org/attachment.cgi?id=709982&action=edit The output of dmesg with the modified kernel -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c10 --- Comment #10 from Adrien Plazas <adrien.plazas@suse.com> --- (In reply to Takashi Iwai from comment #8)
There might be some problem in the module load order. Some drivers might be needed before i915 driver. For checking this, try to boot with "nomodeset" option. Then login on Linux console, and run like: # rmmod i915 # modprobe i915 modeset=1
This will reload i915 with KMS again.
When doing this from the console I couldn't access the graphical session anymore, and from the graphical session it rotated it correctly then froze it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c11 --- Comment #11 from Takashi Iwai <tiwai@suse.com> --- OK, then check /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh. There is a part like: hostonly='' instmods \ sr_mod sd_mod scsi_dh ata_piix hid_generic unix \ ehci-hcd ehci-pci ehci-platform \ ohci-hcd ohci-pci \ uhci-hcd \ xhci-hcd xhci-pci xhci-plat-hcd \ pinctrl-cherryview If pinctrl-cherryview isn't present, add it like the above. Then, append also pwm-lpss and i2c-designware-platform, too. After changing it, rebuild initrd, and retest. Also, another way would be to rebuild initrd with "-o drm" option so that i915 module won't be loaded in initrd. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c12 --- Comment #12 from Adrien Plazas <adrien.plazas@suse.com> --- (In reply to Takashi Iwai from comment #11)
OK, then check /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh. There is a part like:
hostonly='' instmods \ sr_mod sd_mod scsi_dh ata_piix hid_generic unix \ ehci-hcd ehci-pci ehci-platform \ ohci-hcd ohci-pci \ uhci-hcd \ xhci-hcd xhci-pci xhci-plat-hcd \ pinctrl-cherryview
If pinctrl-cherryview isn't present, add it like the above. Then, append also pwm-lpss and i2c-designware-platform, too.
After changing it, rebuild initrd, and retest.
Also, another way would be to rebuild initrd with "-o drm" option so that i915 module won't be loaded in initrd.
I added 'pinctrl-cherryview', 'pwm-lpss' and 'i2c-designware-platform', ran 'mkinitrd' and rebooted: no change. I then ran initrd -o drm' and rebooted: no change. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c13 --- Comment #13 from Takashi Iwai <tiwai@suse.com> --- (In reply to Adrien Plazas from comment #12)
(In reply to Takashi Iwai from comment #11)
OK, then check /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh. There is a part like:
hostonly='' instmods \ sr_mod sd_mod scsi_dh ata_piix hid_generic unix \ ehci-hcd ehci-pci ehci-platform \ ohci-hcd ohci-pci \ uhci-hcd \ xhci-hcd xhci-pci xhci-plat-hcd \ pinctrl-cherryview
If pinctrl-cherryview isn't present, add it like the above. Then, append also pwm-lpss and i2c-designware-platform, too.
After changing it, rebuild initrd, and retest.
Also, another way would be to rebuild initrd with "-o drm" option so that i915 module won't be loaded in initrd.
I added 'pinctrl-cherryview', 'pwm-lpss' and 'i2c-designware-platform', ran 'mkinitrd' and rebooted: no change.
I then ran initrd -o drm' and rebooted: no change.
There must be changes in the module loading order. Check it, and also see the difference of kernel messages. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c14 Hans de Goede <jwrdegoede@fedoraproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jwrdegoede@fedoraproject.or | |g Flags|needinfo?(adrien.plazas@sus | |e.com) | --- Comment #14 from Hans de Goede <jwrdegoede@fedoraproject.org> --- Hi Adrian and Takashi, So the story with backlight / pwm on the GPDwin consists of 2 problems really. 1) There is a generic problem with pwm handling on cht causing backlight control to not work on any cht devices. I've a couple of patches queued up for 4.11 fixing this: https://git.kernel.org/cgit/linux/kernel/git/thierry.reding/linux-pwm.git/commit/?h=for-4.11/acpi&id=69efb3439ccf2ce72e01edde05d2c63d624e251e https://git.kernel.org/cgit/linux/kernel/git/thierry.reding/linux-pwm.git/commit/?h=for-4.11/acpi&id=bf71f4e8fb95632b92476c54c5fb44eb88b19deb https://git.kernel.org/cgit/linux/kernel/git/thierry.reding/linux-pwm.git/commit/?h=for-4.11/acpi&id=60b24b82b1416c94de71fd03cf98bf149a0fe9d3 Note something went wrong with merging these, so they don't build so you also need: https://github.com/jwrdegoede/linux-sunxi/commit/9bf1b82154cdfb5a419aa67d761... When you've a kernel with these patches you need to make sure that the pwm-lpss and pwm-lpss-platform modules are built into the initrd (assuming i915.ko is in the initrd) and then things will work on normal cht hardware. To fix the initrd use dracut -f --add-drivers "pwm-lpss pwm-lpss-platform" . 2) The dstd on the GPDwin is broken the _STA (status) ACPI method for the pwm device returns 0, meaning the hardware is not there / not used. So the kernel ignores it. To fix this I've had to resort to creating a modified dstd: https://fedorapeople.org/~jwrdegoede/GPD-win/dsdt.dsl This has 3 differences compared to the original: @@ -9703,12 +9703,7 @@ Method (_STA, 0, NotSerialized) // _STA: Status { - If ((SI0A == Zero) || (SD2D == One)) - { - Return (Zero) - } - - Return (0x0F) + Return (Zero) } Method (_DIS, 0, NotSerialized) // _DIS: Disable Device This is the _STA method of the mmc controller for a sdio wifi chip, which the GPDwin does not use, it uses pcie wifi, so it should return 0. This not returning of 0 breaks wifi with newer kernels, as newer kernels recognize this controller and call its _PS3 method which then turns of the pcie-wifi as it uses the same gpio. @@ -10908,16 +10749,6 @@ Method (_STA, 0, NotSerialized) // _STA: Status { - If ((P10A == Zero) || (L11D == One)) - { - Return (Zero) - } - - If (OSID == One) - { - Return (Zero) - } - Return (0x0F) } This is the _STA method for the pwm1 device, which now properly returns 0x0f making the pwm-lpss driver actually load / bind to it. And then I rip out all code from the _PS0 and _PS3 methods of the acpi-node describing the mmc controlled for the micro-sd slot, this is an attempt to fix the suspend/resume issue as there is something in there which the kernel does not like. This is a hack, but since I was touching the dstd anyways ... This makes the device suspend, but since we don't have a driver for the power-button it never wakes up, oops. To use the modified dstd make sure you've CONFIG_ACPI_TABLE_UPGRADE=y in your kernel .config and then pre- note PRE pre-pend this initrd: https://fedorapeople.org/~jwrdegoede/GPD-win/initrd-dstd To your initrd, also see: Documentation/acpi/initrd_table_override.txt in the kernel source tree. With a kernel with the linked patches + the initrd pre-pended the backlight control works for me. Next on my list to work on is the volume and power buttons. Regards, Hans -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c15 --- Comment #15 from Adrien Plazas <adrien.plazas@suse.com> --- Hi Hans. (In reply to Hans de Goede from comment #14)
I've a couple of patches queued up for 4.11 fixing this:
https://git.kernel.org/cgit/linux/kernel/git/thierry.reding/linux-pwm.git/ commit/?h=for-4.11/acpi&id=69efb3439ccf2ce72e01edde05d2c63d624e251e https://git.kernel.org/cgit/linux/kernel/git/thierry.reding/linux-pwm.git/ commit/?h=for-4.11/acpi&id=bf71f4e8fb95632b92476c54c5fb44eb88b19deb https://git.kernel.org/cgit/linux/kernel/git/thierry.reding/linux-pwm.git/ commit/?h=for-4.11/acpi&id=60b24b82b1416c94de71fd03cf98bf149a0fe9d3
The two last ones display "Bad commit reference", do you know their current state? I would like to test all your fixes for the GPD Win. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c16 --- Comment #16 from Hans de Goede <jwrdegoede@fedoraproject.org> --- Hi, (In reply to Adrien Plazas from comment #15)
Hi Hans.
(In reply to Hans de Goede from comment #14)
I've a couple of patches queued up for 4.11 fixing this:
https://git.kernel.org/cgit/linux/kernel/git/thierry.reding/linux-pwm.git/ commit/?h=for-4.11/acpi&id=69efb3439ccf2ce72e01edde05d2c63d624e251e https://git.kernel.org/cgit/linux/kernel/git/thierry.reding/linux-pwm.git/ commit/?h=for-4.11/acpi&id=bf71f4e8fb95632b92476c54c5fb44eb88b19deb https://git.kernel.org/cgit/linux/kernel/git/thierry.reding/linux-pwm.git/ commit/?h=for-4.11/acpi&id=60b24b82b1416c94de71fd03cf98bf149a0fe9d3
The two last ones display "Bad commit reference", do you know their current state? I would like to test all your fixes for the GPD Win.
They are currently queued in linux-pwm/for-next and should get merged fro 4.11-rc1. If you want to test all my fixes it is probably easiest to just use my testing branch which has all my patches: https://github.com/jwrdegoede/linux-sunxi/commits/drm-intel-next-queued-cht -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c17 --- Comment #17 from Takashi Iwai <tiwai@suse.com> --- Adrien and I checked the audio volume buttons and failed to find anything in either the existing input devices nor the existing HID entries. I hoped that it's just a missing HID mapping, but it doesn't look so. Hans, are we on the right track? I'm looking at the power button issue, too... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c18 --- Comment #18 from Hans de Goede <jwrdegoede@fedoraproject.org> --- (In reply to Takashi Iwai from comment #17)
Adrien and I checked the audio volume buttons and failed to find anything in either the existing input devices nor the existing HID entries. I hoped that it's just a missing HID mapping, but it doesn't look so.
Hans, are we on the right track?
I'm looking at the power button issue, too...
Erm, all 3 buttons are fixed by 2 patches from me, as I already told you and Adrien before, the 2 patches are even linked from Adrien's wiki page: https://wiki.gnome.org/AdrienPlazas/GPDWin https://github.com/jwrdegoede/linux-sunxi/commit/2ec38ad70d0dc55ee7348dde711... https://github.com/jwrdegoede/linux-sunxi/commit/43e0e29dcabe7fe658e3d983e43... The interesting bits are in the second patch, the first one is just a preparation patch. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c19 --- Comment #19 from Takashi Iwai <tiwai@suse.com> --- Oh, I found that CONFIG_INPUT_SOC_BUTTON_ARRAY was disabled for TW kernel by some unknown reason! No wonder that it didn't work. Now I'm building a kernel with all patches and with the corrected config. Adrien, could you test a kernel later either in my IBS or OBS repo below? IBS http://download.suse.de/ibs/home:/tiwai:/test:/cht/standard/ OBS http://download.opensuse.org/repositories/home:/tiwai:/test:/cht/standard/ -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c20 --- Comment #20 from Adrien Plazas <adrien.plazas@suse.com> --- I tested the OBS repo on Tumbleweed: - volume buttons are working - the touch screen doesn't work anymore I didn't find any other behavior change besides these. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1019337 http://bugzilla.opensuse.org/show_bug.cgi?id=1019337#c21 --- Comment #21 from Adrien Plazas <adrien.plazas@suse.com> --- Actually, the touchscreen works again… I have no idea what caused it to stop working. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com