Bug 31292

Summary: [GM45] No external video output with Toshiba Portege R600 unless attached at boot
Product: Drivers Reporter: David Sterratt (david.c.sterratt)
Component: Video(DRI - Intel)Assignee: intel-gfx-bugs (intel-gfx-bugs)
Status: RESOLVED OBSOLETE    
Severity: normal CC: alan, daniel, david.c.sterratt, intel-gfx-bugs, jon+bugzilla.kernel.org
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: 3.9.0 Subsystem:
Regression: No Bisected commit-id:
Bug Depends on:    
Bug Blocks: 56331    
Attachments: dmseg when screen not attached at boot
output of lspci with screen detached at boot
dmesg output with BIOS workaround on
intel_reg_dumper output with no VGA attached, BIOS workaround on
xrandr --verbose output : BIOS workaround on, no VGA attached
intel_reg_dumper output with VGA attached, BIOS workaround on
xrandr --verbose output : BIOS workaround on, VGA attached
dmesg output with BIOS workaround off
intel_reg_dumper output with no VGA attached, BIOS workaround off
xrandr --verbose output : BIOS workaround off, no VGA attached
intel_reg_dumper output with VGA attached, BIOS workaround off
xrandr --verbose output : BIOS workaround off, VGA attached
dmesg for a recent kernel, bios w/a off, no vga connected on boot, drm.debug
xrandr --verbose output ofr a recent drm-intel-next kernel, vga attached (no signal)

Description David Sterratt 2011-03-17 15:33:33 UTC
Created attachment 51042 [details]
dmseg when screen not attached at boot

When I boot up my Toshiba Portege R600 laptop without being connected to an external monitor, it seems to be impossible to switch the output to an external monitor by pressing the "Video Button".  The ACPI signal send by the video button is, according to acpi_listen:

video VGA 00000080 00000000

I have tried switching the output by writing to /proc/acpi/toshiba/video, but it does not activate the output or even change the file:

# cat /proc/acpi/toshiba/video 
lcd_out:                 1
crt_out:                 0
tv_out:                  0
# echo "lcd_out:1" > /proc/acpi/toshiba/video 
# cat /proc/acpi/toshiba/video 
lcd_out:                 1
crt_out:                 0
tv_out:                  0

The symptom of writing having no effect on /proc/acpi/toshiba/video is mentioned here:
http://memebeam.org/toys/ToshibaAcpiVideo

I can drive an external monitor if I boot up attached to a monitor. Then the video button toggles between just the laptop screen and both the screen and the external monitor as usual. The contents of /proc/acpi/toshiba/video is different:

# cat /proc/acpi/toshiba/video 
lcd_out:                 0
crt_out:                 1
tv_out:                  0

But it cannot be changed:

# echo "crt_out:0" > /proc/acpi/toshiba/video 
# cat /proc/acpi/toshiba/video 
lcd_out:                 0
crt_out:                 1
tv_out:                  0

I tried toshset with a patch to the toshiba_acpi module, but

toshset -video both

just gave a blank screen. The report here was generated with an unpatched kernel. 

It would be great if this could be looked into, as it makes it awkward to give presentations.
Comment 1 David Sterratt 2011-03-17 15:34:26 UTC
Created attachment 51052 [details]
output of lspci with screen detached at boot
Comment 2 David Sterratt 2011-04-05 14:24:46 UTC
I've linked to this bug from here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/751453
Comment 3 Jon Dowland 2011-09-02 13:54:34 UTC
Just a quick note that I can reproduce this with 3.1-rc4
Comment 4 Zhang Rui 2012-01-18 03:21:50 UTC
It's great that the kernel bugzilla is back.

Can you please verify if the problem still exists in the latest upstream kernel?
Comment 5 Jon Dowland 2012-01-18 14:52:12 UTC
> It's great that the kernel bugzilla is back.

Indeed it is :-)

I'll have a go with the latest release.

Over Christmas I figured out a work-around relating to a BIOS setting.  Note that Windows DTRT regardless of which way the BIOS setting is flipped, and I think that would be preferred behaviour on Linux:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/751453
Comment 6 Jon Dowland 2012-01-19 12:12:44 UTC
Confirmed with 3.2.1
Comment 7 Jon Dowland 2012-01-19 12:37:56 UTC
Zhang Rui, if you (or anyone else) has the slightest hunch to which area of code (which driver or system or whatever) this bug is living, please let me know and I'll start reading. I'm keen to get more involved in kernel bug fixes but I don't know my way around the kernel well enough yet.

Thanks!
Comment 8 Zhang Rui 2012-05-24 07:56:37 UTC
I suppose this is a graphics issue rather than ACPI.
re-assign to the graphics experts.
Comment 9 Daniel Vetter 2012-05-24 08:47:56 UTC
Ok, we need an info-dump here: Please attach
- full dmesg with drm.debug=0xe added to your kernel commandline
- the output of intel_reg_dumper from intel-gpu-tools
- and xrandr --verbose

for both the broken case (i.e. hotplug not working) and with the bios workaround applied.
Comment 10 Daniel Vetter 2012-11-13 11:26:35 UTC
Reporter seems to have disappeared, closing. If this is still an issue with latest kernels, please reopen with the requested info-dump, thanks.
Comment 11 Jon Dowland 2012-11-13 15:17:29 UTC
Hi Daniel, sorry for the delay in responding.

I still have access to the laptop in question although I have long since moved on to a newer model for my primary machine.  The laptop is on loan at the moment and I will have it back next week, after which I can put a modern Linux back on it and start work. (I actually tried, and failed, to sell it recently; I hope to try again).

If I may be completely frank for a moment. When I get it back I can put time aside to get the information you have requested.  However, on many occasions I've invested a lot of time to triage bugs, particularly kernel bugs, and the issue has never been picked up by a developer afterwards.  Once the debug information is provided, are you committing yourself to look at the issue? Alternatively do you know of a kernel hacker who could, or would, commit themselves?

If not, then sadly it doesn't seem worth my while (I could spend the same several hours more productively on other bugs).

Thanks for your time!
Comment 12 David Sterratt 2012-11-13 15:49:57 UTC
Original reporter back on the thread - apologies for going AWOL. The BIOS setting Jon mentioned at #5 has worked for me & I've been very busy with other things, hence my absence.

If, as Jon says, there is likely to be the developer time to take this forward, I'd be happy to provide the dump information provided asked for at #9 for the kernel provided with Ubuntu 12.04, or possibly a newer kernel if required.
Comment 13 Daniel Vetter 2012-11-13 16:21:58 UTC
Well, in any case we still need that info-dump to even figure out whether there's anything we can do here. Also, please check whether this is also broken when using the plain xrandr cmdline interface - "pressing the video button" has tons of other layers in between which can break things, since on linux the design is to forward these special buttons as input events and let userspace deal with things. Whereas on Windows the idea is to let the firmware do stupid things (in coordination with the intel gfx driver) without userspace being aware of it. Which is pretty much broken by design (but what can you do if you can't change your OS ...).
Comment 14 Jani Nikula 2013-04-10 13:51:44 UTC
Ping. David, please try the more recent kernels, and attach the information requested in comment #9.
Comment 15 Jon Dowland 2013-04-29 16:05:07 UTC
Hi, after a tour around some colleagues I've had my R600 returned. I should be able to supply the requested information this week. I started building a kernel from Linus' git master this morning.
Comment 16 Jon Dowland 2013-05-02 14:01:57 UTC
Created attachment 100451 [details]
dmesg output with BIOS workaround on
Comment 17 Jon Dowland 2013-05-02 14:02:26 UTC
Created attachment 100461 [details]
intel_reg_dumper output with no VGA attached, BIOS workaround on
Comment 18 Jon Dowland 2013-05-02 14:03:01 UTC
Created attachment 100471 [details]
xrandr --verbose output : BIOS workaround on, no VGA attached
Comment 19 Jon Dowland 2013-05-02 14:03:33 UTC
Created attachment 100481 [details]
intel_reg_dumper output with VGA attached, BIOS workaround on
Comment 20 Jon Dowland 2013-05-02 14:03:55 UTC
Created attachment 100491 [details]
xrandr --verbose output : BIOS workaround on, VGA attached
Comment 21 Jon Dowland 2013-05-02 14:04:28 UTC
Created attachment 100501 [details]
dmesg output with BIOS workaround off
Comment 22 Jon Dowland 2013-05-02 14:04:49 UTC
Created attachment 100511 [details]
intel_reg_dumper output with no VGA attached, BIOS workaround off
Comment 23 Jon Dowland 2013-05-02 14:05:18 UTC
Created attachment 100521 [details]
xrandr --verbose output : BIOS workaround off, no VGA attached
Comment 24 Jon Dowland 2013-05-02 14:05:57 UTC
Created attachment 100531 [details]
intel_reg_dumper output with VGA attached, BIOS workaround off
Comment 25 Jon Dowland 2013-05-02 14:06:39 UTC
Created attachment 100541 [details]
xrandr --verbose output : BIOS workaround off, VGA attached

************************************************************
3.9.0-rc8+ (4cbbd1d55dd9375a455d12fc7e844809fbb795c0)
BIOS workaround applied
************************************************************
dmesg: dmesg-1.txt
intel_reg_dumper: intel_reg_dumper-1.txt (no VGA attached)
xrandr --verbose: xrandr-1.txt (no VGA attached)
Attach VGA (works, display wakes up)
xrandr --verbose: xrandr-2.txt (VGA attached)
intel_reg_dumper: intel_reg_dumper-2.txt (VGA attached)


************************************************************
3.9.0-rc8+ (4cbbd1d55dd9375a455d12fc7e844809fbb795c0)
BIOS workaround NOT applied
************************************************************
dmesg: dmesg-2.txt
intel_reg_dumper-3.txt (no VGA attached)
xrandr --verbose: xrandr-3.txt (no VGA attached)
Attach VGA (laptop panel reconfigures, but ext display stays
off)
xrandr --verbose: xrandr-4.txt (VGA attached)
intel_reg_dumper: intel_reg_dumper-4.txt (VGA attached)
Comment 26 Jon Dowland 2013-10-03 10:25:51 UTC
Hi folks — is the above info any good to try and diagnose this further? Thanks!
Comment 27 Jani Nikula 2013-12-11 15:22:30 UTC
(In reply to Daniel Vetter from comment #13)
> Also, please check whether this is also
> broken when using the plain xrandr cmdline interface - "pressing the video
> button" has tons of other layers in between which can break things, since on
> linux the design is to forward these special buttons as input events and let
> userspace deal with things.

Hmm, I don't think we ever got a response on this bit. Can you change outputs using xrandr on the command line?
Comment 28 Jon Dowland 2014-01-27 13:46:39 UTC
Hi,

On Wed, Dec 11, 2013 at 03:22:30PM +0000,
bugzilla-daemon@bugzilla.kernel.org wrote:
> Hmm, I don't think we ever got a response on this bit. Can you change
> outputs using xrandr on the command line?

I am 99% sure that the external display was visible in xrandr,
operations to switch/enable/disable screens completed without
the xrandr tool reporting any problem, but the display did not
turn on no matter what.

I still have this laptop, although it's on loan to someone at the
moment, I should get it back in the next week.
Comment 29 Jani Nikula 2014-09-12 08:36:13 UTC
This bug seems to have been neglected a bit, apologies. I'm afraid we don't have much clues on it either; it smells like a bios and driver cooperation issue. I can only ask you to try a recent kernel.

I'd appreciate a dmesg with drm.debug=0xe from early boot, running a recent kernel (preferrably v3.17-rc or drm-intel-nightly) with:
1) bios w/a off (since IIUC there's no problem with another BIOS setting)
2) boot with vga disconnected (since IIUC there's no problem booting it connected)
3) connect vga
4) run xrandr --verbose (and attach the output too).
Comment 30 Jon Dowland 2014-10-10 08:50:46 UTC
Hi Jani, thanks; I've got my R600 set up as a testing rig now so I should be able to provide this very soon.
Comment 31 Jon Dowland 2014-10-24 16:01:42 UTC
Created attachment 154841 [details]
dmesg for a recent kernel, bios w/a off, no vga connected on boot, drm.debug

Dear Jani - please find attached as requested. This is with drm-intel-nightly, specifically b727735732d5b2.
Comment 32 Jon Dowland 2014-10-24 16:02:30 UTC
Created attachment 154851 [details]
xrandr --verbose output ofr a recent drm-intel-next kernel, vga attached (no signal)

Dear Jani - please find attached as requested. This is with drm-intel-nightly, specifically b727735732d5b2.
Comment 33 Jani Nikula 2015-10-07 09:56:46 UTC
Long time no updates, closing.

If the problem persists with latest kernels, please file a bug at the freedesktop.org bugzilla [1], referencing this bug. Thank you.

[1] https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel