{"action":"created","issue":{"url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/140","repository_url":"https://api.github.com/repos/Bumblebee-Project/bbswitch","labels_url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/140/comments","events_url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/140/events","html_url":"https://github.com/Bumblebee-Project/bbswitch/issues/140","id":181914244,"node_id":"MDU6SXNzdWUxODE5MTQyNDQ=","number":140,"title":"bbswitch is broken with kernel 4.8 pcie port power management","user":{"login":"nathanielwarner","id":4626345,"node_id":"MDQ6VXNlcjQ2MjYzNDU=","avatar_url":"https://avatars0.githubusercontent.com/u/4626345?v=4","gravatar_id":"","url":"https://api.github.com/users/nathanielwarner","html_url":"https://github.com/nathanielwarner","followers_url":"https://api.github.com/users/nathanielwarner/followers","following_url":"https://api.github.com/users/nathanielwarner/following{/other_user}","gists_url":"https://api.github.com/users/nathanielwarner/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanielwarner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanielwarner/subscriptions","organizations_url":"https://api.github.com/users/nathanielwarner/orgs","repos_url":"https://api.github.com/users/nathanielwarner/repos","events_url":"https://api.github.com/users/nathanielwarner/events{/privacy}","received_events_url":"https://api.github.com/users/nathanielwarner/received_events","type":"User","site_admin":false},"labels":[{"id":383441586,"node_id":"MDU6TGFiZWwzODM0NDE1ODY=","url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/labels/ACPI%20Power%20Resources","name":"ACPI Power Resources","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":83,"created_at":"2016-10-09T21:50:16Z","updated_at":"2018-06-23T16:48:22Z","closed_at":null,"author_association":"NONE","body":"I just upgraded to kernel 4.8, and bbswitch 0.8-1 no longer works properly. When I try to run something with primusrun, it fails with \"bumblebee could not enable discrete graphics card\" or something, and I get this in dmesg:\n\n```\nbbswitch: enabling discrete graphics\npci 0000:01:00.0: Refused to change power state, currently in D3\npci 0000:01:00.0: Refused to change power state, currently in D3\n```\n\nWhen I use the kernel command line option `pcie_port_pm=off` primusrun works again, and I get this in dmesg upon using primusrun:\n\n```\nbbswitch: enabling discrete graphics\nnvidia-nvlink: Nvlink Core is being initialized, major device number 242\nNVRM: loading NVIDIA UNIX x86_64 Kernel Module  370.28  Thu Sep  1 19:45:04 PDT 2016\nvgaarb: this pci device is not a vga device\nACPI Warning: \\_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)\nACPI Warning: \\_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)\nACPI Warning: \\_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)\nACPI Warning: \\_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)\nACPI Warning: \\_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)\nACPI Warning: \\_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)\nACPI Warning: \\_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)\nACPI Warning: \\_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)\nnvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  370.28  Thu Sep  1 19:18:48 PDT 2016\nnvidia-modeset: Allocated GPU:0 (GPU-33c835cf-d564-600a-037b-c7ecb9188d7c) @ PCI:0000:01:00.0\nnvidia-modeset: Freed GPU:0 (GPU-33c835cf-d564-600a-037b-c7ecb9188d7c) @ PCI:0000:01:00.0\nvgaarb: this pci device is not a vga device\nACPI Warning: \\_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)\nnvidia-modeset: Unloading\nnvidia-nvlink: Unregistered the Nvlink Core, major device number 242\nbbswitch: disabling discrete graphics\nACPI Warning: \\_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160422/nsarguments-95)\npci 0000:01:00.0: Refused to change power state, currently in D0\n```\n\nIs lack of support for Kernel 4.8 default configuration an issue that anyone else is having? I'm running Manjaro with Kernel 4.8.1-1, Nvidia driver 370.28, bbswitch 0.8-1.\n"},"comment":{"url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/comments/399692340","html_url":"https://github.com/Bumblebee-Project/bbswitch/issues/140#issuecomment-399692340","issue_url":"https://api.github.com/repos/Bumblebee-Project/bbswitch/issues/140","id":399692340,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTY5MjM0MA==","user":{"login":"liskin","id":300342,"node_id":"MDQ6VXNlcjMwMDM0Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/300342?v=4","gravatar_id":"","url":"https://api.github.com/users/liskin","html_url":"https://github.com/liskin","followers_url":"https://api.github.com/users/liskin/followers","following_url":"https://api.github.com/users/liskin/following{/other_user}","gists_url":"https://api.github.com/users/liskin/gists{/gist_id}","starred_url":"https://api.github.com/users/liskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liskin/subscriptions","organizations_url":"https://api.github.com/users/liskin/orgs","repos_url":"https://api.github.com/users/liskin/repos","events_url":"https://api.github.com/users/liskin/events{/privacy}","received_events_url":"https://api.github.com/users/liskin/received_events","type":"User","site_admin":false},"created_at":"2018-06-23T16:48:22Z","updated_at":"2018-06-23T16:48:22Z","author_association":"NONE","body":"But what's the point of bbswitch with https://github.com/torvalds/linux/commit/abf92f86361b? At least on ThinkPad T25 it seems that simply disabling bbswitch and enabling runtime-pm in laptop-mode-tools is enough for the dGPU to power off when the nvidia module is unloaded and power back on when it gets loaded.\r\n\r\nWithout https://github.com/torvalds/linux/commit/abf92f86361b, this doesn't work since as soon as runtime-pm is enabled for the card, the PCI state is lost and there's no way to enable it without a reboot, and this is true for both nvidia and nouveau. But with the patch, everything seems to work just fine.\r\n(Except bumblebeed which insists on having a PMMethod to unload the module, so I now need to rmmod it manually. I guess that's worth a separate bug report.)\r\n\r\nNow I just need to check whether dropping bbswitch and using port pm fixes the battery drain during system suspend. :-)"}}
{"actor":{"display_login":"liskin"}}