Форум

how to use optirun for two graphic card systems?

Автор Replies
MDCore Tuesday 15 November 2011 at 20:15
MDCoreAnonymous

Hi. I have a dual graphics card setup on my laptop, an intel and an nvidia. To use the nvidia for specific programs I have to run the command like so:
optirun glxgearsthis will run glxgears through the nvidia card.

So I can't seem to get POL to do this. If I edit the shortcut scripts and change:
POL_Wine "Steam.exe" to
optirun POL_Wine "steam.exe"nothing happens and the error log says command POL_Wine not found.

Is there a setting I can change somewhere or is there a way to alter the script to make this work?
Quentin PÂRIS Tuesday 15 November 2011 at 20:33
Quentin PÂRIS
Admin

You could edit POL_Wine function in wine.lib ?
MDCore Tuesday 15 November 2011 at 20:39
MDCoreAnonymous

Thanks for the quick response!

Is wine.lib a file? I checked Tools/Manage Wine versions but that doesn't let me edit any settings.
MDCore Tuesday 15 November 2011 at 20:49
MDCoreAnonymous

You're a genius. Found it in /usr/share/playonlinux/lib/. That was exactly what I was looking for.

For anyone who finds this, I editing /usr/share/playonlinx/lib/wine.lib. Searched for "POL_Wine ()" and changed
wine "$@" ...
to
optirun wine "$@" ...

It's a nasty hack but it runs optirun.

Edited by MDCore

razvanc87 Tuesday 22 November 2011 at 20:24
razvanc87Anonymous

Hello everyone.

I tried editing the /usr/share/playonlinux/lib/wine.lib and it didn't work for me. I don't see any "optirun application_name" anywhere in the terminal. Is there something that I may be missing?
Quentin PÂRIS Tuesday 22 November 2011 at 20:25
Quentin PÂRIS
Admin

Please read all the messages.
razvanc87 Tuesday 22 November 2011 at 20:38
razvanc87Anonymous

Well. I did read all the messages and I did change the function from wine.lib but it seems that nothing happenes... is as if PlayOnLinux won't use the POL_Wine () function. What kind of output do you think I should post here in order to make myself clear?..
Quentin PÂRIS Tuesday 22 November 2011 at 20:46
Quentin PÂRIS
Admin

POL uses POL_Wine for every shortcut
razvanc87 Tuesday 22 November 2011 at 20:53
razvanc87Anonymous

OK, so I started POL in the terminal:

[install_plugins] Message: Checking plugin: Offline PlayOnLinux...
[install_plugins] Message: Checking plugin: Capture...
[install_plugins] Message: Checking plugin: Transgaming Cedega...
[install_plugins] Message: Checking plugin: Wine Import...
[install_plugins] Message: Checking plugin: Wine Look...
[install_plugins] Message: Checking plugin: Screen Capture...
[install_plugins] Message: Checking plugin: PlayOnLinux Vault...
[maj_check] Message: List is up to date
[main] Message: Debugger is starting

and started Steam in debug mode:

Writting log to /home/razvan/.PlayOnLinux//tmp/errors_Steam.log.e

[POL_Wine_SetVersionEnv] Message: Setting wine version path: 1.3.33, x86
[POL_Wine_SetVersionEnv] Message: "/home/razvan/.PlayOnLinux//wine/linux-x86/1.3.33" exists
[POL_Wine] Message: Running wine-1.3.33 Steam.exe
wine: cannot find L"C:\\\\windows\\\\system32\\\\winemenubuilder.exe"
err:wineboot:ProcessRunKeys Error running cmd L"C:\\\\windows\\\\system32\\\\winemenubuilder.exe -a -r" (2)
[...]

so... if I do "lsmod | grep -i nvidia" I get nothing... and I don't see any optirun anywhere, and I have this in "wine.lib":

[...]
if [ "$LOGFILE" = "/dev/null" ] || [ "$KeepOutput" = "True" ]
then
optirun wine "$@"
else
optirun wine "$@" >> "$LOGFILE" 2>> "$LOGFILE"
fi
errors="$?"
[...]

so what am I doing wrong here?... if you have any idea...
Quentin PÂRIS Tuesday 22 November 2011 at 20:56
Quentin PÂRIS
Admin

You missed the important part of the log
razvanc87 Tuesday 22 November 2011 at 21:01
razvanc87Anonymous

Thanks for your time... but this isn't helping very much if I'm not pointed in the right direction... I am new to POL so I have no idea about what 90% of this stuff is... what is the important part of the log? so that I can rectify my post...
Quentin PÂRIS Tuesday 22 November 2011 at 21:22
Quentin PÂRIS
Admin

I think your problem has nothing to do with optirun. Post a new topic and explain exactly what you are trying to do, run and paste the full output
lamaipomul Wednesday 15 August 2012 at 8:46
lamaipomulAnonymous

You're a genius. Found it in /usr/share/playonlinux/lib/. That was exactly what I was looking for.

For anyone who finds this, I editing /usr/share/playonlinx/lib/wine.lib. Searched for "POL_Wine ()" and changed
wine "$@" ...
to
optirun wine "$@" ...

It's a nasty hack but it runs optirun.

Quote from MDCore

Cxcelent post, works great. Without this info i wouldn't succeed.
Bumblebee-Project put in practice :)

10x
Quentin PÂRIS Wednesday 15 August 2012 at 10:46
Quentin PÂRIS
Admin

Be careful, it can cause problems
lamaipomul Wednesday 5 September 2012 at 12:49
lamaipomulAnonymous

it caused problems, use at your own risk
i reinstalled everything and because i still have problems with textures i moved to http://www.playonlinux.com/en/topic-8298-optirun_in_POL.html
Вы находитесь здесь: Index > PlayOnLinux > how to use optirun for two graphic card systems?