Bug 73156 - Dual onboard LCD (eDP1 and DP1) cannot turn on DP1 (no backlight), no backlight control but can see screen in reflected light
Summary: Dual onboard LCD (eDP1 and DP1) cannot turn on DP1 (no backlight), no backlig...
Status: CLOSED WONTFIX
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: low enhancement
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-30 14:52 UTC by Daiver
Modified: 2017-07-24 22:56 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
intel_reg_dumper, lspci, xrandr, etc (440.99 KB, application/x-gtar)
2013-12-30 14:52 UTC, Daiver
no flags Details
dmesg_lid_opened.txt (138.99 KB, text/plain)
2014-01-01 11:32 UTC, Daiver
no flags Details
dmesg_lid_closed.txt (139.20 KB, text/plain)
2014-01-01 11:33 UTC, Daiver
no flags Details
intel_reg_dumper_both.txt (17.71 KB, text/plain)
2014-01-01 18:42 UTC, Daiver
no flags Details
intel_reg_dumper_both_sleep.txt (17.71 KB, text/plain)
2014-01-01 18:43 UTC, Daiver
no flags Details

Description Daiver 2013-12-30 14:52:38 UTC
Created attachment 91333 [details]
intel_reg_dumper, lspci, xrandr, etc

Laptop: Asus Taichi 31 (same problem on Asus Taichi 21)

It has two embedded LCD.
Internal on eDP1 and external on DP1.

Start laptop with lid opened:
- external (DP1) screen backlight off
- internal (eDP1) screen backlight on
- change brighness work on internal
- cannot turn on external
- go to sleep and back, after internal screen backlight work
- lid_open* logs in attach (intel_reg_dumper, lspci, xrandr, etc)

Start laptop with lid closed:
- external (DP1) screen backlight on
- internal (eDP1) screen backlight off
- change brighness work on internal!
- if lid open internal screen turn on, and change backlight work, but no image on it
- lid_closed_boot* logs in attach

- go to sleep and back, after external screen without backlight
- internal the same: there is backlight but no image
- lid_closed_sleep* logs in attach

test on 3.13-rc6 2013-12-30 same

I can get more info/compile/debug/test with your advice.
Comment 1 Jani Nikula 2013-12-31 12:58:59 UTC
Please provide dmesg with drm.debug=0xe module parameter from early boot to the problem for both lid opened and lid closed. Please attach the dmesgs separately as plain text.
Comment 2 Daiver 2014-01-01 11:32:39 UTC
Created attachment 91384 [details]
dmesg_lid_opened.txt
Comment 3 Daiver 2014-01-01 11:33:15 UTC
Created attachment 91385 [details]
dmesg_lid_closed.txt
Comment 4 Daiver 2014-01-01 17:20:18 UTC
Found magic combination to make all LCD work:
- add i915.panel_ignore_lid=-2 to kernel boot params, full off laptop
- first boot with lid closed (turn on, BIOS turn on DP1, grub on DP1, got X11 desktop on DP1)
- second boot with lid opened (open lid, see backlight on eDP1, but no X11 desktop on eDP1, reboot, BIOS not run off DP1, but grub on eDP1)
- get all LCD worked
Comment 5 Daiver 2014-01-01 18:42:42 UTC
Created attachment 91396 [details]
intel_reg_dumper_both.txt
Comment 6 Daiver 2014-01-01 18:43:15 UTC
Created attachment 91397 [details]
intel_reg_dumper_both_sleep.txt
Comment 7 Daiver 2014-01-01 18:52:46 UTC
With option "i915.panel_ignore_lid=-2" on DP1 i see horizontal lines (snow).

intel_reg_dumper_both.txt - both LCD on and have X11 display (latest intel_reg_dumper)

intel_reg_dumper_both_sleep.txt - go to sleep and back, DP1 is off
Comment 8 Chris Wilson 2014-01-15 13:43:21 UTC
Can you please "ls /sys/class/backlight/" and play with the knobs in there (e.g. cat /sys/class/backlight/acpi_backlight0/max_brightness > /sys/class/backlight/acpi_backlight0/brightness"?
Comment 9 Daiver 2014-01-16 10:01:23 UTC
# ls /sys/class/backlight/
acpi_video0  intel_backlight

/sys/class/backlight/acpi_video0
actual_brightness: 30
bl_power: 0
brightness: 30
max_brightness: 100
type: firmware

"echo 40 > brightness" change brightness on eDP1 (internal LCD)

/sys/class/backlight/intel_backlight
actual_brightness: 1216
bl_power: 0
brightness: 1216
max_brightness: 4302
type: raw

"echo 1632 > brightness" change brightness on eDP1 (internal LCD)

30 in acpi_video0 is 1216 in intel_backlight
40 in acpi_video0 is 1632 in intel_backlight

change in acpi_video0 will change intel_backlight
change in intel_backlight will NOT change value in acpi_video0

through this interfaces i can change brightness only on eDP1 (internal LCD)
there is no interfaces to control on DP1 (external LCD)
Comment 10 Chris Wilson 2014-01-16 10:15:36 UTC
That rules out my plan for just wiring up a per-connector backlight. The next assumption is that the backlight is controlled through ddc/di on the dp link. Still leaves the question of how.
Comment 11 Daiver 2014-01-16 12:45:31 UTC
Maybe you can direct me what to investigate and how to find a mechanism to turn on / off lights and control the second panel.

I can install Windows 8 and try to figure out what software from Asus provides switching between displays.
 
In order to understand whether it is provided by the Intel driver for Windows or this software from Asus.

Turn off and remove a variety software from Asus, on my impression that Intel driver himself can enable or disable highlighting, although this requires verification.
 
I would like to write a utility that can even turn on / off lights, and control the brightness of an external monitor, even in manual mode.

Maybe you can suggest mechanisms through which this can be done, how it can be seen. 

Maybe Intel has dedicated registers to control lighting or vice versa they are not, and do not waste time.
 
Can be controlled via the ACPI or something else.

I think the first step is to find out through that control is exercised. 

On the second how.

Maybe you can recommend what to check ?
Comment 12 Daiver 2014-01-17 00:07:15 UTC
I will try to remove all Asus programs from Windows.
After that i could still turn on and off both display by switching from Intel Graphics and Media Control Panel.
Only after removing the Intel driver remained one monitor.

Maybe it's not quite a pure experiment, but there is reason to believe that the functional to turn on the backlight driver is part of Intel.
 
It is doubtful that Asus could add to Intel Graphics and Media Contol Panel menu for selecting which LCD is on.

Maybe you can ask Windows driver authors, which through interface we can turn on backlight?
Comment 13 Daiver 2014-02-06 15:35:17 UTC
On new installed Windows 8.1 without any Asus drivers and tools, with Intel driver default installed by Windows, switching backlight work perfect.

Тhere is reason to believe that the required functionality is contained in the intel driver.
Comment 14 Jani Nikula 2014-02-07 08:59:16 UTC
I'm inclined to believe what Chris says, it's controlled through ddc/ci [1]. Some googling suggests some Windows display drivers support this.

The ddccontrol tool [2] can be used to change brightness (among other things) through the ddc/ci. It hasn't been maintained for years, but seems to work for me. If you're daring enough, please probe the monitors using:

$ sudo ddccontrol -p -v

and try to read the brightness using:

$ sudo ddccontrol -r 0x10 dev:/dev/i2c-N

replacing N with the relevant monitor from the ddccontrol probe step. Finally, to change brightness, use:

$ sudo ddccontrol -r 0x10 -w NN dev:/dev/i2c-N

where NN is the value.

It would be kind of cool to expose a connector specific backlight control using ddc/ci from the kernel, but it's probably not the right thing to do in kernel. Userspace could handle this transparently if ddc/ci control was incorporated into the appropriate components. But in any case this falls near the bottom of the pile in priority.


[1] http://en.wikipedia.org/wiki/Display_Data_Channel
[2] http://ddccontrol.sourceforge.net/
Comment 15 Daiver 2014-02-08 23:21:26 UTC
Detected monitors :
 - Device: dev:/dev/i2c-7
   DDC/CI supported: No
   Monitor Name: VESA standard monitor
   Input type: Digital
 - Device: dev:/dev/i2c-6
   DDC/CI supported: No
   Monitor Name: VESA standard monitor
   Input type: Digital

LANG= ddccontrol -d dev:/dev/i2c-7

Reading EDID and initializing DDC/CI at bus dev:/dev/i2c-7...
ioctl(): Remote I/O error
ioctl returned -1
ioctl(): Remote I/O error
ioctl returned -1
ioctl(): Remote I/O error
ioctl returned -1
I/O warning : failed to load external entity "/usr/share/ddccontrol-db/monitor/CMN1346.xml"
Document not parsed successfully.
ioctl(): Remote I/O error
ioctl returned -1

DDC/CI at dev:/dev/i2c-7 is unusable (-1).

Cannot read no one register.
Comment 16 Jani Nikula 2014-02-25 10:32:12 UTC
Related https://bugzilla.kernel.org/show_bug.cgi?id=68631
Comment 17 Axel 2014-03-09 12:01:54 UTC
Hi Jani,

thanks for catching my bug report.
In response to your question in https://bugzilla.kernel.org/show_bug.cgi?id=68631#c11

When I boot in normally, without setting the `vendor` flag for acpi_backlight, I can change the *inner* display by setting `acpi_video0/brightness` (with echo).

Setting `asus-nb-wmi/brightness` (booted in with `acpi_backlight=vendor`) changes nothing for me (not even the inner display). But the value stored in brightness changes (checked with cat).

As I posted earlier in the kernel.org thread, introducing a second `/sys/class/backlight` entry like `acpi_video1` for the outher display might be useful? :)
Comment 18 Jani Nikula 2014-03-12 12:21:54 UTC
(In reply to comment #17)
> As I posted earlier in the kernel.org thread, introducing a second
> `/sys/class/backlight` entry like `acpi_video1` for the outher display might
> be useful? :)

The problem is that we don't know what we should do behind that interface.
Comment 19 Joao Pimentel 2014-03-17 07:22:51 UTC
This functionality is probably contained by the intel driver, but I don't think it is contained in a default intel driver.

When I updated the windows to 8.1 just after the release, the second screen stopped working. I had to downgrade the intel driver to the intel driver provided by asus to make it work.


* I have a tachi 21
Comment 20 Daiver 2014-03-19 13:38:24 UTC
For all Taichi notebooks was updated Intel driver, which need to update BIOS.

TAICHI31:
BIOS 208
Fixed bug that outer panel can’t work after upgrade VGA driver for win8.1.

Intel Graphics Driver V10.18.10.3412

Without BIOS update external screen not work properly.

Full diff of DSDT previous and current:
6c6
<  * Disassembly of dsdt.dat, Fri Dec 27 15:54:15 2013
---
>  * Disassembly of dsdt.dat, Wed Mar 19 14:52:17 2014
10c10
<  *     Length           0x000133F4 (78836)
---
>  *     Length           0x000133FC (78844)
12c12
<  *     Checksum         0x19
---
>  *     Checksum         0x87
161c161
<     OperationRegion (GNVS, SystemMemory, 0xDA8B3E18, 0x01D1)
---
>     OperationRegion (GNVS, SystemMemory, 0xDA8B2E18, 0x01D1)
5548c5548
<                             Store (0x02F0, PARM)
---
>                             Store (0x02F8, PARM)
6627a6628
>                     Store (0xF000, DSLP)
10696c10697
<             Name (_HID, "PNP0C14")  // _HID: Hardware ID
---
>             Name (_HID, "pnp0c14")  // _HID: Hardware ID
15948c15949
<             Store ("207", Local0)
---
>             Store ("208", Local0)

There is reason to believe that the backlight control external panel with the Intel driver through ACPI.
Comment 21 Jani Nikula 2014-03-19 15:37:48 UTC
Just curious, please try 3.14-rc or drm-intel-nightly branch from http://cgit.freedesktop.org/drm-intel - would that help? Try frobbing backlight from /sys/class/backlight, all interfaces.
Comment 22 Daiver 2014-03-19 19:14:43 UTC
git clone http://cgit.freedesktop.org/drm-intel drm-intel-nightly

ls /sys/class/backlight/
acpi_video0  intel_backlight

sorry
Comment 23 Jani Nikula 2014-03-20 09:08:39 UTC
(In reply to comment #22)
> git clone http://cgit.freedesktop.org/drm-intel drm-intel-nightly
> 
> ls /sys/class/backlight/
> acpi_video0  intel_backlight

So what does changing those do?
Comment 24 Daiver 2014-03-21 09:19:43 UTC
At first glance, everything works as before.

Changing the brightness of the works, through both interfaces.
The brightness is changed only on the internal monitor.
External still not under control.
Comment 25 Jani Nikula 2014-03-21 13:25:14 UTC
(In reply to comment #24)
> At first glance, everything works as before.
> 
> Changing the brightness of the works, through both interfaces.
> The brightness is changed only on the internal monitor.
> External still not under control.

Did you try this when *both* displays were enabled?
Comment 26 Daiver 2014-03-21 15:51:26 UTC
Yes.
I turn on external display backlight trough BIOS.
Then boot compiled kernel.
External still not under control.

Neither the reduced brightness, neither increasing nor setting the brightness to 0, do not display off, no impact on the outside, only on the inside.
Comment 27 Daniel Vetter 2014-03-26 21:28:32 UTC
I think someone gets to reverse-engineer what asus has exactly done here.
Comment 28 Joao Pimentel 2014-05-15 13:34:24 UTC
I found an open-source project that replaces the asus switch on windows.

http://sourceforge.net/projects/screen-switch/files/?source=navbar

I hope that it can be useful to fix the problem on linux
Comment 29 Jani Nikula 2014-09-05 12:01:54 UTC
I'm closing the bug as WONTFIX. Sorry. I think it's honest, because we won't. The setup really is a special case.

I think we'd consider merging reasonable patches upstream, if someone contributes a fix.

Thanks for the report.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.