• Optirun breaks after kernel update (4.8.4)


    My device has hybrid graphics and I have set up optirun with bumblebee. Prior to kernel update it has been running fine, with [optirun glxgears] running consistently at ten times the frame rate of integrated graphics.

    After the update gnome shell fails to start some of the extensions and require a user restart. I suspect this is graphics-related issue.

  • Please, provide as much specific details about the problem as you can.

    A generic claim like “It doesn’t work” almost never helps to solve a problem.

  • KERNEL 4.8.6 UPDATE seems to fix the issue.

    Before update,

    glxgears:
    Running synchronized to the vertical refresh.  The framerate should be
    approximately the same as the monitor refresh rate.
    340 frames in 5.0 seconds = 67.824 FPS
    301 frames in 5.0 seconds = 60.029 FPS
    
    optirun glxgears:
    [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(0): Failed to initialize the NVIDIA GPU at PCI:1:0:0.  Please
    
    [ERROR]Aborting because fallback start is disabled.
    

    Hardware information

    lspci | grep NVIDIA
    04:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940M] (rev ff)
    
    lspci | grep VGA
    00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)
    
  • @xumarcus , that s fine! Will you mark it as “SOLVED”, then?:+1:
    Cheers!:

    1.Antergos Linux KDE plasma / Gnome 2.Ubuntu 17.10 64bit Unity
    Intel Core2 Duo CPU P8400 2.26GHz‖ RAM 3908 MiB ‖ Dell Inc. 0F328M - Dell Inc. Latitude E6500
    Intel Mobile 4 Series Chipset Integrated Graphics [8086:2a42] {i915

  • Apparently I am mistaken.

    After I suspend my laptop’s screen freezes, it seems to me that suspend is malfunctioning.
    After I force a hard reset the error persists. It seems that the NVIDIA card fails to transit from D3 to D0 state. I also suspect that the card breaks my suspend/resume too - after the freeze suspend is working perfectly but bbswitch is not.

    Perhaps the kernel update reset something which re-enabled the graphics card - immediately after the update optirun is working perfectly.

    Journal

    journalctl -b 0
    Nov 02 20:08:15 antergos-marcus kernel: bbswitch: enabling discrete graphics
    Nov 02 20:08:15 antergos-marcus kernel: pci 0000:04:00.0: Refused to change power state, currently in D3
    Nov 02 20:08:16 antergos-marcus su[2907]: pam_unix(su:session): session closed for user root
    Nov 02 20:08:19 antergos-marcus bumblebeed[571]: [  255.870181] [ERROR]Could not enable discrete graphics card
    Nov 02 20:08:19 antergos-marcus kernel: bbswitch: enabling discrete graphics
    Nov 02 20:08:19 antergos-marcus kernel: pci 0000:04:00.0: Refused to change power state, currently in D3
    

    Optirun status

    [  753.256873] [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card
    
    [  753.256931] [ERROR]Aborting because fallback start is disabled.
    
  • Same here! I am not sure when it stopped working, but it’s been very recently. My system is fully updated as of today.

    It looks like bbswitch works only once, at boot, but successive calls result in failure:

    $ journalctl -b 0 | grep -1 -e 'bumblebeed\|bbswitch\|graphics'
    nov 15 00:44:15 enx kernel:   Normal zone: 913408 pages, LIFO batch:31
    nov 15 00:44:15 enx kernel: Reserving Intel graphics memory at 0x000000009e000000-0x000000009fffffff
    nov 15 00:44:15 enx kernel: ACPI: PM-Timer IO Port: 0x1808
    --
    nov 15 00:44:15 enx kernel: input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card1/input15
    nov 15 00:44:15 enx kernel: [drm] Memory usable by graphics device = 4096M
    nov 15 00:44:15 enx kernel: checking generic (b0000000 7f0000) vs hw (b0000000 10000000)
    --
    nov 15 00:44:15 enx bumblebeed[392]: [    2.081507] [INFO]/usr/bin/bumblebeed 3.2.1 started
    --
    nov 15 00:44:16 enx kernel: random: crng init done
    nov 15 00:44:16 enx kernel: bbswitch: version 0.8
    nov 15 00:44:16 enx kernel: bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
    nov 15 00:44:16 enx kernel: bbswitch: Found discrete VGA device 0000:03:00.0: \_SB_.PCI0.RP05.PEGP
    nov 15 00:44:16 enx kernel: ACPI Warning: \_SB.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
    nov 15 00:44:16 enx kernel: bbswitch: detected an Optimus _DSM function
    nov 15 00:44:16 enx kernel: acpi_call: Cannot get handle: Error: AE_NOT_FOUND
    --
    nov 15 00:44:16 enx kernel: pci 0000:03:00.0: enabling device (0000 -> 0003)
    nov 15 00:44:16 enx kernel: bbswitch: Succesfully loaded. Discrete card 0000:03:00.0 is on
    nov 15 00:44:16 enx kernel: bbswitch: disabling discrete graphics
    nov 15 00:44:16 enx kernel: ACPI Warning: \_SB.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)
    --
    nov 15 00:44:52 enx systemd[1022]: Started GNOME Terminal Server.
    nov 15 00:45:32 enx kernel: bbswitch: enabling discrete graphics
    nov 15 00:45:32 enx kernel: pci 0000:03:00.0: Refused to change power state, currently in D3
    nov 15 00:45:32 enx bumblebeed[392]: [   78.080319] [ERROR]Could not enable discrete graphics card
    nov 15 00:45:32 enx kernel: pci 0000:03:00.0: Refused to change power state, currently in D3
    

    GPUs:

    lspci | grep -E "VGA|3D"
    00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)
    03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940M] (rev ff)
    

    Kernel:

    $ uname -r 
    4.8.7-1-ARCH
    

    Any clues? Thanks in advance!

  • Finally I have found the culprit. TLP runtime power management (or any alternatives) appears to intervene with bumblebee; I suppose optirun malfunctions due to some TLP updates which I have overlooked.

  • Can confirm. Uninstalling tlp and rebooting solved the issue. Unfortunately, the power usage does go up, as expected, so I’ll keep tlp around and uninstall it when needed.

    [edit]

    I blacklisted the Nvidia card in /etc/default/tlp, under the section RUNTIME_PM_BLACKLIST, and optirun works! I had already tried by blacklisting the driver, but did not succeed. With the explicit address (as listed in lspci), it does work. I guess this will increase the power usage a bit, but it’s the best workaround I’ve found.

  • @jaimergp said in Optirun breaks after kernel update (4.8.4):


    I blacklisted the Nvidia card in /etc/default/tlp, under the section RUNTIME_PM_BLACKLIST, and optirun works! I had already tried by blacklisting the driver, but did not succeed. With the explicit address (as listed in lspci), it does work…

    Excellent find :+1: !

    I’m not familiar with tlp, as I don’t use it. Could you please post back here your code in /etc/default/tlp to blacklist tlp? I’d like to experiment with it. If it works, it must go into our AnteWiki :) .

    • Copy the result from lspci | grep "NVIDIA" | cut -b -8
    • In /etc/default/tlp append the result to RUNTIME_PM_BLACKLIST
  • @xumarcus Thanks a lot. Clear, concisely, precisely. Much appreciated. Will try it asap.

    Edit, a day later

    Tlp is installed in Antergos Mate 2016.11.20 with working Bumblebee and proprietary Nvidia video driver.

    But I can’t reproduce the problem - tlp doesn’t conflict with bbswitch and bumblebee. With tlp running, bbswitch continues to switch Nvidia GPU power ON when optirun is used, and correctly switches it OFF when optirun exits.

    In other words, tlp doesn’t break bbswitch here. Tlp and Bumblebee work fine together.

4.8.41 breaks16 kernel79 optirun5 Posts 11Views 1663
Log in to reply