Bumblebee-Project / Bumblebee

Bumblebee daemon and client rewritten in C
http://www.bumblebee-project.org/
GNU General Public License v3.0
1.29k stars 142 forks source link

Optirun won't run ever. Error: Cannot access secondary GPU - error: Could not enable discrete graphics card whenever using optirun/primus #991

Open ddshore opened 5 years ago

ddshore commented 5 years ago

Hi,

I'm using a dell precision 5530. My nvidia card is:

01:00.0 3D controller: NVIDIA Corporation GP107GLM [Quadro P2000 Mobile] (rev ff) And for my intel card I'm using 00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:3e9b] (prog-if 00 [VGA controller]) (i915).

Using arch linux with kernel version: 4.18.9-arch1-1-ARCH and bumblebeed version 3.2.1.

Whenever I try to run with optirun or primus I get this message:

[13992.517515] [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card
[13992.517530] [ERROR]Aborting because fallback start is disabled.

Checking dmesg I have this error whenever using it:

[13841.624122] bbswitch: enabling discrete graphics
[13841.624139] pci 0000:01:00.0: Refused to change power state, currently in D3

It seems to load fine:

[   15.056098] bbswitch: version 0.8
[   15.056101] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   15.056105] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[   15.056110] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20180531/nsarguments-66)
[   15.056187] bbswitch: detected an Optimus _DSM function
[   15.056192] pci 0000:01:00.0: enabling device (0006 -> 0007)
[   15.056237] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[   15.057305] bbswitch: disabling discrete graphics
[   15.239089] psmouse serio1: synaptics: queried max coordinates: x [..5664], y [..4646]
[   15.254806] ath10k_pci 0000:3b:00.0: qca6174 hw3.2 target 0x05030000 chip_id 0x00340aff sub 1028:364a
[   15.254807] ath10k_pci 0000:3b:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 0 testmode 0
[   15.255145] ath10k_pci 0000:3b:00.0: firmware ver WLAN.RM.4.4.1-00079-QCARMSWPZ-1 api 6 features wowlan,ignore-otp crc32 fd869beb
[   15.269195] psmouse serio1: synaptics: queried min coordinates: x [1278..], y [1206..]

How can I get it to run? Everything seems to be installed properly, and there's no place in the BIOS to enable/disable the card.

TerminalWitchcraft commented 5 years ago

I am also facing the same issue with my Precision 5530 (Arch Linux, kernel 4.19.10)

xEnVrE commented 5 years ago

From December 17th Dell is offering the Precision 5530 with Ubuntu 18.04 and I know for sure they are using a customized installation - not just plain Ubuntu. If someone is able to obtain the customized iso maybe we may find some clues on how to get switchable graphics working.

TerminalWitchcraft commented 5 years ago

Dell provides a OS recovery tool, which allows us to select OS(Windows/Linux) afaik. If you want, I can extract the ISO image of Ubuntu and can share with you.

xEnVrE commented 5 years ago

It would be very appreciated! Yes they have a tool on GitHub but it requires to be run on a computer containing a Dell Ubuntu installation.

If you check, you should have a dedicated partition containing an exact copy of the iso we are talking about!

xEnVrE commented 5 years ago

Any news on the iso ?

cc @TerminalWitchcraft

TerminalWitchcraft commented 5 years ago

Hi @xEnVrE , running the OS recovery tool in Windows does not give me the option to select an OS(My workstation came with Windows 10 preinstalled). However, I have read somewhere that the option appears when you try to create a recovery from a different windows machine, not the one which already has an OS(the tool asks for a service tag, unique to every purchase. I guess they figure out using this whether the machine came with windows or linux). I'll try to find a second windows machine and extract the iso.

opt12 commented 5 years ago

Hello Everybody, if it helps, I could provide the DELL ISO of Ubuntu 16.04 which was shipped with a 2018 Precision 3530. unfortunately, they don't have a 18.04 image ready yet. Please mail me if this is of any help. Regards

mreichardt95 commented 5 years ago

Had the same problem. Graff on the Arch forums wrote a pretty good Guide on how to get this working. I also have a Precision 5530 with P2000 Card and it works without problems. For some reason nvidia-smi has to be appended to the enable script. Otherwise optirun won't work. click me

giomasce commented 5 years ago

I have what appears to be the same problem. I can workaround with Graff's trick on the Arch forum. Also, I opened a bug on Debian, where the Debian maintainer has replied me with useful information.

TerminalWitchcraft commented 5 years ago

@giomasce where should I put the following option?

AlwaysUnloadKernelDriver=false

giomasce commented 5 years ago

In /etc/bumblebee/bumblebee.conf. But you do not have to add it, you have to change it to true (provided that your laptop is like mine).

TerminalWitchcraft commented 5 years ago

Okay, got it. Although @mreichardt95 's solution solves the problem, it involves editing too many files which makes it difficult to maintain in the long run. Hope they solve this in the upcoming releases.

Rubyj commented 5 years ago

Same issue occurs on Arch Linux for precision 5530 with Quadro P2000 and up to date nvidia drivers.

sinned130 commented 4 years ago

Have the same issue and found no fix yet.

XPS 15 9570 Kernel 5.4.6-2-MANJARO GNOME 3.34.2 dGPU: NVIDIA GeForce GTX 1050 Ti Mobile iGPU: Intel UHD Graphics 630 Bumblebee: 3.2.1-2017-02-27

$ optirun -v firefox [ 1629.855538] [INFO]Configured driver: nvidia [ 1629.855649] [ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect. [ 1629.855710] [ERROR]Could not connect to bumblebee daemon - is it running?

$ sudo dmesg [ 1625.504637] bbswitch: enabling discrete graphics [ 1625.504683] pci 0000:01:00.0: Refused to change power state, currently in D3