From: <bug...@bu...> - 2011-05-02 22:39:29
|
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: dri...@ke... ReportedBy: e-...@da... CC: ale...@gm... 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 -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-02 22:45:51
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 Andrew Morton <ak...@li...> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ak...@li... --- Comment #1 from Andrew Morton <ak...@li...> 2011-05-02 22:45:36 --- >From which kernel is this a regression? 2.6.38, I assume? -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-02 22:48:58
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 Rafael J. Wysocki <rj...@si...> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fl...@mi..., | |mac...@gm..., | |rj...@si... Blocks| |32012 -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-02 22:52:03
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 --- Comment #2 from Igor Murzov <e-...@da...> 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. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-03 10:18:43
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 Rafael J. Wysocki <rj...@si...> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|32012 |27352 -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-09 19:19:06
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 --- Comment #3 from Florian Mickler <fl...@mi...> 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? -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-09 21:53:50
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 --- Comment #4 from Igor Murzov <e-...@da...> 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 -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-09 21:56:14
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 --- Comment #5 from Igor Murzov <e-...@da...> 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. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-10 13:17:52
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 --- Comment #6 from Florian Mickler <fl...@mi...> 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? -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-10 18:09:08
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 --- Comment #7 from Igor Murzov <e-...@da...> 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. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-11 06:19:08
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 --- Comment #8 from Florian Mickler <fl...@mi...> 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 ) -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-11 22:49:46
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 --- Comment #9 from Igor Murzov <e-...@da...> 2011-05-11 22:49:30 --- > 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 > Anyway, I presume working around that in userspace is not the issue? You are right. I wrote simple script for this already. Thanks. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-12 14:04:43
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 --- Comment #10 from Florian Mickler <fl...@mi...> 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. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-12 23:01:48
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 --- Comment #11 from Igor Murzov <e-...@da...> 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. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-14 22:19:15
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 Rafael J. Wysocki <rj...@si...> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |PATCH_ALREADY_AVAILABLE --- Comment #12 from Rafael J. Wysocki <rj...@si...> 2011-05-14 22:19:01 --- Patch : https://bugzilla.kernel.org/attachment.cgi?id=57582 Handled-By : Florian Mickler <fl...@mi...> -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-19 07:21:28
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 --- Comment #13 from Florian Mickler <fl...@mi...> 2011-05-19 07:21:09 --- A patch referencing this bug report has been merged in v2.6.39: commit a67b8887ced9d54cab7759bdb19deafed37481eb Author: Florian Mickler <fl...@mi...> Date: Sun May 15 16:32:50 2011 +0200 vga_switcheroo: don't toggle-switch devices -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |
From: <bug...@bu...> - 2011-05-19 07:27:38
|
https://bugzilla.kernel.org/show_bug.cgi?id=34252 Florian Mickler <fl...@mi...> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED Resolution|PATCH_ALREADY_AVAILABLE |CODE_FIX -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. |