GithubHelp home page GithubHelp logo

Comments (34)

 avatar commented on June 27, 2024 1

since most people here are having wine/gamelauncher related issues, I wanted to share the workaround that I found recently:

$> optirun bash -c "wine [your game] && wineserver -w"

this will keep optirun running as long as a wineserver is running, which is typically what you want when you run a game :)

I hope I don't violate any rule by posting this here, but I thought this is the best place to spread the word.

Cheers,
Andy

from bumblebee.

Samsagax avatar Samsagax commented on June 27, 2024

There is a known problem with some wine applications that fork and kill the parent process without keeping track of it. Maybe we can figure our way around this.

This is a known issue of VGL

from bumblebee.

Lekensteyn avatar Lekensteyn commented on June 27, 2024

That error is caused by some applications to fork and quit optirun. Workaround: start a shell with optirun and run the wine program from it:

$ optirun bash
$ wine yourprogram

When done, exit bash to notify the daemon that there are no more clients.

from bumblebee.

Samsagax avatar Samsagax commented on June 27, 2024

Maybe we can add an optirun option like --extra-shell that would run this sequence?

from bumblebee.

isness avatar isness commented on June 27, 2024

Thank you, Lekensteyn, it works now. A more user-friendly way of doing this would be great, too. :)

from bumblebee.

Lekensteyn avatar Lekensteyn commented on June 27, 2024

@Samsagax The extra shell option would not help because optirun cannot be sure when a program exits. Perhaps bumblebeed should wait a bit longer before quitting X.

from bumblebee.

Thulinma avatar Thulinma commented on June 27, 2024

Hmm... We should be able to track the children of these processes using cgroups, just like systemd does. That would require kernel support for those to be enabled though. Enable only if available, perhaps?

from bumblebee.

Lekensteyn avatar Lekensteyn commented on June 27, 2024

cgroups sounds good, but what if you really want to detach a process and it does not use X?

from bumblebee.

Thulinma avatar Thulinma commented on June 27, 2024

Then why are you running it through optirun? ;-)

from bumblebee.

Lekensteyn avatar Lekensteyn commented on June 27, 2024

Updated http://wiki.Bumblebee-Project.org/Troubleshooting

I don't know, perhaps to keep the device enabled? It is indeed impossible to know whether the user really wants to use the nvidia card or not for a program started indirectly from optirun.

from bumblebee.

Samsagax avatar Samsagax commented on June 27, 2024

Could you try this:

$ optirun bash wine <your-wine-program>

If that work then my suggestion could work

from bumblebee.

Thulinma avatar Thulinma commented on June 27, 2024

@Samsagax bash will return just as much as our forking method does.

from bumblebee.

melroy89 avatar melroy89 commented on June 27, 2024

Can ptrace help us futher maybe?
http://linux.die.net/man/2/ptrace

from bumblebee.

raysarvatt avatar raysarvatt commented on June 27, 2024

Does anybody found a solution ?
this bug doesn't afflict the previous version

from bumblebee.

Lekensteyn avatar Lekensteyn commented on June 27, 2024

@raysarvatt Do you have it with all programs? (even glxspheres?). Have you tried the workaround?

from bumblebee.

raysarvatt avatar raysarvatt commented on June 27, 2024

yes,the workaround works.. it's so busy,but it works
I have this bug with some wine applications .. ,the same that worked perfectly,before the latest upgrade ..

from bumblebee.

Lekensteyn avatar Lekensteyn commented on June 27, 2024

Perhaps you were running other optirun programs at the same time? That's what this workaround basically does.

from bumblebee.

raysarvatt avatar raysarvatt commented on June 27, 2024

no,only one application is running with optirun

from bumblebee.

Samsagax avatar Samsagax commented on June 27, 2024

This is related on how we manage power of the card. If bumblebeed notice no instance of optirun is running, then it will kill the second X server. As optirun can't track the forked child then it will exit and won't notice.

from bumblebee.

raysarvatt avatar raysarvatt commented on June 27, 2024

I've changed PMMethod=none to PMMethod=auto,but nothing has been changed except

glxgears 1862.182 FPS (before)

1356.261 FPS (after)

from bumblebee.

flowerdealer avatar flowerdealer commented on June 27, 2024

I have the same issue trying to run two propietary 3d/fx software packages, Nuke and Houdini. The work if I launch them from the shell like this:
optirun bash
optirun houdini (for example).
However there is no way to run them from the default menu entries in KDE or gnome.

from bumblebee.

Lekensteyn avatar Lekensteyn commented on June 27, 2024

As a workaround, you can create a wrapper after optirun:

  1. Save the below code as /path/to/wait-for-quit:
#!/bin/sh
"$@"
if [ -x /usr/bin/zenity ]; then
    zenity --info --text "Press OK to quit $*"
else
    kdialog --msgbox "Press OK to quit $*"
fi
  1. Make it executable: chmod +x /path/to/wait-for-quit
  2. Modify your desktop file to run: optirun /path/to/wait-for-quit your-program arguments-for-program

This is still not suboptimal because it'll present a dialog, but it avoid having to open a terminal. If you do not care about power saving at all, edit /etc/bumblebee/bumblebee.conf and set KeepUnusedXServer=true and PMMethod=none (twice)

from bumblebee.

raysarvatt avatar raysarvatt commented on June 27, 2024

the script works very well for me .. thanks, Lekensteyn :)

from bumblebee.

double-thinker avatar double-thinker commented on June 27, 2024

Add this fragment to the end of a sh file (INSPIRED IN IRONHIDE)

HERE RUN COMMAND (in my case: wine starcrafII.exe)

while :; do
    if lsof -n -w /usr/lib*/nvidia-current/libnvidia-glcore.so* >/dev/null; then
        sleep 1
    fi
done

To developers: can you add a option --follow-forks or similar??

from bumblebee.

derekchiang avatar derekchiang commented on June 27, 2024

Hello Lekensteyn, I used your script but here is a problem: the dialog pops out in front of my game (Fronzen Throne), and there is no way that I can change focus to my game. I can only click OK to close the dialog, but then my game is also closed. Would you please tell me how to solve this problem? Thanks a lot!

from bumblebee.

Lekensteyn avatar Lekensteyn commented on June 27, 2024

@derekchiang Then try manually opening the shell as described in #42 (comment)

from bumblebee.

derekchiang avatar derekchiang commented on June 27, 2024

@Lekensteyn Oh yes I tried. It works very well. Just a question: is there a difference between:

optirun bash
wine your-program

and

optirun bash
optirun wine your-program

?

from bumblebee.

Lekensteyn avatar Lekensteyn commented on June 27, 2024

The second form is redundant. I've never considered whether there are side-effects, but you're suggested to use the first form.

from bumblebee.

derekchiang avatar derekchiang commented on June 27, 2024

@Lekensteyn OK thank you so much!

from bumblebee.

ArchangeGabriel avatar ArchangeGabriel commented on June 27, 2024

primus is solving this issue.

from bumblebee.

jleclanche avatar jleclanche commented on June 27, 2024

@ArchangeGabriel Really? I'm having the same issue with primusrun

from bumblebee.

ArchangeGabriel avatar ArchangeGabriel commented on June 27, 2024

@jleclanche Could you open a new issue stating what does work and what does not while trying all of optirun -b virtualgl, optirun -b primus and primusrun (plus eventually running a shell using all of those and running you application within that shell)? Thanks.

from bumblebee.

sammcj avatar sammcj commented on June 27, 2024

Howdy, This is still an issue even with the latest (24/10/2016) bumblebee.

  • NVidia drivers x86_64-367.57
  • Fedora 25, all updates applied daily
  • Stable kernel 4.8.3-300.fc25
  • PCI Device: 01:00.0 3d controller: NVIDIA Corporation Device 134b (rev a2)
  • Xiaomi MI laptop

Error:

bash Bumblebee daemon reported: error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission Denied

primusrun gives the exact same error.

I have tried the following suggestions:

  • Ensuring my user is a member of the 'video' group
  • The little zenity script @Lekensteyn wrote
  • Updating /etc/bumblebee/xorg.conf.nvidia to add the 'Screen' section
  • Disabling power saving and setting KeepUnusedXServer to true
  • Tried running an application as the root user itself
  • Trying another driver version

Interesting part:

as some others have mentioned, dmesg shows ACPI Warnings about

\_SB.PCI0.RP01.PXSX._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)

vgaarb: this pci device is not a vga device

To me, it looks like ACPI is looking at the wrong PCI address, or the wrong identifier (if thats the correct term for the last digit i.e. .0 or .1 on a PCI address?

from bumblebee.

Lekensteyn avatar Lekensteyn commented on June 27, 2024

@sammcj the last digit of a PCI address is called a function. If you have an Optimus laptop with multiple GPUs, please check with your distro documentation on properly installing/configuring Bumblebee.

from bumblebee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.