Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#47140 - [bumblebee] can not handle nvidia-modeset.ko

Attached to Project: Community Packages
Opened by Tomasz Przybył (FadeMind) - Saturday, 21 November 2015, 19:53 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 15 April 2016, 13:41 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 12
Private No

Details

If nvidia-modeset.ko is installed then bbswitch can't unload a nvidia-modeset module and turn off NVIDIA GPU cause nvidia-modeset is used instead of nvidia module.

Normal nvidia package don't have installed nvidia-modeset.ko and it is NOT AFFECTED.

Commit: https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/nvidia-lts&id=8d09af1d2085ce990358200ad9a74cc475ae1694

I will report this upstream on github.

NVIDIA 358.16.
BBSWITCH upstream 0.8 release.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Friday, 15 April 2016, 13:41 GMT
Reason for closing:  Fixed
Comment by Tomasz Przybył (FadeMind) - Saturday, 21 November 2015, 20:04 GMT
Upstream: https://github.com/Bumblebee-Project/bbswitch/issues/116

Setup info:

01:00.0 VGA compatible controller: NVIDIA Corporation GF108M GeForce GT 630M (prog-if ff)
!!! Unknown header type 7f
Kernel modules: nouveau, nvidia

[tomasz@arch ~]$ dmesg |grep bbsw
[ 2.540830] bbswitch: version 0.8
[ 2.540836] bbswitch: Found integrated VGA device 0000:00:02.0: _SB_.PCI0.GFX0
[ 2.540844] bbswitch: Found discrete VGA device 0000:01:00.0: _SB_.PCI0.PEG0.PEGP
[ 2.540951] bbswitch: detected an Optimus _DSM function
[ 2.540968] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[ 2.547654] bbswitch: disabling discrete graphics
[ 23.418246] bbswitch: enabling discrete graphics
[ 566.226540] bbswitch: disabling discrete graphics

NOTE: if I manually unload the nvidia-modeset module, then bbswitch will turn off GPU.

I have MANY warnings about

[ 29.372971] ACPI Warning: _SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires Package

but I just ignore this:
THIS is log how new nvidia-modeset module works instead nvidia:

[ 23.418246] bbswitch: enabling discrete graphics
[ 23.904334] nvidia: module license 'NVIDIA' taints kernel.
[ 23.904339] Disabling lock debugging due to kernel taint
[ 23.911959] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none
[ 23.912049] nvidia-nvlink: Nvlink Core is being initialized, major device number 246
[ 23.912146] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:01:00.0 on minor 1
[ 23.912150] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 358.16 Mon Nov 16 19:25:55 PST 2015
[ 24.442745] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 358.16 Mon Nov 16 18:58:09 PST 2015
[ 24.851888] nvidia-modeset: Allocated GPU:0 (GPU-d6b03ef8-5883-7f16-ebcf-26ba8a9815ca) @ PCI:0000:01:00.0
[ 24.853907] ACPI Warning: _SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires Package
[ 29.348982] nvidia-modeset: Freed GPU:0 (GPU-d6b03ef8-5883-7f16-ebcf-26ba8a9815ca) @ PCI:0000:01:00.0
[ 546.533540] nvidia-modeset: Unloading

In this situation I unload nvidia-modeset module manually via sudo modprobe -r nvidia-modeset

Regards
Comment by Tomasz Przybył (FadeMind) - Sunday, 22 November 2015, 07:40 GMT
UPDATE: all nvidia 358.16 install nvidia-modeset module, and bbswitch not working fine with it.
Comment by Tomasz Przybył (FadeMind) - Sunday, 22 November 2015, 13:02 GMT
UPDATE: It is a bumblebee issue - not bbswitch.

https://github.com/Bumblebee-Project/Bumblebee/issues/699

Comment by Jacob S (Gourdcaptain) - Saturday, 05 December 2015, 06:53 GMT
The problem is later in that bug report you linked they say it's an issue that needs to be fixed with a udev rule. At this point I'm not sure who should be taking responsibility for fixing this.
Comment by Tomasz Przybył (FadeMind) - Tuesday, 08 December 2015, 16:14 GMT Comment by Abuzer Rafey (arafey) - Wednesday, 09 December 2015, 01:30 GMT
I updated my patch to detect nvidia_modeset, rather than assuming it's loaded: https://github.com/arafey/Bumblebee/commit/09d537e8e5313cd0f2c7bf6620ca70454de8a04a
Comment by Michiel Derhaeg (Distorted) - Sunday, 27 December 2015, 22:44 GMT
In my case, it's not just the nvidia_modeset module that causes issues.
My system also loades a nvidia_uvm module that needs to be unloaded first.

Some guy on github proposed this as a temporary hack:
https://github.com/Bumblebee-Project/Bumblebee/pull/709#issuecomment-167376709

I tested it out, and it works for me.
journalctl output: https://pastebin.com/raw/7uStwwvz
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 13 February 2016, 20:35 GMT
What's the status on this? Upstream still unwilling to fix this upstream? In that case, I will downstream patch this.
Comment by Tomasz Przybył (FadeMind) - Saturday, 13 February 2016, 20:44 GMT
@Sven
Please see PKGBUILD and patches: https://github.com/FadeMind/archpkgbuilds/tree/master/AUR/nvidia-optimus/bumblebee

Working for me like a charm.
Comment by Jacob S (Gourdcaptain) - Saturday, 13 February 2016, 21:18 GMT
Tomasz's patches and PKGBUILD he linked are working for me on nvidia driver 361.28-1 with a GTX 950m.
Comment by Neros (Neros) - Wednesday, 17 February 2016, 19:00 GMT
Tomasz's patches and PKGBUILD are working for me too.
Comment by Tomasz Przybył (FadeMind) - Wednesday, 17 February 2016, 19:56 GMT
Bumblebee PKGBUILD with patches for hard workaround issue  FS#47140 .
Comment by AnAkkk (AnAkkk) - Wednesday, 02 March 2016, 11:45 GMT
Please apply the patch on the Arch package, there is no progress on fixing this upstream. It is annoying to have to unload the module manually every time I boot my computer and every time I use primusrun.
Comment by AnAkkk (AnAkkk) - Monday, 11 April 2016, 18:38 GMT
FadeMind, could you please modify your patches to properly unload the new nvidia-drm module that is found in the last version of the nvidia driver, now in testing?
It seems that the GPU is never turned off due to that new module not being unloaded.
Comment by Tomasz Przybył (FadeMind) - Monday, 11 April 2016, 18:45 GMT
AnAkkk (AnAkkk) asking directly https://github.com/arafey about this, He is author of this hard workaround.
Comment by Abuzer Rafey (arafey) - Monday, 11 April 2016, 22:08 GMT
I will load the testing version of the Nvidia driver in order to test a new version of the workaround with that driver tonight. I'll post a link here when I upload it to Github.
Comment by Tomasz Przybył (FadeMind) - Wednesday, 13 April 2016, 06:26 GMT
PKGBUILD bumblebee with patches for handling nvidia-drm nvidia-modeset and nvidia-uvm modules.

Patches credits: Abuzer Rafey (arafey)
Comment by Abuzer Rafey (arafey) - Wednesday, 13 April 2016, 07:18 GMT
Here is the patch to fix issues with nvidia 364.16. You can also pull it from the master branch of https://github.com/arafey/Bumblebee
Let me know how it works.

EDIT: FadeMind, I just saw your new PKGBUILD after refreshing my browser. The new commit I linked is a cleaner version of the one from 2 hours ago.
Comment by Tomasz Przybył (FadeMind) - Wednesday, 13 April 2016, 07:58 GMT
PKGBUILD bumblebee with patches for handling nvidia-drm nvidia-modeset and nvidia-uvm modules.

REVISION 2 included https://github.com/arafey/Bumblebee/commit/fcfe596eb13f62ca9dd7de272a5a87ae843b2a00 PATCH

Patches credits: Abuzer Rafey (arafey)

TESTED ON MY DEVICE = ALL IS FINE
Comment by Cihat Ertem (fincan) - Thursday, 14 April 2016, 18:40 GMT
Hi,

I have the same problem with 364.16 and I see there is a patch for the issue. This patch is going to be added official package or do I have to compile own with the patch?
Comment by Tomasz Przybył (FadeMind) - Thursday, 14 April 2016, 18:57 GMT
@Cihat Ertem (fincan) -

Download tarball and compile own.
I don't see any news from maintainer bumblebee in Arch Repo for official fix way.
Comment by Cihat Ertem (fincan) - Thursday, 14 April 2016, 20:13 GMT
Thx, I compiled the package with patch and it works perfectly!

Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 14 April 2016, 20:47 GMT
I applied the patches to the bumblebee package taken from FadeMind's package. However, the changes to bumblebee.install are unacceptable and will not be added. Please test package rel -11.
Comment by Bruno Pagani (ArchangeGabriel) - Thursday, 14 April 2016, 22:08 GMT
JFYI, upstream will be patched, whenever I get time to look at this. That’s probably going to be around may 5th-8th. ;)
Comment by AnAkkk (AnAkkk) - Friday, 15 April 2016, 13:16 GMT
Works fine after the update.

Loading...