Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Questions about Wine on Linux
Locked
nepenthes
Level 2
Level 2
Posts: 28
Joined: Tue Feb 07, 2012 7:31 am

Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by nepenthes »

Hi,
I need some help with Wine 1.5.3 on Ubuntu 12.04 64bit.
My Ubuntu install is clean (just reinstalled), ia32 libs are present, my graphics drivers are installed and updated, and my wine profile is clean too.
(I use bumblebee to manage my nvidia optimus configuration, but it is not relevant here as I encounter the same error on both Intel and nvidia graphics cards, and I had this error before installing bumblebee.)

When I try to start Steam or any OpenGL game wine spams the console with this error log :

Code: Select all

err:wgl:is_extension_supported No OpenGL extensions found, check if your OpenGL setup is correct!
Direct3D games are OK.

I really don't understand what is happening because 32bit native games run fine on my computer.
How can native games find the 32bit openGL driver, and not Wine ?
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Re: Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by dimesio »

nepenthes wrote: When I try to start Steam or any OpenGL game wine spams the console with this error log :

Code: Select all

err:wgl:is_extension_supported No OpenGL extensions found, check if your OpenGL setup is correct!
http://bugs.winehq.org/show_bug.cgi?id=30270
nepenthes
Level 2
Level 2
Posts: 28
Joined: Tue Feb 07, 2012 7:31 am

Post by nepenthes »

So Wine and/or Ubuntu 12.04 64bit are broken for now ?
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

nepenthes wrote:So Wine and/or Ubuntu 12.04 64bit are broken for now ?
64 bit 12.04 has multiple problems with Wine, but this particular bug is being reported on other distros, too.
nepenthes
Level 2
Level 2
Posts: 28
Joined: Tue Feb 07, 2012 7:31 am

Post by nepenthes »

Is there a known workaround ? I've been searching for this informations for a while now, and I found nothing relevant.

Something could help me though : what libraries does wine need to get a working 32bit opengl support, and in what folder ?
That would be the first step to check what's missing, as long as correctly installed video drivers and ia32 libs don't provide useful information.

Anything else could cause a this bug ? (the libraries alternatives configurations ?)
Martin Gregorie

Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by Martin Gregorie »

On Sun, 2012-05-06 at 08:02 -0500, dimesio wrote:
nepenthes wrote:
So Wine and/or Ubuntu 12.04 64bit are broken for now ?
64 bit 12.04 has multiple problems with Wine, but this particular bug
is being reported on other distros, too.
In view of this its worth pointing out that, unless you have more than
4GB of RAM installed, there should be no need to run a 64 bit OS.

I have a Core Duo based Laptop with 3GB RAM and Intel integrated
graphics and a Dual Athlon box with 4GB RAM and an nVidia GEforce 7100.
Both run 32 bit versions of Fedora (F15 and F16 respectively) and both
are capable of using all the memory they have installed.

Martin
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

Everyone: please read the bug report. This particular problem is NOT a 64 bit issue.
nepenthes
Level 2
Level 2
Posts: 28
Joined: Tue Feb 07, 2012 7:31 am

Post by nepenthes »

My Intel i7 has a 64bitnative architecture. 64bit is officially supported in Ubuntu and Wine packages.

I have used 64bit for 4 years now, and alla the main compatibility bugs have been fixed more than 3 years ago.

64bit is more efficient than 32 while encoding videos or rendering graphics, and supports more C and C++ optimizations, which improves the overall system speed and reactivity.

So I see no reason why I should use a 32bit OS. I won't argue with anyone on that point.
jordan

Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by jordan »

My Intel i7 has a 64bitnative architecture. 64bit is officially supported in Ubuntu and Wine packages.

I have used 64bit for 4 years now, and alla the main compatibility bugs have been fixed more than 3 years ago.

64bit is more efficient than 32 while encoding videos or rendering graphics, and supports more C and C++ optimizations, which improves the overall system speed and reactivity.

So I see no reason why I should use a 32bit OS. I won't argue with anyone on that point.
And you would be correct to do so ;) Martin seems to be ignoring all
of the benefits of 64bit CPUs, and only considering the RAM side of
things;
In view of this its worth pointing out that, unless you have more than
4GB of RAM installed, there should be no need to run a 64 bit OS.
As a matter of FACT - Your above statement is incorrect. Using 64bit
has more implications than just being able to use 4+gig of ram. Sure,
64bit tends to use more memory, but using 64bit offers (significantly)
better performance being as you can directly use 64bit data structures
/ 64bit registers / address spaces.

I'd also like to point out that telling someone with some /lib32
issues, to install a 32bit OS is not a solution.

cheerz
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

nepenthes wrote: I have used 64bit for 4 years now, and alla the main compatibility bugs have been fixed more than 3 years ago.
As I said before, 64 bit 12.04 is broken for Wine for other reasons. Even if you find a workaround for the wgl bug, you will run into those other problems.
https://bugs.launchpad.net/ubuntu/+sour ... bug/978678
https://bugs.launchpad.net/ubuntu/+sour ... bug/944321
Martin Gregorie

Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by Martin Gregorie »

On Sun, 2012-05-06 at 10:02 -0400, jordan wrote:
And you would be correct to do so ;) Martin seems to be ignoring all
of the benefits of 64bit CPUs, and only considering the RAM side of
things;
A lot of people seem to think that you can't address 4GB of RAM with a
32 bit OS, which isn't true of course. However there is an effect,
particularly under Windows, on the size of an individual process: IIRC
Windows grabs half the process space for itself while Linux only grabs
the top 25%. I don't have a reference for that or I'd include it.
However, this is probably neither here nor there for most people: not
many of us do the sort of heavy duty rendering or video editing that
needs several GB per process and they will all have considerably more
RAM installed, so a 64 bit OS will be mandatory.
In view of this its worth pointing out that, unless you have more than
4GB of RAM installed, there should be no need to run a 64 bit OS.
As a matter of FACT - Your above statement is incorrect. Using 64bit
has more implications than just being able to use 4+gig of ram. Sure,
64bit tends to use more memory, but using 64bit offers (significantly)
better performance being as you can directly use 64bit data structures
/ 64bit registers / address spaces.
That's not true. A more correct statement is that a 64 bit version of
the same program MAY run faster than a 32 bit version on a CPU with the
same speed and core count. Simply using longer registers has almost no
effect because only a small proportion of instructions in any program
will involve 64 bit operands apart from address referencing in the 64
bit version (of course) and so any speed increase will be entirely due
to whether the compiler optimiser takes advantage of the extra registers
in the 64 bit CPU. Some compilers may do this. Others won't. Any speed
gains here must be offset against the cost of reading the bigger 64 bit
binary into memory and the impact of the extra code size on L1 and L2
caching. Its also possible that JIT systems like the Java JVM will look
at the number of available registers at runtime and optimise
accordingly, in which case a 32 bit JVM would run at the same speed as a
64 bit one.
I'd also like to point out that telling someone with some /lib32
issues, to install a 32bit OS is not a solution.
Only true if the problem is bugs in the library. Most of the 64 bit
problems appearing on this list are due to the absence of said 32 bit
libraries, typically those required by video drivers, not to the bugs in
them.

Martin
jordan

Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by jordan »

A lot of people seem to think that you can't address 4GB of RAM with a
32 bit OS, which isn't true of course. However there is an effect,
particularly under Windows, on the size of an individual process: IIRC
Windows grabs half the process space for itself while Linux only grabs
the top 25%. I don't have a reference for that or I'd include it.
However, this is probably neither here nor there for most people: not
many of us do the sort of heavy duty rendering or video editing that
needs several GB per process and they will all have considerably more
RAM installed, so a 64 bit OS will be mandatory.
Well, i can't speak for others, but i am aware that you can use PAE to
get above 4gig on x86. As far as processes using large amounts of
memory, for myself personally - there is a reason i have 8gig of RAM
and am thinking of upgrading to 16gig. ...and yes, 64bit OS is
manadatory - regardless of the OS, for me anyway.
That's not true. A more correct statement is that a 64 bit version of
the same program MAY run faster than a 32 bit version on a CPU with the
same speed and core count. Simply using longer registers has almost no
effect because only a small proportion of instructions in any program
will involve 64 bit operands apart from address referencing in the 64
bit version (of course) and so any speed increase will be entirely due
to whether the compiler optimiser takes advantage of the extra registers
in the 64 bit CPU. Some compilers may do this. Others won't. Any speed
gains here must be offset against the cost of reading the bigger 64 bit
binary into memory and the impact of the extra code size on L1 and L2
caching. Its also possible that JIT systems like the Java JVM will look
at the number of available registers at runtime and optimise
accordingly, in which case a 32 bit JVM would run at the same speed as a
64 bit one.
Well, i don't think i ever implied that 'simply using longer
registers' would automagically make code execute faster. It is a
prerequisite (to what i said, and also assumed) that the compiler
would be taking advantage of your CPU's features and optimizing
accordingly. I've run both 32bit and 64bit OSes on my phenom II 3.2ghz
quadcore, and i can tell you right now - 64bit is noticeably more
performant ...
I'd also like to point out that telling someone with some /lib32
issues, to install a 32bit OS is not a solution.
Only true if the problem is bugs in the library. Most of the 64 bit
problems appearing on this list are due to the absence of said 32 bit
libraries, typically those required by video drivers, not to the bugs in
them.
that maybe true, but re-installing your operating system should NEVER
be one of the first options given. One should exhaust all other
options and possibilities, first., IMHO.

cheerz and thanks for your insights.
nepenthes
Level 2
Level 2
Posts: 28
Joined: Tue Feb 07, 2012 7:31 am

Post by nepenthes »

That said, I precised my install is clean, I have just reinstalled evrything.

I'm running Ubuntu (stable, alpha, beta, rc) with xorg latest git revision for 3 years now, and I wouldn't ask for help on the main wine forum if I had not checked everything on my side (test with both my current Ubuntu version, and clean, stable, Ubuntu and Wine).
jordan

Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by jordan »

On Mon, May 7, 2012 at 11:32 AM, nepenthes <[email protected]> wrote:
That said, I precised my install is clean, I have just reinstalled evrything.

I'm running Ubuntu (stable, alpha, beta, rc) with xorg latest git revision for 3 years now, and I wouldn't ask for help on the
main wine forum if I had not checked everything on my side (test with both my current Ubuntu version, and clean, stable,
Ubuntu and Wine).
Correct me, if i am wrong. But didn't dimesio already explain that
this wasn't a 64bit (specific) issue, alone. He mentioned bug
reports. This would imply, you would have this issue in wine
32bit/multilib (on 64bit OS) anyway....

Dimesio quotes;
Everyone: please read the bug report. This particular problem is NOT a 64 bit issue.
As I said before, 64 bit 12.04 is broken for Wine for other reasons. Even if you find a workaround for the wgl bug, you will run > into those other problems.
https://bugs.launchpad.net/ubuntu/+sour ... bug/978678
https://bugs.launchpad.net/ubuntu/+sour ... bug/944321
Reading the bug reports, it's pretty clear this is an Ubuntu-specific
problem. I'm sure if i tried running this same stuff on my Archlinux64
+ multilib, i probably wouldn't have this issue.

Ubuntu needs to fix this for their user-base, as it appears trying to
workaround this issue is essentially a no go.

but someone can correct me, if i am reading into this incorrectly.

jordan
nepenthes
Level 2
Level 2
Posts: 28
Joined: Tue Feb 07, 2012 7:31 am

Post by nepenthes »

Yes, I understant there is no workaround and this will need to be bixed on the Ubuntu (or Wine) side.

My answer was in fact motivated by Martin's posts, I don't need a 32 vs 64 bit troll, I usually know what I'm doing on my computer, and I don't need someone to tell me which OS architecture I am supposed to run (since I have already gone through the benchmarks, optimization talks, compatibility issues solving, and I knew what I was doing when I chose to use a 64 bit OS , and after all this is not even an architecture related bug.
jjmckenzie
Moderator
Moderator
Posts: 1153
Joined: Wed Apr 27, 2011 11:01 pm

Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by jjmckenzie »

On Mon, May 7, 2012 at 9:08 AM, nepenthes <[email protected]> wrote:
Yes, I understant there is no workaround and this will need to be bixed on the Ubuntu (or Wine) side.

My answer was in fact motivated by Martin's posts, I don't need a 32 vs 64 bit troll, I usually know what I'm doing on my computer, and I don't
need someone to tell me which OS architecture I am supposed to run (since I have already gone through the benchmarks, optimization talks,
compatibility issues solving, and I knew what I was doing when I chose to use a 64 bit OS , and after all this is not even an architecture related
bug.
One of the things that I have picked up reading all of the messages
here and looking at the Ubuntu bug tracker is that the 64 bit version
of 12.04 has MANY more problems than the 32 bit version. Many were
exposed by the use of Wine. Since Wine in either the 32 bit or 64 bit
version does not exhibit them with other Linux distributions and even
MacOSX, this seems to be isolated to something the Ubuntu team did
when developing/building 12.04. There are two courses of action that
can be taken at this time:
1. If you desire to run 64 bit, stay with the current 11.10 release
of Unbuntu and file/update bug reports for 12.04.
2. Switch to 32 bit, for now, if you desire to run 12.04. There
seems to be fewer issues with this release as related to Wine.

The bottom line: Wine cannot fix problems introduced by a particular
release of Linux unless the distribution releasers state what changes
they made and how they can be 'corrected' by the Wine developers.

James
Martin Gregorie

Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by Martin Gregorie »

On Mon, 2012-05-07 at 11:08 -0500, nepenthes wrote:
My answer was in fact motivated by Martin's posts, I don't need a 32
vs 64 bit troll, I usually know what I'm doing on my computer, and I
don't need someone to tell me which OS architecture I am supposed to
run (since I have already gone through the benchmarks, optimization
talks, compatibility issues solving, and I knew what I was doing when
I chose to use a 64 bit OS , and after all this is not even an
architecture related bug.
If you'd read my post a little more carefully, you'd have seen that I
wasn't trying to give YOU advice. What I was trying to say is that,
there are many newbies on here who want to use Wine but have little or
no experience of Linux and who very regularly trip up when their shiny
new 64 bit installation's video drivers start demanding 32 bit libraries
which they either didn't install or have vanished during an upgrade.
Switching to a 32 bit PAE kernel based Linux will make their problem
vanish.

This single issue forms a noticeable segment of the traffic on the Wine
Users list. If these people have 4GB or so of RAM and have installed 64
bit Linux because that sounds more shiny than 32 bit rather than for a
definite technical reason, they'd find life somewhat easier if they ran
a 32-bit Linux. If their main interest is playing games, then any
performance difference between 32 and 64 bit software on their machine
will most likely be invisible compared with the hit they're taking from
their video drivers and DX9->Open GL translation layers.

Martin
Mateusz Stachowski
Level 3
Level 3
Posts: 71
Joined: Mon Apr 18, 2011 3:49 am

Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by Mateusz Stachowski »

Until the Precise I was using only 32bit Ubuntu. With these release I've decided to try 64bit and made a clean install (besides the Home folder which is the same for 3+ years).

Aside from not been able to build the 32bit version of Wine without chroot environment I've found the 64bit flavor of Ubuntu to be much slower. I don't know what's causing it but it's really much slower than the 11.10 32bit that I was using before.

There are also problems with programs nuvolaplayer is even more crashy and very slugish (that didn't exist on 32bit). Flash Player is just unusable but I could use it on 32bit with much less crashes.


That's my hardware configuration:

Kernel: Linux 3.2.0-24-generic x86_64

Distro: Ubuntu 12.04 LTS

CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
2 cores/threads
2300.00 MHz

RAM: GeIL 2 GB DDR II 800 Dual Ultra CL4

GPU: GeForce 9600 GT/PCIe/SSE2 (nvidia-current 295.40)

I didn't check how the 32bit version of Precise would perform on this machine.
jjmckenzie
Moderator
Moderator
Posts: 1153
Joined: Wed Apr 27, 2011 11:01 pm

Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by jjmckenzie »

On Mon, May 7, 2012 at 12:30 PM, Mateusz Stachowski
<[email protected]> wrote:
Until the Precise I was using only 32bit Ubuntu. With these release I've decided to try 64bit and made a clean install (besides the Home
folder which is the same for 3+ years).

Aside from not been able to build the 32bit version of Wine without chroot environment I've found the 64bit flavor of Ubuntu to be much
slower. I don't know what's causing it but it's really much slower than the 11.10 32bit that I was using before.

There are also problems with programs nuvolaplayer is even more crashy and very slugish (that didn't exist on 32bit). Flash Player is just
unusable but I could use it on 32bit with much less crashes.


That's my hardware configuration:

Kernel:  Linux 3.2.0-24-generic x86_64

Distro:   Ubuntu 12.04 LTS

CPU:     AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
           2 cores/threads
           2300.00 MHz

RAM:    GeIL 2 GB DDR II 800 Dual Ultra CL4
Why would you want to install a 64 bit OS on this system? You might
not gain anything, and (based on your experience) actually have a
slower system.

I would install a 32 bit version of 12.04 on this system until you can
put 4 GB or more of RAM.

James
Martin Gregorie

Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by Martin Gregorie »

On Mon, 2012-05-07 at 14:36 -0700, James McKenzie wrote:
On Mon, May 7, 2012 at 12:30 PM, Mateusz Stachowski
<[email protected]> wrote:
Until the Precise I was using only 32bit Ubuntu. With these release I've decided to try 64bit and made a clean install (besides the Home
folder which is the same for 3+ years).

Aside from not been able to build the 32bit version of Wine without chroot environment I've found the 64bit flavor of Ubuntu to be much
slower. I don't know what's causing it but it's really much slower than the 11.10 32bit that I was using before.

There are also problems with programs nuvolaplayer is even more crashy and very slugish (that didn't exist on 32bit). Flash Player is just
unusable but I could use it on 32bit with much less crashes.


That's my hardware configuration:

Kernel: Linux 3.2.0-24-generic x86_64

Distro: Ubuntu 12.04 LTS

CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
2 cores/threads
2300.00 MHz

RAM: GeIL 2 GB DDR II 800 Dual Ultra CL4
Why would you want to install a 64 bit OS on this system? You might
not gain anything, and (based on your experience) actually have a
slower system.

I would install a 32 bit version of 12.04 on this system until you can
put 4 GB or more of RAM.
The OP may find it useful to know that a 32 bit PAE kernel can address
up to 64 GB of RAM. This is something I only found out in the last day
or two. IOW if he's running a 32 bit PAE kernel and wants to add another
4GB of RAM, then he can just drop the extra RAM into its slots and
reboot. Any decision to move to a 64 bit system can then wait until a
natural upgrade point such as the release of the the next version of his
distro. I'm not grinding and 32 vs 64 bit axes, just passing on some
useful infomation.

I should add that I don't know if Ubuntu has a 32 bit PAE kernel. I use
Fedora, which provides a choice of two kernels: the 32-bit PAE and the
64 bit one.


Martin
make_lib
Newbie
Newbie
Posts: 2
Joined: Tue May 08, 2012 8:50 am

This occurs with other setups.

Post by make_lib »

I'd like to add my woes to this list.

I'm running 64 bit Debian. I compiled 1.5.3 a few days ago to try steam.

I get the same errors which OP talks about i.e. wine spams the error:

Code: Select all

err:wgl:is_extension_supported No OpenGL extensions found, check if your OpenGL setup is correct!
I haven't tried any d3d games due to lack of time, but when I try Borderlands for instance, the splash logo is displayed, then a fraction of a second of sound, then blackness. I can kill Borderlands.exe by logging in via ssh. After killing, I discover the same OpenGL message spammed continuously until I killed the game.

I noticed the common solution to this problem was that the /usr/lib32/libGL.so must've been missing.

However I compiled my own fglrx drivers and found the link /usr/lib32/libGL.so.1.2 to /usr/lib32/fglrx/fglrx-libGL.so.1.2 and issuing the command file on this gives:

Code: Select all

matthew@mitboom:/usr/lib32/fglrx$ file ./fglrx-libGL.so.1.2 
./fglrx-libGL.so.1.2: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
So I definitely have a 32-bit version of libGL.

Which means that wine must really be broken here.

Maybe I didn't read the bug reports correctly, but it seems like this isn't something that can be easily solved.
fhirnaomh
Newbie
Newbie
Posts: 2
Joined: Sun Jun 03, 2012 7:51 pm

Post by fhirnaomh »

I got this error when I also used Fedora 16. What I did to fix that problem is the install the kmod-catalyst i686 package via yum using rpm fusion then it worked. not sure about ubuntu.
fhirnaomh
Newbie
Newbie
Posts: 2
Joined: Sun Jun 03, 2012 7:51 pm

Post by fhirnaomh »

i guess i should mention i'm on amd hardware, but i suspect it would work with the kmod-nvidia i686 package to?
winterhawk787
Newbie
Newbie
Posts: 2
Joined: Wed Jul 04, 2012 5:27 pm

Post by winterhawk787 »

I just recently got this working on my machine using

Code: Select all

optirun wine Steam.exe
in the proper directory because I have an Optimus setup, and I'm using Bumblebee drivers/packages. I don't know if this helps your situation at all, and I don't know if you're running Optimus, but I thought I might share that that could fix the problem. Now it works okay for me.

If you don't have an Optimus setup, then - and I know this is a stretch - are there any third-party drivers you could look into that might help? This does seem to be an Ubuntu-specific issue (sadly for all of us), but I don't know. It might help.
zeehio
Newbie
Newbie
Posts: 1
Joined: Sat Nov 03, 2012 6:37 pm

Re: Ubuntu 12.04 64bit, Wine 1.5.3, OpenGL issue

Post by zeehio »

nepenthes wrote:Hi,
I need some help with Wine 1.5.3 on Ubuntu 12.04 64bit.
My Ubuntu install is clean (just reinstalled), ia32 libs are present, my graphics drivers are installed and updated, and my wine profile is clean too.
(I use bumblebee to manage my nvidia optimus configuration, but it is not relevant here as I encounter the same error on both Intel and nvidia graphics cards, and I had this error before installing bumblebee.)

When I try to start Steam or any OpenGL game wine spams the console with this error log :

Code: Select all

err:wgl:is_extension_supported No OpenGL extensions found, check if your OpenGL setup is correct!
Direct3D games are OK.

I really don't understand what is happening because 32bit native games run fine on my computer.
How can native games find the 32bit openGL driver, and not Wine ?
I had this problem and I think I fixed it with LD_LIBRARY_PATH. I had a very similar error, so forgive me if this is not the solution to your problem (however I believe it is worth trying).

The solution is hosted on a github gist: https://gist.github.com/4009270

Basically I am using Ubuntu 12.04 64 bit with a intel integrated card and a nVidia optimus configuration. I have enabled bumblebee. Wine was not able to detect opengl libraries neither with the intel or the nvidia card.
Now it works fine in both cases:

In order to run the "Frozen Throne.exe" program --which takes the "-opengl" argument-- at the intel card I used:

Code: Select all

LD_LIBRARY_PATH="/usr/lib/i386-linux-gnu/mesa/" wine "Frozen Throne.exe" -opengl
In order to run it on the nvidia card, it was a bit more complicated, so I wrote a short script, which is hosted on the link above.

Update: Just in case github went down :shock: here it is :

Code: Select all

#!/bin/bash
# This is a short script to load applications using bumblebee and wine
# on systems such as Ubuntu precise 12.04 64 bit using the discrete card.

# Usage example (the -opengl would be a parameter of the program "Frozen Throne.exe"):
# optiwine.sh "Frozen Throne.exe" -opengl

# Extra information:
# If you want to load programs with the integrated intel card instead, you may run them this way:
# LD_LIBRARY_PATH="/usr/lib/i386-linux-gnu/mesa/" wine "Frozen Throne.exe" -opengl


function msg {
  # Description:
  # This function echoes-with-colors the arguments passed in
  # Usage:
  # msg 'whatever you want to print :)'
  echo -e '\033[33m\033[44m'$@'\033[0m'
}

if [ "$1" == "RECALLED_WITH_OPTIRUN" ]; then
  #we are being run with optirun :)
  msg "$0 starting"
  shift

LD_LIBRARY_PATH="/usr/lib32/nvidia-current/" wine "$@"
  #wait while all wine programs are running, until they terminate
  wineserver -w
  msg "wineserver has terminated"

  msg "$0 terminating"
  exit 0
else
  #This scripts needs to be called through optirun.
  #In order to garantee it, we re-execute using optirun
  exec optirun $0 RECALLED_WITH_OPTIRUN "$@"
fi
Locked