← Back to team overview

sony-vaio-z-series team mailing list archive

Re: Intel Flash support

 

Hi Adam,

No problem, I only found out about the alternatives system because I
noticed that Xorg could not find the correct .so files to load the
nvidia glx and I just followed the symlinks.
I think you are right that the alternatives system only works on
debian based systems, but for my Kubuntu 10.10 system that is enough.

The update-alternatives command is actually not that difficult, it
just sets the (Open)GL configuration to either the mesa directory or
the nvidia directory. Note that I have not created anything, all this
is already present on any Ubuntu system. So it will work for anyone
with Ubuntu and will also continue to work even after updating mesa or
nvidia on those systems (I hope :P).

I haven't used the nvidia installer directly, I just use the
nvidia-current packages of (K)Ubuntu and these packages take care of
updating the alternatives system. I don't know if the nvidia installer
itself also does that.

For other distros there might be a different system...

Regards,

Rutger

2010/11/12 Adam Hill <sidepipeuk@xxxxxxxxx>:
> Hi Rutger,
>
>        I don't really know enough about the alternatives system to be able to do
> too much with this to be honest, and don't really have the time to find out :
> (. I agree that in a perfect world that would be the way to go, but my limited
> understanding gives me a few concerns which maybe you can address :).
>
> - I thought that alternatives was debian specific. I hoped to get a script
> together which had a chance of working in most distros ( ok, I used upstart
> but this is at least more generic and can simply be swapped for a traditional
> rc.d script. )
>
> - The creation of the appropriate config seems a little involved, some very
> long update-alternatives --install command? Maybe some dpkg divert command to
> prevent new installs of mesa-gl putting things back?
>
> - I wasn't sure that the NVidia installer would play nicely with the
> alternatives system - i.e. if you re-install or update the NVidia drivers,
> would things still work without re-doing some of the alternatives stuff?
>
>        The aim of the script was just to knock up something very quickly which
> had a hope of being fairly user-ignorable once it was in, hence the way it
> looks for "nvidia" in a file to try to determine which files are installed in
> case they're updated etc. etc.  As you can tell, I don't really know enough (
> actually virtually nothing! ) about debian alternatives to even test what
> you've done below.
>
>        Sorry :(.
>
> Adam.
>
>
> On Thursday 11 November 2010 21:08:24 Rutger Hendriks wrote:
>> Hi Adam, list
>>
>> I've tried to use your script, but I wasn't able to get 3D
>> acceleration working that way. The nvidia and xorg libraries get mixed
>> up all the time.
>>
>> However, I have modified your script, based on the standard
>> /etc/alternatives configuration functionality, see the script below.
>> Now I am able to use both intel AND nvidia 3D acceleration (using the
>> 2.6.28 kernel to enable nvidia).
>>
>> Can you check if this works for you too? I seems like a much cleaner
>> solution.
>>
>> Note: When switching to the other graphics card I need to restart the
>> X server for everything to work as expected. It seems this is because
>> when booting on stamina, the X server is immediately started on the
>> framebuffer, even before the below script is run and the libraries are
>> set correctly. When booting on speed mode the X server is also started
>> to early it seems. Anyway an x server restart fixes everything.
>>
>> #!/bin/sh -e
>> #
>>
>> modprobe sony-laptop 2>/dev/null
>>
>> set_alternatives_to_intel()
>> {
>>         echo "Intel card active."
>>         update-alternatives --set gl_conf /usr/lib/mesa/ld.so.conf
>>         ldconfig
>>         return 0
>> }
>>
>> set_alternatives_to_nvidia()
>> {
>>         echo "NVidia card active."
>>         update-alternatives --set gl_conf
>> /usr/lib/nvidia-current/ld.so.conf ldconfig
>>         return 0
>> }
>>
>>
>> if [ "$(uname -r)" = "2.6.35-rc6-vaioz" -o "$(uname -r)" =
>> "2.6.35-vaioz" -o "$(uname -r)" = "2.6.36-rc3-vaioz" -o "$(uname -r)"
>> = "2.6.36-0-vaioz" ]
>> then
>>         [ "$(cat /sys/devices/platform/sony-laptop/speed_stamina)" =
>> "stamina" ] && set_alternatives_to_intel || set_alternatives_to_nvidia
>> fi
>>
>> exit 0
>>
>> 2010/11/1 Adam Hill <sidepipeuk@xxxxxxxxx>:
>> >> I think the reason because you can't get compiz to work, is because
>> >> nvidia messed up your librarys.
>> >
>> >        I've now created a workaround for this at:
>> >
>> > http://www.voip-x.co.uk/files/adam/upstart-vaioz-gfx.tar.bz2
>> >
>> >        As usual with everything I've done it carries a health warning,
>> > may not work at all, and even if it does may only work on Kubuntu 10.04
>> > 64bit. Obviously feedback to the list if it DOES work is useful.
>> >
>> >        This is essentially a script which tries to determine which card
>> > SHOULD be active, and which files are currently on the system. If the
>> > two don't match, it saves the current GL libs etc and replaces them with
>> > ( hopefully ) the correct ones. You should be able to install the NVidia
>> > driver in speed mode, and the standard intel X stuff in stamina mode,
>> > and they should be preserved. It needs work to make it more generic
>> > really, but there you go, its a start.
>> >
>> >        To install, untar the file as root in to /. You will also need to
>> > edit either /etc/init/kdm.conf or /etc/init/gdm.conf so that the display
>> > manager isn't started until after this. To do that, change the section
>> > in the appropriate file from:
>> >
>> > start on (filesystem
>> >          and started dbus
>> >          and (graphics-device-added fb0 PRIMARY_DEVICE_FOR_DISPLAY=1
>> >        ...
>> >
>> >        to:
>> >
>> > start on (filesystem
>> >          and started dbus
>> >          and started vaioz-gfx-config
>> >          and (graphics-device-added fb0 PRIMARY_DEVICE_FOR_DISPLAY=1
>> >        ...
>> >
>> > Adam.
>> >
>> >> Try this in the console:
>> >> sudo apt-get --reinstall install xserver-xorg-core libgl1-mesa-glx
>> >>
>> >> After that, everything works fine for me, including compiz and
>> >> fullscreen flash videos and full hd videos.
>> >>
>> >> If you want to use the NVidia Driver again, you have to reinstall it.
>> >>
>> >> Greets Adri
>> >>
>> >> On 01.11.2010 08:56, Brett Howard wrote:
>> >> > Huh well before it would simply flash and then poof the video would
>> >> > stop and there would be no more video in the browser window...  I
>> >> > wasn't able to simply run this command but I created the file and
>> >> > added that line (the file nor folder previously existed).  After this
>> >> > addition I was able to get it to go fullscreen but it was just a white
>> >> > box and it took the entire xserver with it.  I was able to get to TTY1
>> >> > but returning to TTY7 did nothing.  I'd like to be able to get a
>> >> > little better complete support for the intel card (I can't get compiz
>> >> > to run either) but the NVidia support is so good that I'd rather spend
>> >> > time there...  The only thing better about intel land is the lower
>> >> > power and the ability to adjust brightness...  If I was able to get
>> >> > video and compiz support I'd be a HAPPY boy and I'd then live 100% in
>> >> > the integrated graphics land...
>> >> >
>> >> > Appreciate the tip...  But unfortunately I didn't quite get there yet.
>> >> >
>> >> > ~Brett
>> >> >
>> >> > On Sun, Oct 31, 2010 at 11:26 PM, Albert Vilella<avilella@xxxxxxxxx>
>> >
>> > wrote:
>> >> >> I found this way to solve it:
>> >> >>
>> >> >> cat /etc/adobe/mms.cfg
>> >> >> "OverrideGPUValidation = 1"
>> >> >>
>> >> >> On Mon, Nov 1, 2010 at 4:13 AM, K. Posern<quickhelp@xxxxxxxxx>  wrote:
>> >> >>> For me it is that sometimes the flash video pauses when I enter
>> >> >>> fullscreen.
>> >> >>> But I don't think that the flash engine dies. I can still exit
>> >> >>> fullscreen, enter again.
>> >> >>> If I repeat a few times I succeed in getting flash fullscreen to
>> >> >>> work. Sometimes even at first fullscreen.
>> >> >>>
>> >> >>> Also: Mplayer, vlc play flash flv well in fullscreen.
>> >> >>>
>> >> >>> Who to blame? Good question :)
>> >> >>> I am glad for any hint.
>> >> >>>
>> >> >>> Thanks!
>> >> >>>
>> >> >>> Knuth
>> >> >>>
>> >> >>> ---
>> >> >>>
>> >> >>> On 10/31/2010 10:25 PM, Brett Howard wrote:
>> >> >>>> Anyone else having issues with flash on the Intel card?  When I
>> >> >>>> click to fullscreen a video the flash engine dies...
>> >> >>>>
>> >> >>>> ~Brett
>> >> >>>>
>> >> >>>> _______________________________________________
>> >> >>>> Mailing list: https://launchpad.net/~sony-vaio-z-series
>> >> >>>> Post to     : sony-vaio-z-series@xxxxxxxxxxxxxxxxxxx
>> >> >>>> Unsubscribe : https://launchpad.net/~sony-vaio-z-series
>> >> >>>> More help   : https://help.launchpad.net/ListHelp
>> >> >>>
>> >> >>> _______________________________________________
>> >> >>> Mailing list: https://launchpad.net/~sony-vaio-z-series
>> >> >>> Post to     : sony-vaio-z-series@xxxxxxxxxxxxxxxxxxx
>> >> >>> Unsubscribe : https://launchpad.net/~sony-vaio-z-series
>> >> >>> More help   : https://help.launchpad.net/ListHelp
>> >> >
>> >> > _______________________________________________
>> >> > Mailing list: https://launchpad.net/~sony-vaio-z-series
>> >> > Post to     : sony-vaio-z-series@xxxxxxxxxxxxxxxxxxx
>> >> > Unsubscribe : https://launchpad.net/~sony-vaio-z-series
>> >> > More help   : https://help.launchpad.net/ListHelp
>> >>
>> >> _______________________________________________
>> >> Mailing list: https://launchpad.net/~sony-vaio-z-series
>> >> Post to     : sony-vaio-z-series@xxxxxxxxxxxxxxxxxxx
>> >> Unsubscribe : https://launchpad.net/~sony-vaio-z-series
>> >> More help   : https://help.launchpad.net/ListHelp
>> >
>> > _______________________________________________
>> > Mailing list: https://launchpad.net/~sony-vaio-z-series
>> > Post to     : sony-vaio-z-series@xxxxxxxxxxxxxxxxxxx
>> > Unsubscribe : https://launchpad.net/~sony-vaio-z-series
>> > More help   : https://help.launchpad.net/ListHelp
>



Follow ups

References