Bug 24552 - vga_switcheroo does not switch from intel to nvidia and OFF freezes X at X restart
Summary: vga_switcheroo does not switch from intel to nvidia and OFF freezes X at X re...
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(Other) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_video-other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-09 13:53 UTC by Giacomo
Modified: 2012-08-14 14:03 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.35
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Giacomo 2010-12-09 13:53:52 UTC
Hello.

In my double carded ASUS U30JC (nvidia + intel i915) I do the following:

stop X

This is the output of /sys/kernel/debug/vgaswitcheroo/switch

daphne linux # cat /sys/kernel/debug/vgaswitcheroo/switch 
0: :Pwr:0000:01:00.0
1:+:Pwr:0000:00:02.0 (intel graphic card in use, ok)

echo "DDIS" > /sys/kernel/debug/vgaswitcheroo/switch does not change
the output above (intel remains marked as active)

echo "OFF" > /sys/kernel/debug/vgaswitcheroo/switch

seems to switch off Nvidia card, because the output above becomes:
0: :Off:0000:01:00.0
1:+:Pwr:0000:00:02.0

restarting X completely freezes the machine, black screen (need to power down by
pressing the power button).


ASUS U30JC Nvidia (nouveau) + intel i915.

Kernel 2.6.35
x11-base/xorg-server 1.9.2.902
x11-drivers/xf86-video-nouveau 0.0.16_pre20101010

Shutting down the Nvidia graphic card via acpi_call
https://github.com/mkottman/acpi_call
produces the same freeze after trying to restart X.

Same problem with kernel 2.6.36 and acpi_call.
Did not try vga switcheroo on 2.6.36 due to problems with that kernel

https://bugzilla.kernel.org/show_bug.cgi?id=24542

echo "OFF" > /sys/kernel/debug/vgaswitcheroo/switch 

produces in dmesg:

Dec  8 00:06:18 daphne kernel: VGA switcheroo: switched nouveau off
Dec  8 00:06:18 daphne kernel: [drm] nouveau 0000:01:00.0: Disabling fbcon acceleration...
Dec  8 00:06:18 daphne kernel: [drm] nouveau 0000:01:00.0: Unpinning framebuffer(s)...
Dec  8 00:06:18 daphne kernel: [drm] nouveau 0000:01:00.0: Evicting buffers...
Dec  8 00:06:18 daphne kernel: [drm] nouveau 0000:01:00.0: Idling channels...
Dec  8 00:06:18 daphne kernel: [drm] nouveau 0000:01:00.0: Suspending GPU objects...
Dec  8 00:06:19 daphne kernel: [drm] nouveau 0000:01:00.0: And we're gone!
Dec  8 00:06:19 daphne kernel: nouveau 0000:01:00.0: PCI INT A disabled
Dec  8 00:06:19 daphne kernel: nouveau 0000:01:00.0: power state changed by ACPI to D3

which seems to be correct.

The crash taking place when restarting X does not leave any trace on dmesg.

Thanks in advance.

Giacomo.
Elettra Synchrotron Radiation Facility
Trieste, IT.
Comment 1 Michiel Ten Hagen 2011-04-12 09:40:22 UTC
This system uses Optimus™ where the IGD is the only display with a connection to the screen, it is not possible to directly use the DIS.
Comment 2 Giacomo 2011-04-12 10:04:20 UTC
Anyway vga_switcheroo interface has disappeared since 2.6.37 at least, hasn't it?

So the only way to disable NVidia graphics card is via acpi_call, which in
2.6.39 seems to work.

What's the future of all this? Is there any "future"?
Comment 3 Peter Wu 2012-07-10 13:55:49 UTC
Giacomo, can this bug be closed? "Switching" from iGPU do dGPU does not work for Optimus systems as mentioned by Michiel. The "future" is possibly PRIME which allows you to use the nvidia card (though there is currently no way to turn it off when using PRIME AFAIK).

For turning off the card, you need to load the nouveau driver. One problem atm is that it does not disable the card on suspend/resume. An alternative that currently does handle s/r is bbswitch[1]. In the future, switcheroo should be able to handle s/r too.

PRIME is created by Dave Airlie, he posts updates on his blog http://airlied.livejournal.com/

 [1]: https://github.com/Bumblebee-Project/bbswitch

Note You need to log in before you can comment on or make changes to this bug.