Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Arch] optirun does not work, no apparent message error #786

Open
SALVOuankeBALDO opened this issue Jul 23, 2016 · 12 comments
Open

[Arch] optirun does not work, no apparent message error #786

SALVOuankeBALDO opened this issue Jul 23, 2016 · 12 comments

Comments

@SALVOuankeBALDO
Copy link

Hello everybody,

I've just installed bumblebee on Arch Linux to make use of my nvidia graphics card, that is:

lspci | grep 3D
01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev ff)

I've installed bumblebee by following the guide on the Arch Wiki, https://wiki.archlinux.org/index.php/Bumblebee. I downloaded the nvidia driver and downloaded the necessary tools for 32-bit applications (as my machine is 64-bit).

After installation, installation of bbswitch and acpid and reboot I tried to test glxgears using optirun. Very verbose output:

optirun -vv glxgears --info
[ 2241.303014] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 2241.303506] [INFO]Configured driver: nvidia
[ 2241.303755] [DEBUG]optirun version 3.2.1 starting...
[ 2241.303776] [DEBUG]Active configuration:
[ 2241.303783] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 2241.303790] [DEBUG] X display: :8
[ 2241.303795] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia:/usr/lib32/nvidia
[ 2241.303802] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 2241.303808] [DEBUG] Accel/display bridge: auto
[ 2241.303814] [DEBUG] VGL Compression: proxy
[ 2241.303824] [DEBUG] VGLrun extra options: 
[ 2241.303840] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib32/primus
[ 2241.303907] [DEBUG]Using auto-detected bridge virtualgl
[ 2242.654193] [INFO]Response: Yes. X is active.

[ 2242.654226] [INFO]Running application using virtualgl.
[ 2242.654423] [DEBUG]Process vglrun started, PID 1842.
[ 2242.718384] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 2242.718419] [DEBUG]Socket closed.
[ 2242.718436] [DEBUG]Killing all remaining processes.

and optirun exits.
dmesg output:

[ 2241.489411] bbswitch: enabling discrete graphics
[ 2242.091758] nvidia-nvlink: Nvlink Core is being initialized, major device number 243
[ 2242.091779] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  367.35  Mon Jul 11 23:14:21 PDT 2016
[ 2242.110868] vgaarb: this pci device is not a vga device
[ 2242.112750] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[ 2242.112795] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[ 2242.112842] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[ 2242.112863] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[ 2242.112883] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[ 2242.112928] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[ 2242.112948] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[ 2242.127054] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[ 2242.316760] vgaarb: this pci device is not a vga device
[ 2242.405092] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  367.35  Mon Jul 11 22:43:59 PDT 2016
[ 2242.882110] glxgears[1842]: segfault at 10 ip 00007f6c8af3f7ad sp 00007ffda33184b0 error 4 in libGLX_nvidia.so.367.35[7f6c8ae82000+c8000]
[ 2242.965999] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[ 2242.970250] nvidia-modeset: Unloading
[ 2242.982429] nvidia-nvlink: Unregistered the Nvlink Core, major device number 243
[ 2242.996664] bbswitch: disabling discrete graphics
[ 2242.996676] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[ 2243.008738] pci 0000:01:00.0: Refused to change power state, currently in D0

Content of /var/log/Xorg.8.log: http://pastebin.com/uWMQN7UP (NVIDIA start appearing in the middle)

I've also tried using primusrun, and a strange thing happens: primusrun glxgears works (also confirmed by cat-ting bbswitch when glxgears is running, and bbswitch says ON while running, and goes to OFF when I end glxgears). Strange thing is that, when I close glxgears, the following error appears in console:

primus: warning: dropping a frame to avoid deadlock                                                                                                                                             
primus: warning: timeout waiting for display worker                                                                                                                                             
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"                                                                                                                     
      after 34 requests (34 known processed) with 0 events remaining. 

glxgears does not terminate, and I have to take back control manually, through CTRL+C.

I've tried googling around, but having no obvious error message is hampering my research. Anybody can help?

@s0600204
Copy link

I can report the same problem. Also running Arch 64-bit, but I don't have the 32-bit libraries. Problem started about a week ago, after updating my system.

I notice that optirun glxspheres64 doesn't work, but optirun -b primus glxspheres64 does.

As the default bridge is auto which defaults to virtualgl, I'm assuming that something's recently changed/broken/regressed there.

Looking over pacmans logs, I notice that the packages mesa-libgl, nvidia, and nvidia-utils were recently updated (as were others, but these seemed most relevant)

Current version of virtualgl is 2.5-2, and has a build date of March 18th.

Current version of mesa-libgl is 12.0.1-2, and has a build date of July 24th. Was until earlier today running version 12.0.1-1 (build date: July 9th) and optirun didn't work by default then either. Before that, version 11.2.2-1 (build date: 10th May) and optirun did work.

@SALVOuankeBALDO, if I may make a suggestion, try using the -b primus argument of optirun (as I have above). If it works, you should be able to set optirun to default to this by opening /etc/bumblebee/bumblebee.conf with elevated privileges and changing the line Bridge=auto to Bridge=primus. Hopefully that works until a better solution comes along.

@SALVOuankeBALDO
Copy link
Author

As I've written, I'm aware of the fact that primus is working. It gives me a strange error when I close glxgears and freezes, forcing me to CTRL+C out of the error. I'm still debugging that.

Still, thanks for the suggestion.

@s0600204
Copy link

I would then suggest to check if any other programs require you ctrl-c to end the program when run through primusrun. From my own experimentation, I note that glxgears and glxheads do, but glxspheres64, teapot, 0ad/pyrogenesis and supertuxkart do not.

I don't know if you've tried it, but I notice that prefixing primusrun (or optirun) with vblank_mode=X, where X is either 0 or 1, means you don't have to ctrl-c out of glxgears. For some reason. Of course, this does mean that you lose v-sync, so it's not the best solution.

Returning back to optirun not working with virtualgl as the bridge, after some mucking around, it suddenly occurred to me that I should check the exit code. One short echo $? later, and it turns out that it fails each time with code 139 (0x0213). A little looking online reveals this means an "Out of Bounds", or segmentation fault.

Turning to gdb (ie. optirun gdb glxgears) and voila:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff54607ad in ?? () from /usr/lib/libGLX_nvidia.so.0

Looking at the reported bugs on arch's package-tracking site (which I probably should have checked sooner) turns up this: https://bugs.archlinux.org/task/50067

Anyhow, I've downgraded the nvidia (and nvidia-utils) package locally and optirun is working with virtualgl again.

Doesn't seem to have fixed your problem, though. Good luck, and please keep us appraised.

@SALVOuankeBALDO
Copy link
Author

SALVOuankeBALDO commented Jul 28, 2016

Thanks for the suggestion. I tried as you did an echo $?, obtaining 130 as output (just after running glxgears with virtualgl). A gdb after (I did not know the tool as I'm a newbie, but it's always nice to have antoher tool!) I had exactly the same error as you:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff54607ad in ?? () from /usr/lib/libGLX_nvidia.so.0

So I guess it's a problem of compatibility between bumblebee and the new nvidia driver. I'll try downgrading, as running with primus crashes a Steam game that I'm interested in, so I think the workaround is not too much effective.

@SALVOuankeBALDO
Copy link
Author

After bumbebee update, optirun is working. Many thanks to the developers.

@Avinash-Bhat
Copy link

@SALVOuankeBALDO in which version of bumblebee is this fixed?

@Lekensteyn
Copy link
Member

@Avinash-Bhat Try the git version, bracnh "develop". It should really be pushed out, but ...

@SALVOuankeBALDO
Copy link
Author

SALVOuankeBALDO commented Jul 31, 2016

@Avinash-Bhat bumblebee 3.2.1-12, I downloaded it from Arch's repositories through pacman. I'm in no "developer" or "test" repository, just the standard ones.

@Avinash-Bhat
Copy link

@SALVOuankeBALDO it didn't work for me OOTB, but with some help from the comment by @s0600204 on setting Bridge=primus it worked for me.

@SALVOuankeBALDO
Copy link
Author

Oh, shit.

Sorry, I tested optirun glxgears convinced that I had Bridge=virtualgl. Turns out I had modified it to primus, that was working. I switched back to virtualgl and returned in the same situation.

So I guess I have to reopen this. Sorry all, I don't know where I have my head in these days.

@MrBollie
Copy link

MrBollie commented Aug 15, 2016

While the primus workaround works with glxgears, I have more complex applications, that even crash with that. Same segfaults, though the processes get stuck and need some kill -9.

Still, that workaround doesn't look healthy at all:
optirun -b primus glxgears leads to this:

Process 5166 (glxgears) of user 1000 dumped core.

Stack trace of thread 5166:
#0 0x00007fa51c5dc7ad n/a (libGLX_nvidia.so.0)
#1 0x00007fa51c5a50b8 n/a (libGLX_nvidia.so.0)
#2 0x00007fa51c5982b9 glXGetConfig (libGLX_nvidia.so.0)
#3 0x00007fa51eae7666 n/a (libvglfaker.so)
#4 0x00007fa51eae8abd n/a (libvglfaker.so)
#5 0x00007fa51eabf59a glXChooseVisual (libvglfaker.so)
#6 0x00000000004036bf n/a (glxgears)
#7 0x0000000000401a07 n/a (glxgears)
#8 0x00007fa51de6a291 __libc_start_main (libc.so.6)
#9 0x0000000000402349 n/a (glxgears)

I also wonder if this issue is limited to ARCH only.

@MrBollie
Copy link

Please have a look at the latest comments on https://bugs.archlinux.org/task/50067
At least on my system, the latest nvidia beta driver seems to fix the issue. However, having bumblebeed started with bbswitch on lets X hang when it starts (with automatic graphic cards detection). Not sure, if that's a bumblebee issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants