New: Unexpected behaviour when switching video cards with vga_switcheroo
https://bugzilla.kernel.org/show_bug.cgi?id=34252
Summary: Unexpected behaviour when switching video cards with
vga_switcheroo
Product: Drivers
Version: 2.5
Kernel Version: 2.6.39-rc5+ (1be6a1f89f131e9c3d22f819ec542be9cda8c9e3)
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Video(DRI - non Intel)
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Regression: Yes
Created an attachment (id=56262)
--> (https://bugzilla.kernel.org/attachment.cgi?id=56262)
Kernel config
Trying to setup script, that switches video cards, I ran into the situation when I left with a black screen not possible to do anything with the system. Here is an example:
# cat /sys/kernel/debug/vgaswitcheroo/switch 0:IGD:+:Pwr:0000:01:05.0 1:DIS: :Pwr:0000:02:00.0 # echo IGD > /sys/kernel/debug/vgaswitcheroo/switch # cat /sys/kernel/debug/vgaswitcheroo/switch 0:IGD:+:Off:0000:01:05.0 1:DIS: :Pwr:0000:02:00.0
I think that this behaviour is buggy and this should not happen.
Environment:
# lspci | grep -i vga 01:05.0 VGA compatible controller: ATI Technologies Inc RS780M/RS780MN [Radeon HD 3200 Graphics] 02:00.0 VGA compatible controller: ATI Technologies Inc M93 [Mobility Radeon HD 4500 Series] # uname -a Linux garik-laptop 2.6.39-rc5+ #8 SMP Sat Apr 30 18:36:12 MSD 2011 x86_64 AMD Athlon(tm) Neo Processor MV-40 AuthenticAMD GNU/Linux
Signature · 11 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd --
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
https://bugzilla.kernel.org/show_bug.cgi?id=34252
Andrew Morton <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #1 from Andrew Morton <[email protected]> 2011-05-02 22:45:36 ---
Quoted 1 line
From which kernel is this a regression? 2.6.38, I assume?
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
Rafael J. Wysocki <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected], | |[email protected], | |[email protected] Blocks| |32012
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
--- Comment #2 from Igor Murzov <[email protected]> 2011-05-02 22:51:51 --- This is a regression from linux 2.6.37 actually. I had black screen since 2.6.38rc4, I suppose.
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
Rafael J. Wysocki <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks|32012 |27352
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
--- Comment #3 from Florian Mickler <[email protected]> 2011-05-09 19:18:48 --- Do you have a guess, why this is happening (for example, any error messages from the kernel) ? Can you login via ssh when the system freezes with a black screen? Do you think the system completely froze, or are, for example, the sysrq-keys still working? Is there anything in the dmesg that gives a clue? If there is nothing in the logs, can you try netconsole?
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
--- Comment #4 from Igor Murzov <[email protected]> 2011-05-09 21:53:21 --- @Florian Mickler:
System is not frozen, only screen is black, because active graphical card gets turned off. I can log into the system via ssh and turn graphics on.
If I do echo IGD > /sys/kernel/debug/vgaswitcheroo/switch just after system boot, I get following new lines in dmesg:
[ 1230.530299] fbcon: Remapping primary device, fb0, to tty 1-63 [ 1230.570734] radeon: switched off [ 1230.591094] [drm] Disabling audio support [ 1230.718090] radeon 0000:01:05.0: PCI INT A disabled
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
--- Comment #5 from Igor Murzov <[email protected]> 2011-05-09 21:56:04 --- Created an attachment (id=57042)
--> (https://bugzilla.kernel.org/attachment.cgi?id=57042)
dmesg output
This is a full dmesg output after sending IGD to vgaswitcheroo/switch.
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
--- Comment #6 from Florian Mickler <[email protected]> 2011-05-10 13:17:32 --- Am I understanding correctly that in your opinion the echo IGD > /sys/.../switch should be ignored if already on IGD? I.e. nothing should happen?
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
--- Comment #7 from Igor Murzov <[email protected]> 2011-05-10 18:08:50 --- Either ignored, or DIS card should be turned off, not IGD. I don't know what exactly should happen as there is seems no official docs for vga_switcheroo, only various tutorials and wikis. For example ubuntu tutorial
(https://help.ubuntu.com/community/HybridGraphics) says:
echo IGD > /sys/kernel/debug/vgaswitcheroo/switch
Connects integrated graphics with outputs.
-- absolutely nothing is said if some card should be turned on / off.
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
--- Comment #8 from Florian Mickler <[email protected]> 2011-05-11 06:18:49 --- Hm.. according to the original commit description "ON" / "OFF" is used to turn the not-in-use-card on/off...
What was the behavior before v2.6.38-rc4? I don't know if this was an intended change in behavior or an unintended side effect of some other change. Dave Airlie can probably tell though...
p.s.:
Anyway, I presume working around that in userspace is not the issue? (i.e. maybe doing something like this:
IGDINUSE=grep IGD /sys/kernel/debug/vgaswitcheroo/switch | awk -F":" '{ $3 }' if [ "x$IGDINUSE" != "x+" ]; then
echo IGD > /sys/kernel/debug/vgaswitcheroo/switch
fi
)
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
--- Comment #9 from Igor Murzov <[email protected]> 2011-05-11 22:49:30 ---
Quoted 1 line
What was the behavior before v2.6.38-rc4?
On 2.6.37.6 nothing happens if card is already active:
# cat /sys/kernel/debug/vgaswitcheroo/switch 0:+:Pwr:0000:01:05.0 1: :Pwr:0000:02:00.0 # echo IGD > /sys/kernel/debug/vgaswitcheroo/switch # cat /sys/kernel/debug/vgaswitcheroo/switch 0:+:Pwr:0000:01:05.0 1: :Pwr:0000:02:00.0
Quoted 1 line
Anyway, I presume working around that in userspace is not the issue?
You are right. I wrote simple script for this already. Thanks.
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
--- Comment #10 from Florian Mickler <[email protected]> 2011-05-12 14:04:20 --- Created an attachment (id=57582)
--> (https://bugzilla.kernel.org/attachment.cgi?id=57582)
Proposed fix
Can you test this patch? I don't have any switcheroo setup, but it makes sense and compiles.
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
--- Comment #11 from Igor Murzov <[email protected]> 2011-05-12 23:01:32 --- I've tested the patch. It works just fine. It seems that with this patch vga_switcheroo works the same way as before 2.6.38. Thank you, Florian.
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
Rafael J. Wysocki <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |PATCH_ALREADY_AVAILABLE--- Comment #12 from Rafael J. Wysocki <[email protected]> 2011-05-14 22:19:01 --- Patch : https://bugzilla.kernel.org/attachment.cgi?id=57582
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
--- Comment #13 from Florian Mickler <[email protected]> 2011-05-19 07:21:09 --- A patch referencing this bug report has been merged in v2.6.39:
commit a67b8887ced9d54cab7759bdb19deafed37481eb
Author: Florian Mickler <[email protected]> Date: Sun May 15 16:32:50 2011 +0200
vga_switcheroo: don't toggle-switch devices
Signature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 34252] Unexpected behaviour when switching video cards with vga_switcheroo
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=34252
Florian Mickler <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
Resolution|PATCH_ALREADY_AVAILABLE |CODE_FIXSignature · 15 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel