← Back to team overview

hybrid-graphics-linux team mailing list archive

Re: asus-switcheroo and U35JC so far

 

On Mon, Apr 25, 2011 at 11:46 AM, Joakim Gebart <joakim.gebart@xxxxxx> wrote:
> Hello,
> I've been experimenting with the asus-switcheroo module for a couple of
> days now but so far I haven't had much success in switching outputs.
> Any suggestions on what I should try next are welcome.
>
> Below I will try to summarize everything I have tried and everything I
> have found out about the U35JC for future reference:
> This particular system is an Asus U35JC-RX040V: Geforce GT310 and i3-370M.
> I have disassembled the DSDT and found that I have the MXMX, MXDS and
> _DSM methods on both \_SB.PCI0.GFX0 and \_SB.PCI0.PEG1.GFX0.
> asus-switcheroo loads correctly with the messages:
> Found VGA device 0000:00:02.0 (\_SB_.PCI0.GFX0): IGD
> Found VGA device 0000:01:00.0 (\_SB_.PCI0.PEG1.GFX0): DIS
> Asus switcheroo: detected DSM switching method \_SB_.PCI0.PEG1.GFX0 handle
> and the debugfs directory is created.
> ON/OFF commands seem to be working, but whenever I try to switch to
> discrete my console image freezes (not a blank screen as I read in
> another mail on this list)

Interesting, this is what was happening to me before I found the MXMX
call.  It seems like the screen mux is still connected to the IGD,
even though we've activated the discrete graphics.  On my system, the
console would continue working on hdmi if I plugged a monitor in.  The
ordering of calling MXMX then MXDS was trial and error on my system
with acpi_call.  I'm sure it could use some refinement..

> but the system doesn't hang, I can blind type
> echo IGD > /sys/kernel/debug/vgaswitcheroo/switch to get my console
> back. If I try to start X when the screen is frozen it seems to be
> starting correctly and I have managed to turn off X again and blind
> switch back to IGD. The Xorg.log file then shows that the nouveau driver
> is used when I start X blind, i915 otherwise. I don't currently have an
> xorg.conf but looking at the log file it doesn't seem like I should need
> one.

No, you shouldn't.  AFAIK, only the nvidia driver still uses it.

> I read in another thread on this list that someone suggested testing
> with an external monitor, I've tried both switching when having a VGA
> monitor connected and connecting a monitor after switching to trigger
> something in the nouveau driver, but still nothing. I added a small
> printk to the nouveau driver to show when the reprobe is called and it
> shows that it is being called when I switch.

The reprobe not working is probably tied to the screen not going
black, which I think indicates the mux isn't being switched.

> Someone on this list suggested using the HDMI connector but I haven't
> got an HDMI capable monitor here but I will try this when I get back
> home next week if I don't find out anything before that.

AIUI, the hdmi is only connected to the discrete graphics, so maybe
doesn't have the same mux problems.  But, if the screen is freezing
instead of going black, that suggests maybe we're not flipping the mux
correctly.  Or at least it doesn't match my experience.

> I've tried using dummy_client=1 to get the binary nvidia driver working
> but when I switch to DIS the whole system locks up, from this I haven't
> been able to switch back and X doesn't start up (with a valid xorg.conf).
> I also tried disabling modeswitch in the i915 driver but without
> modeswitch the driver doesn't register a switcheroo client (just like
> someone wrote on this list).
> The system is Gentoo Linux ~amd64 and the kernel is 2.6.38-gentoo3 which
> is based on 2.6.38.3 and contains just some small fixes for (irrelevant
> in this case) stuff like CIFS and XEN, see
> http://dev.gentoo.org/~mpagano/genpatches/patches-2.6.38-3.htm.
> I don't use a ramdrive but I boot up to a recovery shell ( init=/bin/bb
> ) to test this to make sure I don't have anything else loaded that can
> interfere with the switching.
>
> Any suggestions?

Based on the DSDT, I would have expected your system to be very
similar to my UL30VT, but it seems like the mux isn't getting switched
by MXMX.  If you're willing to risk it, login to the system over the
net, switch the graphics, then play with acpi_call to poke at some
functions and see if you get lucky.  Note that it's possible this
could do bad things to your hardware, but I've never hit anything a
reboot doesn't clear.  Thanks,

Alex


References