← Back to team overview

sony-vaio-z-series team mailing list archive

Re: Brightness control on nvidia

 

> I just tried it and the switching process pretty much works (DISCLAIMER:
> never got the screen to display anything with the dyn. switched nvidia
> card). Unfortunately the output detection isn't really working, so the
> panel doesn't get initialized and receives no data.

	This is encouraging, though WHY output detection doesn't work is a little 
worrying. Having said that, I've not tried the Nouveau driver for ages, but I 
guess that it works in static switched mode. This could mean that the BIOS is 
still doing something that Dave's switch code isn't and so it may be that the 
output MUXes are still wrong rather than a driver issue per se. However, the 
issue that I've usually seen is that the NVidia BIOS isn't detected by the 
driver, and so this is an improvement. Do you know why the proprietary nvidia 
driver doesn't work? ( To stand any chance you would have to switch with the 
nouveau driver in place, then unload it. )
 
> After switching back to Intel we have the old 'backlight on, screen
> black' condition, just as after suspend with a non-fixed kernel. (Doing
> a suspend-cycle makes the screen work again.)

	To be honest to me this isn't a major issue ( and will inevitably be 
fixed by Jesse anyway :). ) The fact is though that X doesn't ( yet ) have the 
required hooks to be able to do true dynamic switching AFAIK, and so all we 
are hoping for at this point is that we can get the NVidia card working whilst 
the Intel card is still around, so that we can get brightness working and not 
have to use and BIOS or old kernel hacks. The fact that you can only switch 
cards by rebooting is, IMHO, less of an issue.

Adam.


> I was able to start X using the dynamically switched 330M (using
> nouveau, not the binary driver), but as it didn't detect any output, the
> screen stayed black. And, to stay on topic, I tried switching backlight
> brightness. It didn't work initially, because the Intel card was powered
> off. But you can power it on again (echo ON > switch) and the brightness
> control works as perfectly as it gets with black screen.
> 
> Of course this isn't of much use currently, but if Dave Airlie and Jesse
> Barnes continue to do such a great job, we can soon switch between
> graphic cards without rebooting (and have a working backlight control).
> 
> Michael
> 
> On Fri, 2010-12-10 at 11:55 +0000, Adam Hill wrote:
> > 	This does, indeed, look very interesting. I haven't looked at it ( other
> > 
> > than the first web page ) but as Dave says it should be possible, maybe,
> > to write a very small stub which switches to the NVidia in console mode
> > so that the proprietary driver could then be loaded.
> > 
> > 	I can't promise anything, because I really am being crushed under the
> > 
> > weight of stuff to do at the mo, but if I get a chance over the weekend
> > I'll try to dig a bit deeper in to what he is doing and see if it is at
> > a point where it is useful on the Z.
> > 
> > Adam.
> > 
> > On Friday 10 December 2010 11:47:06 Joël Bourquard wrote:
> > > Thanks Michael, this looks very nice !
> > > 
> > > Only drawback is that it wouldn't work with Nvidia's drivers yet, so
> > > CUDA acceleration would be out of the question, unless I'm mistaken...
> > > 
> > > 
> > > On Fri, Dec 10, 2010 at 12:40 PM, Michael Zugelder <
> > > 
> > > michaelzugelder@xxxxxxxxxxxxxx> wrote:
> > > > Hi,
> > > > 
> > > > Dave Airlie is currently making some progress in the intel<->nvidia
> > > > switching
> > > > area (http://airlied.livejournal.com/74176.html). I haven't tested
> > > > his drm-nvidia-switch branch yet, but it looks very interesting. If
> > > > the "correct"
> > > > runtime switching works, there shouldn't be much issues in getting
> > > > the brightness control to work, regardless of which graphics card is
> > > > currently used
> > > > to output video.
> > > > 
> > > > Michael
> > > > 
> > > > On Fri, Dec 10, 2010 at 11:28 AM, Adam Hill <sidepipeuk@xxxxxxxxx> 
wrote:
> > > > >> This is interesting, so that would mean that the "physical
> > > > >> connection"
> > > > 
> > > > of
> > > > 
> > > > >> the Intel card to the backlight is in fact *not* physical at all,
> > > > >> but instead it's a software situation that results from the
> > > > >> BIOS's way of initializing things ?
> > > > >> 
> > > > >        Ahh, no, I don't believe so. The reason that I say this is
> > > > >        that we
> > > > 
> > > > use
> > > > 
> > > > > either a modified BIOS to enable static switching, or the old
> > > > > kernel boot trick, in order to get the Vaio to initialise the
> > > > > NVidia card and disable
> > > > 
> > > > the
> > > > 
> > > > > Intel card completely in order to get the NVidia drivers to work.
> > > > > If the
> > > > 
> > > > link
> > > > 
> > > > > to brightness was configurable, then it would seem strange that
> > > > > Sony
> > > > 
> > > > added
> > > > 
> > > > > these options in the BIOS, but then didn't link the brightness to
> > > > > the
> > > > 
> > > > NVidia
> > > > 
> > > > > card at the same time!
> > > > > 
> > > > >> It would be really, really great to be able to fix the mapping, so
> > > > >> that
> > > > 
> > > > the
> > > > 
> > > > >> NVIDIA card can then control everything.  I'm pretty damn sure
> > > > >> this is
> > > > 
> > > > just
> > > > 
> > > > >> a matter of getting more exposure (ie: more knowledgable kernel
> > > > >> and/or "Nouveau" developers) about this issue, what do you think
> > > > >> ?
> > > > >> 
> > > > >        Well, what it needs is someone who really knows how VGA
> > > > >        cards work
> > > > 
> > > > in
> > > > 
> > > > > terms of initial set-up by the BIOS. We could then "undo" what was
> > > > > done
> > > > 
> > > > for
> > > > 
> > > > > the Intel card and re-do what the BIOS does in static mode for the
> > > > 
> > > > NVIdia.
> > > > 
> > > > >        Moving on from that, if X has a way of saving a session (
> > > > >        well,
> > > > 
> > > > window
> > > > 
> > > > > posisions and screen content in a way that is independent of VRAM,
> > > > > ) then
> > > > 
> > > > we
> > > > 
> > > > > could even have dynamic switching working, i.e.
> > > > > 
> > > > > Save session state and exit X.
> > > > > Unmap Intel card
> > > > > Remap NVidia
> > > > > Run X with restored session.
> > > > > 
> > > > >        Unfortunately I don't have this knowledge or the time to
> > > > >        acquire
> > > > 
> > > > it :(.
> > > > 
> > > > > Adam.
> > > > > 
> > > > >> On Fri, Dec 10, 2010 at 10:12 AM, Adam Hill <sidepipeuk@xxxxxxxxx>
> > > > 
> > > > wrote:
> > > > >> > > Same here, I would be very happy if we could control
> > > > >> > > brightness
> > > > 
> > > > while
> > > > 
> > > > >> > > running on the NVIDIA card.  I don't know exactly what it
> > > > >> > > takes,
> > > > 
> > > > maybe
> > > > 
> > > > >> > the
> > > > >> > 
> > > > >> > > Intel card needs to be accessible from the PCI bus (since, as
> > > > >> > > I
> > > > 
> > > > heard,
> > > > 
> > > > >> > the
> > > > >> > 
> > > > >> > > physical brightless control is connected to the Intel card). 
> > > > >> > > As I
> > > > 
> > > > see
> > > > 
> > > > >> > it,
> > > > >> > 
> > > > >> > > initializing the Intel card without allocating any of its
> > > > >> > > buffers
> > > > 
> > > > (ie:
> > > > >> > > initialize it just enough so we can ask it to set the
> > > > >> > > brightness)
> > > > 
> > > > might
> > > > 
> > > > >> > be
> > > > >> > 
> > > > >> > > the way to do it.
> > > > >> > > 
> > > > >> >         I fear that it may be much more complicated than that
> > > > >> >         because
> > > > 
> > > > as
> > > > 
> > > > >> > far as I
> > > > >> > know the BIOS initialises the Intel card at boot time regardless
> > > > >> > of
> > > > 
> > > > the
> > > > 
> > > > >> > position of the hybrid graphics switch. That means that by the
> > > > >> > time
> > > > 
> > > > the
> > > > 
> > > > >> > Linux
> > > > >> > kernel starts the Intel card already has its BIOS and VRAM
> > > > >> > mapped in
> > > > 
> > > > to
> > > > 
> > > > >> > where
> > > > >> > the NVidia drivers expect their stuff to be.
> > > > >> > 
> > > > >> >        The simplest solution overall would be if Sony modified
> > > > >> >        the
> > > > 
> > > > BIOS
> > > > 
> > > > >> >        to
> > > > >> > 
> > > > >> > initialise the correct card at first boot, but that isn't going
> > > > >> > to
> > > > 
> > > > happen
> > > > 
> > > > >> > because Windows doesn't care. So, the two sensible options would
> > > > >> > seem
> > > > 
> > > > to
> > > > 
> > > > >> > be:
> > > > >> > 
> > > > >> > 1) Unmap the Intel card's resources and map in the NVidia card
> > > > >> > before
> > > > 
> > > > the
> > > > 
> > > > >> > NVidia module is loaded.
> > > > >> > 
> > > > >> > 2) Somehow map both cards in. I'm not sure if this is possible
> > > > >> > because
> > > > 
> > > > I
> > > > 
> > > > >> > don't
> > > > >> > really know much about how video BIOS is accessed - if it is
> > > > >> > expected
> > > > 
> > > > to
> > > > 
> > > > >> > be in
> > > > >> > a particular place in the memory map then this would be
> > > > >> > impossible.
> > > > >> > 
> > > > >> > Adam.
> > > > >> > 
> > > > >> > > Maybe we could set up a bounty that would go to the one who
> > > > 
> > > > publishes a
> > > > 
> > > > >> > > kernel patch and/or generic shell script and instructions to
> > > > >> > > do it ?
> > > > >> >  
> > > > >> >  That
> > > > >> >  
> > > > >> > > could be nice...
> > > > >> > > 
> > > > >> > > On Thu, Dec 9, 2010 at 5:36 PM, Jordi Augé <jordi@xxxxxxxx> 
wrote:
> > > > >> > > > Hi,
> > > > >> > > > 
> > > > >> > > > I'm a new Vaio Z user, and I've successfully installed Linux
> > > > >> > > > as
> > > > 
> > > > Main
> > > > 
> > > > >> > > > OS on a VPCZ11X9/e, after some struggling I've gotten
> > > > >> > > > everything working, including hsdpa and graphics switching.
> > > > >> > > > My only gripe so far is the inability to control screen
> > > > >> > > > brightness when using
> > > > 
> > > > nvidia
> > > > 
> > > > >> > > > graphics.
> > > > >> > > > 
> > > > >> > > > Any updates on this issue? what changes will be necessary to
> > > > >> > > > implement it?
> > > > >> > > > 
> > > > >> > > > _______________________________________________
> > > > >> > > > Mailing list:
> > > > >> > > > https://launchpad.net/~sony-vaio-z-series<https://launchpad.
> > > > >> > > > net/ %7Esony-vaio-z-series>
> > > > 
> > > > <https://launchpad.net/%7Eso
> > > > 
> > > > >> > > > ny-vaio-z-series>
> > > > >> > 
> > > > >> > <https://launchpad.net/%7Esony-
> > > > >> > 
> > > > >> > > > vaio-z-series> Post to     :
> > > > sony-vaio-z-series@xxxxxxxxxxxxxxxxxxx
> > > > 
> > > > >> > > > Unsubscribe :
> > > > >> > > > https://launchpad.net/~sony-vaio-z-series<https://launchpad.
> > > > >> > > > net/ %7Esony-vaio-z-series>
> > > > 
> > > > <https://launchpad.net/%7Eso
> > > > 
> > > > >> > > > ny-vaio-z-series>
> > > > >> > 
> > > > >> > <https://launchpad.net/%7Esony-
> > > > >> > 
> > > > >> > > > vaio-z-series> More help   :
> > > > >> > > > https://help.launchpad.net/ListHelp
> > > > > 
> > > > > _______________________________________________
> > > > > Mailing list:
> > > > > https://launchpad.net/~sony-vaio-z-series<https://launchpad.net/%7E
> > > > > son y-vaio-z-series> Post to     :
> > > > > sony-vaio-z-series@xxxxxxxxxxxxxxxxxxx Unsubscribe :
> > > > > https://launchpad.net/~sony-vaio-z-series<https://launchpad.net/%7E
> > > > > son y-vaio-z-series> More help   :
> > > > > https://help.launchpad.net/ListHelp



References