Several issues with bumblebee + primus, help needed

Hi, I have been trying to get my nvidia graphics card (Nvidia 630m +Intel HD 4000, OpenSUSE 12.3 64 bits) to work for over a week, to no avail. I have followed this guide: Smithfarm - the Brain: openSUSE 12.2: How to install ‘bumblebee’ for NVIDIA Optimus VGA and when I see if bbswitch is on or off, I get this: cat /proc/acpi/bbswitch0000:01:00.0 OFF. Output of /var/log/messages:

bbswitch.ko:
2013-03-12T01:03:30.946045+00:00 linux-qowf dkms_autoinstaller[545]: Running module version sanity check.
2013-03-12T01:03:31.467540+00:00 linux-qowf dkms_autoinstaller[545]: Good news! Module version 0.5 for bbswitch.ko
2013-03-12T01:03:31.467820+00:00 linux-qowf dkms_autoinstaller[545]: exactly matches what is already found in kernel 3.7.10-1.1-default.
2013-03-12T01:03:31.468051+00:00 linux-qowf dkms_autoinstaller[545]: DKMS will not replace this module.
2013-03-12T01:03:31.468240+00:00 linux-qowf dkms_autoinstaller[545]: You may override by specifying --force.
2013-03-12T01:03:31.468758+00:00 linux-qowf dkms_autoinstaller[545]: Adding any weak-modules
2013-03-12T01:03:31.646738+00:00 linux-qowf dkms_autoinstaller[545]: ERROR: modinfo: could not open /lib/modules/3.7.10-1.1-default/bbswitch.ko: No such file or directory
2013-03-12T01:03:31.920282+00:00 linux-qowf dkms_autoinstaller[545]: .FATAL: /lib/modules/3.7.10-1.1-default/bbswitch.ko: No such file or directory
2013-03-12T01:03:31.945342+00:00 linux-qowf dkms_autoinstaller[545]: Warning: Module bbswitch.ko from kernel has no modversions, so it cannot be reused for kernel 3.7.10-1.1-xen
2013-03-12T01:03:31.946411+00:00 linux-qowf dkms_autoinstaller[545]: ERROR: modinfo: could not open /lib/modules/3.7.10-1.1-default/bbswitch.ko: No such file or directory
2013-03-12T01:03:32.285611+00:00 linux-qowf dkms_autoinstaller[545]: FATAL: /lib/modules/3.7.10-1.1-default/bbswitch.ko: No such file or directory
2013-03-12T01:03:32.297972+00:00 linux-qowf dkms_autoinstaller[545]: Warning: Module bbswitch.ko from kernel has no modversions, so it cannot be reused for kernel 3.7.9-1.1-desktop
2013-03-12T01:03:43.775018+00:00 linux-qowf dkms_autoinstaller[545]: depmod…
2013-03-12T01:03:47.523010+00:00 linux-qowf dkms_autoinstaller[545]: .cleaning build area…
2013-03-12T01:03:47.527007+00:00 linux-qowf dkms_autoinstaller[545]: DKMS: build completed.

Also, optirun status returns this: optirun --status
[34589.143152] [ERROR]You’ve no permission to communicate with the Bumblebee daemon. Try adding yourself to the ‘bumblebee’ group
[34589.143213] [ERROR]Could not connect to bumblebee daemon - is it running?

As for primus, it uses my intel card instead of the nvidia one, here’s the output:

primusrun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
Xlib: extension “NV-GLX” missing on display “:0”.
Context is Indirect
OpenGL Renderer: Mesa DRI Intel(R) Ivybridge Mobile
62.999392 frames/sec - 53.355445 Mpixels/sec
60.277511 frames/sec - 51.050230 Mpixels/sec
60.303582 frames/sec - 51.072310 Mpixels/sec
60.298731 frames/sec - 51.068201 Mpixels/sec
57.808331 frames/sec - 48.959031 Mpixels/sec

Last but not least, here’s my system information:

Graphics card: glxinfo
If ‘glxinfo’ is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf glxinfo
*glxinfo | grep direct, **glxinfo | grep vendor, *lspci | grep VGA produce no output whatsoever

glxgears:
If ‘glxgears’ is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf glxgears

xrandr:
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1366x768 60.0*+
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)

Distribution, version:
cat /etc/issue
Welcome to openSUSE 12.3 “Dartmouth” - Kernel \r (\l).

Linux kernel:
uname -a
Linux linux-qowf.site 3.7.10-1.1-default #1 SMP Thu Feb 28 15:06:29 UTC 2013 (82d3f21) x86_64 x86_64 x86_64 GNU/Linux

CPU info:
Processor (+7 cores):
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core™ i7-3610QM CPU @ 2.30GHz
stepping : 9
microcode : 0x13
cpu MHz : 1200.000
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips : 4589.80
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

Memory:

cat /proc/meminfo
MemTotal: 5554644 kB
MemFree: 138248 kB
Buffers: 70048 kB
Cached: 3189928 kB
SwapCached: 31724 kB
Active: 2543068 kB
Inactive: 2473652 kB
Active(anon): 1094144 kB
Inactive(anon): 919576 kB
Active(file): 1448924 kB
Inactive(file): 1554076 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 2104316 kB
SwapFree: 1877968 kB
Dirty: 40 kB
Writeback: 0 kB
AnonPages: 1732256 kB
Mapped: 220740 kB
Shmem: 256960 kB
Slab: 255396 kB
SReclaimable: 190508 kB
SUnreclaim: 64888 kB
KernelStack: 4200 kB
PageTables: 51304 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 4881636 kB
Committed_AS: 7750904 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 453556 kB
VmallocChunk: 34359279304 kB
HardwareCorrupted: 0 kB
AnonHugePages: 112640 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 219136 kB
DirectMap2M: 6043648 kB

P.S.: I am terribly sorry if I haven’t mentioned anything I should have, as I am new to the OpenSUSE world, and I have successfully setup my nvidia graphics card on Kubuntu, but not opensuse. Thanks in advance!

I would wait till tomorrow, starting with a fresh install of 12.3 GM. Also note that Overman79 has a new repo for 12.3 with Bumblebee 3.1

http://download.opensuse.org/repositories/home:/Overman79/openSUSE_12.3/home:Overman79.repo

Make sure to install the pattern “Linux kernel development” in Yast. Also make sure to add yourself to the Bumblebee group. As for glxinfo and glxgears I guess you’re running Xfce, where you have to install the package mesa-demos, it’s not installed by default.

See you tomorrow.

Hi, thanks for your reply! I had followed that guide with the 12.3 repo (running KDE), and now installed the “Linux Kernel Development” pattern in Yast and added myself to the bumblebee group. Now the output is this:

optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).
[VGL] WARNING: The OpenGL rendering context obtained on X display
[VGL] :8 is indirect, which may cause performance to suffer.
[VGL] If :8 is a local X display, then the framebuffer device
[VGL] permissions may be set incorrectly.
Context is Indirect
OpenGL Renderer: GeForce GT 630M/PCIe/SSE2
miniclip22@linux-qowf:~> optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).
[VGL] WARNING: The OpenGL rendering context obtained on X display
[VGL] :8 is indirect, which may cause performance to suffer.
[VGL] If :8 is a local X display, then the framebuffer device
[VGL] permissions may be set incorrectly.
Context is Indirect
OpenGL Renderer: GeForce GT 630M/PCIe/SSE2
115.149415 frames/sec - 97.522343 Mpixels/sec
119.709410 frames/sec - 101.384294 Mpixels/sec

Also, primus status is the same, uses my Intel card again. Should I wait for tomorrow and format my system partition? If so, how should I install bumblebee? One click install? Thanks in advance!

Note that the guide is for openSUSE 12.2 - if you’re following Factory, all bets are off. For example, the current kernel on 12.2 is 3.4.28 - you seem to have 3.7 installed.

I will make a new guide for 12.3 when I get around to upgrading my laptop.

P.S. I added a step for the installing the “Linux kernel development” pattern in YaST - thanks.

Oh, I see. So tomorrow, when we have the official release of 12.3, you will kindly provide us with a guide to install bumblebee on 12.3? That’s awesome! I guess I see the problem now, but since I hadn’t found a cleaner alternative… Then I shall wait for your guide, thank you very much! openSUSE is trully the best, already ditched windows because of it :).

Well, not exactly (re-read my post), but I’ll see what I can do :slight_smile: Maybe some other brave soul will volunteer to do the write-up in the meantime . . . hint, hint.

On openSUSE-12.3 I think glxinfo and glxgears may be included with the application Mesa-demo-x. On openSUSE-12.1 I think glxinfo and glxgears are included with the application freeglut. I don’t know what app in 12.2 contains them.

wilbur:/home/smithfarm # cat /etc/SuSE-release
openSUSE 12.2 (x86_64)
VERSION = 12.2
CODENAME = Mantis
wilbur:/home/smithfarm # rpm -qf `which glxgears`
Mesa-demo-x-8.0.1-5.1.2.x86_64
freeglut-100529-8.1.2.x86_64
wilbur:/home/smithfarm # rpm -qf `which glxinfo`
Mesa-demo-x-8.0.1-5.1.2.x86_64
freeglut-100529-8.1.2.x86_64

Done: Smithfarm - the Brain: openSUSE 12.3: How to install ‘bumblebee’ for NVIDIA Optimus VGA

So far, it seems to be working worse than under 12.2 :frowning: I couldn’t get bbswitch to automatically turn the discrete graphics off on boot-up. It tries to, but fails:


Mar 29 10:46:01 machine kernel:    41.226491] bbswitch: disabling discrete graphics
Mar 29 10:46:02 machine kernel:    41.236942] pci 0000:01:00.0: Refused to change power state, currently in D0
Mar 29 10:46:02 machine kernel:    41.537534] pci 0000:01:00.0: power state changed by ACPI to D3cold

So I put this in my .bash_profile:


sudo /sbin/rmmod nvidia
sudo tee /proc/acpi/bbswitch <<<OFF
optirun --status

I can sleep the laptop to RAM and recover OK, if it hasn’t slept too long (?) - if I leave it sleeping overnight, in the morning it wakes up, but both monitors remain black no matter what keys I press. This is weird, but has happened several times already so it’s probably reproducible. I’ve been shutting the machine down for the night as a workaround.

I’d like to try getting rid of the nvidia driver and using Bumblebee and bbswitch with nouveau - seems like that’s now an option, at least as of Bumblebee 3.1.

Keep in mind that my only motivation for running Bumblebee is to turn the discrete graphics card OFF and leave it OFF. I don’t need it, and I sure as heck don’t need the additional noise and heat. I’m not very impressed that Dell “forgot” to include a “Disable discrete graphics adapter” selection in the BIOS setup!

That reminds me of another annoyance that I have encountered several times (under 12.2 and 12.3) - somehow Bumblebee or bbswitch disables Optimus in the BIOS, causing the machine to become unbootable (since it’s got the nvidia driver in the initrd, it needs Optimus to be available, apparently). So if your machine doesn’t boot, don’t forget to look in the BIOS setup to see if Optimus has somehow become disabled.

You really don’t need Bumblebee if you just want to switch off the Nvidia card. Install only bbswitch-dkms from Overmans repo, blacklist nouveau in /etc/modprobe.d/50-blacklist.conf and run mkinitrd, then add the following to /etc/init.d/boot.local:

modprobe bbswitch
tee /proc/acpi/bbswitch <<<OFF

Works like a charm for me, Nvidia is switched OFF also after resume and hibernate.