You are not logged in.

#1 2018-01-25 16:59:05

mateusfccp
Member
Registered: 2015-04-21
Posts: 12

[SOLVED] Primusrun/Optirun seems to be not running

Hello, everyone.

I was using Manjaro GNOME until last month, with Bumblebee, running games with

primusrun %command%

. Everything worked fine, and I was able to play games like Half-Life 2 and Insurgency with no problems. My machine has a GeForce 940M, which is not a powerful GPU, but I was playing these games smoothly.

Last week I installed a fresh Arch system, also with GNOME. I've installed nvidia-dkms package, as I'm using linux-zen kernel. mkinitcpio doesn't return any error when build modules. I've also followed this link and installed Bumblebee and enable bumblebeed.service.

If I run

primusrun glxgears

or

optimusrun glxgears

I get no error. However, if I run any game with primusrun or optirun, it works, but it seems like it's running on Intel Graphics, as it's laggy and with graphic glitches.

One thing I noticed is that when I runned gnome-control-center with primusrun, in my last system, in "About" section it used to show NVIDIA 940M, at the same time that running it without primusrun showed Intel® HD Graphics 520 (Skylake GT2). However, in this new system, whenever I run with primusrun or not, it always shows Intel® HD Graphics 520 (Skylake GT2).

What can I've configured wrong or what can be happening?

Thanks, in advance.

Last edited by mateusfccp (2018-03-12 14:12:05)

Offline

#2 2018-01-25 17:03:58

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Primusrun/Optirun seems to be not running

mateusfccp wrote:

and enable `bumblebee.service`

Unless that's a typo it's incorrect. That's not what the service is called.

Last edited by Slithery (2018-01-25 17:05:15)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2018-01-25 17:05:48

mateusfccp
Member
Registered: 2015-04-21
Posts: 12

Re: [SOLVED] Primusrun/Optirun seems to be not running

slithery wrote:
mateusfccp wrote:

and enable `bumblebee.service`

Unless that's a typo it's incorrect.

Of cours it's a typo. I couldn't have enabled a service that doesn't exists.
Thanks, anyway. Fixing it.

Offline

#4 2018-01-25 17:09:10

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,428

Re: [SOLVED] Primusrun/Optirun seems to be not running

Are you on a wayland session? What's the output of

primusrun glxinfo | grep OpenGL

Offline

#5 2018-01-25 17:15:31

mateusfccp
Member
Registered: 2015-04-21
Posts: 12

Re: [SOLVED] Primusrun/Optirun seems to be not running

@V1del,

I'm not on a Wayland session. I'm using GNOME with X11.

The output of

primusrun glxinfo | grep OpenGL

is

[mateusfccp@ArchPinto ~]$ primusrun glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 940M/PCIe/SSE2
OpenGL core profile version string: 4.5.0 NVIDIA 387.34
OpenGL core profile shading language version string: 4.50 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 387.34
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:

Offline

#6 2018-01-25 21:47:21

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: [SOLVED] Primusrun/Optirun seems to be not running

I believe I'm experiencing the same behaviour, but in my case the newer system also has a different GC (MX150). And primusrun segfaults on it for some reason. In my case I'm on awesomewm.

Optirun glxinfo shows that the MX150 is being used. Performance in game is really slow (for optirun), and I can't get primusrun to work for some reason.

This used to work (on the same machine I believe) faster back in November but over the year-end I haven't loaded up any games, now everything is jerky. lsmod and cat /proc/acpi/bbswitch both show that bumblebee is working and nvidia is activated though.

Note to OP, you can get nvidia-settings to run using the following:-

$ optirun -b none nvidia-settings -c :8

This is from the bumblebee wiki page.

EDIT: Some googling around found this recent news:-
https://devtalk.nvidia.com/default/topi … a-drivers/
https://www.phoronix.com/scan.php?page= … ry-Problem

Going to check out downgrading the nvidia drivers to see if that helps...

UPDATE: Couldn't get older nvidia versions to build (can't be bothered to track down the make errors), but I can say that nvidia-beta doesn't help performance at all.

Last edited by ngoonee (2018-01-26 03:02:18)


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#7 2018-01-26 11:22:46

mateusfccp
Member
Registered: 2015-04-21
Posts: 12

Re: [SOLVED] Primusrun/Optirun seems to be not running

ngoonee wrote:

I believe I'm experiencing the same behaviour, but in my case the newer system also has a different GC (MX150). And primusrun segfaults on it for some reason. In my case I'm on awesomewm.

Optirun glxinfo shows that the MX150 is being used. Performance in game is really slow (for optirun), and I can't get primusrun to work for some reason.

This used to work (on the same machine I believe) faster back in November but over the year-end I haven't loaded up any games, now everything is jerky. lsmod and cat /proc/acpi/bbswitch both show that bumblebee is working and nvidia is activated though.

Note to OP, you can get nvidia-settings to run using the following:-

$ optirun -b none nvidia-settings -c :8

This is from the bumblebee wiki page.

EDIT: Some googling around found this recent news:-
https://devtalk.nvidia.com/default/topi … a-drivers/
https://www.phoronix.com/scan.php?page= … ry-Problem

Going to check out downgrading the nvidia drivers to see if that helps...

UPDATE: Couldn't get older nvidia versions to build (can't be bothered to track down the make errors), but I can say that nvidia-beta doesn't help performance at all.

Thanks for your answer.

About the nvidia-settings, thanks, I didn't know it. However, the question about gnome-control-center still bugs me.
About the drivers, I will give it a look. I don't know if it's the case, because, AFAIK, Manjaro drivers was roughly the same as Arch ones. Maybe they patch something, IDK. Anyway, I'm going to follow this discussion to see if there's some progress... My case is a little different than yours, as there's no segfault and both primusrun and optirun return no error and seems to be ok.

Offline

#8 2018-01-30 11:59:36

Stunts
Member
From: Portugal
Registered: 2009-03-28
Posts: 339
Website

Re: [SOLVED] Primusrun/Optirun seems to be not running

Ok, so after 4 years on this laptop with 0 problems with bumblebee, today I found that "primusrun glxgears" (or any other command as for that matter) don't work.
And by don't work I mean it doesn't work at all. It just freezes. No errors, no console output. But also no glxgears image.
After leaving it like that for quite a while, I get this error:

primus: fatal: Bumblebee daemon reported: error: [XORG] (EE) PreInit returned 2 for "<default pointer>"

Issuing `sudo systemctl status bumblebeed.service` returns the following:

● bumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2018-01-30 11:46:33 WET; 9min ago
 Main PID: 481 (bumblebeed)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/bumblebeed.service
           └─481 /usr/bin/bumblebeed

jan 30 11:52:00 VoidCaster bumblebeed[481]: [  330.816997] [ERROR]X unresponsive after 10 seconds - aborting
jan 30 11:54:19 VoidCaster bumblebeed[481]: [  468.956735] [WARN][XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
jan 30 11:54:19 VoidCaster bumblebeed[481]: [  468.956778] [WARN][XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
jan 30 11:54:19 VoidCaster bumblebeed[481]: [  468.956806] [WARN][XORG] (WW) Warning, couldn't open module mouse
jan 30 11:54:19 VoidCaster bumblebeed[481]: [  468.956839] [WARN][XORG] (WW) NVIDIA(0): Unable to get display device for DPI computation.
jan 30 11:54:19 VoidCaster bumblebeed[481]: [  468.956852] [WARN][XORG] (WW) NVIDIA(0): Option "NoLogo" is not used
jan 30 11:54:19 VoidCaster bumblebeed[481]: [  468.956865] [WARN][XORG] (WW) Warning, couldn't open module mouse
jan 30 11:54:19 VoidCaster bumblebeed[481]: [  468.956883] [ERROR][XORG] (EE) PreInit returned 2 for "<default pointer>"
jan 30 11:54:19 VoidCaster bumblebeed[481]: [  468.956899] [ERROR][XORG] (EE) PreInit returned 2 for "<default keyboard>"
jan 30 11:54:19 VoidCaster bumblebeed[481]: [  469.057033] [ERROR]X unresponsive after 10 seconds - aborting

Web searches for this error return nothing relevant.
Also, primusrun was working just fine last night.
Maybe this is a different issue, but this thread was the closest I found, given the similar timeframe.

Here is the output with "--debug" enabled:

optirun --debug -b primus glxgears -info
[  832.008888] [DEBUG]optirun version 3.2.1 starting...
[  832.008906] [DEBUG]Active configuration:
[  832.008909] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[  832.008911] [DEBUG] X display: :8
[  832.008914] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32
[  832.008916] [DEBUG] Socket path: /var/run/bumblebee.socket
[  832.008919] [DEBUG] Accel/display bridge: primus
[  832.008923] [DEBUG] VGL Compression: proxy
[  832.008929] [DEBUG] VGLrun extra options: 
[  832.008934] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib32/primus
[  962.283799] [INFO]Response: No - error: [XORG] (EE) PreInit returned 2 for "<default pointer>"

[  962.283830] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) PreInit returned 2 for "<default pointer>"

[  962.283839] [DEBUG]Socket closed.
[  962.283873] [ERROR]Aborting because fallback start is disabled.
[  962.283884] [DEBUG]Killing all remaining processes.

Last edited by Stunts (2018-01-30 12:03:06)

Offline

#9 2018-01-30 14:06:01

Stunts
Member
From: Portugal
Registered: 2009-03-28
Posts: 339
Website

Re: [SOLVED] Primusrun/Optirun seems to be not running

I just wanted to state that after a lot of digging I have found the culprit and the solution.
It seems for some reason, it is necessary to have localhost defined in /etc/hosts due to a possible timeout. For some reason this was not happening before today on my system.
Yes, I know, this file should have been populated from the start. But it seems I might have accidentally deleted it's contents due to a relatively recent "pacnew" (so yeah, I'm the one to blame).
Anyway, adding

127.0.0.1 localhost

to /etc/hosts solves the issue.
Here are the most relevant links for the research I made (for reference).
https://github.com/Bumblebee-Project/Bumblebee/pull/939
https://github.com/Bumblebee-Project/Bu … issues/782

Hope this helps solving the other issues in this thread.

Offline

#10 2018-01-30 22:41:37

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: [SOLVED] Primusrun/Optirun seems to be not running

Stunts wrote:

I just wanted to state that after a lot of digging I have found the culprit and the solution.
It seems for some reason, it is necessary to have localhost defined in /etc/hosts due to a possible timeout. For some reason this was not happening before today on my system.
Yes, I know, this file should have been populated from the start. But it seems I might have accidentally deleted it's contents due to a relatively recent "pacnew" (so yeah, I'm the one to blame).
Anyway, adding

127.0.0.1 localhost

to /etc/hosts solves the issue.
Here are the most relevant links for the research I made (for reference).
https://github.com/Bumblebee-Project/Bumblebee/pull/939
https://github.com/Bumblebee-Project/Bu … issues/782

Hope this helps solving the other issues in this thread.

This is why posting your issue in an unrelated thread can be confusing. Your error messages (and solution) are tangential to the OP's....


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#11 2018-02-05 12:31:20

mateusfccp
Member
Registered: 2015-04-21
Posts: 12

Re: [SOLVED] Primusrun/Optirun seems to be not running

Well, I tried installing nvidia-dkms for linux instead of linux-zen, and I also tried using nvidia (no DKMS) with linux kernel. None of them worked. So it has nothing to do with DKMS nor the kernel.

However, I couldn't still figure out why this is happening...

Offline

#12 2018-02-05 15:51:19

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: [SOLVED] Primusrun/Optirun seems to be not running

Try running your game (I assume on steam) using

LD_PRELOAD="/usr/lib32/libGL.so" optirun %command%

Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#13 2018-02-06 15:02:58

mateusfccp
Member
Registered: 2015-04-21
Posts: 12

Re: [SOLVED] Primusrun/Optirun seems to be not running

ngoonee wrote:

Try running your game (I assume on steam) using

LD_PRELOAD="/usr/lib32/libGL.so" optirun %command%

Oh, man! It seemed to work!!!

Can you explain me why this does happen?
And there's any way to make it default? In my Manjaro installation I didn't have to use this var.

Offline

#14 2018-02-07 21:43:06

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: [SOLVED] Primusrun/Optirun seems to be not running

mateusfccp wrote:
ngoonee wrote:

Try running your game (I assume on steam) using

LD_PRELOAD="/usr/lib32/libGL.so" optirun %command%

Oh, man! It seemed to work!!!

Can you explain me why this does happen?
And there's any way to make it default? In my Manjaro installation I didn't have to use this var.

As far as I can tell this is an Arch-specific bug due to how we implement libglvnd. The fix is, as is most often the case, already listed on our wiki

https://wiki.archlinux.org/index.php/Vi … ne_instead.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB