You are not logged in.

#76 2018-09-10 21:02:49

IngeniousDox
Member
Registered: 2018-06-24
Posts: 21

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

I opened one at Bumblebee and one at nvidia-xrun. So both bumblebee and nvidia-xrun simply don't use bbswitch. There are working solutions already for both, you can see it in this thread and on the bugtrackers.

Offline

#77 2018-09-11 05:39:44

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 484

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

IngeniousDox wrote:

I opened one at Bumblebee and one at nvidia-xrun. So both bumblebee and nvidia-xrun simply don't use bbswitch. There are working solutions already for both, you can see it in this thread and on the bugtrackers.

Thanks. Can you link them here, also for other's use? There are many related issues on bumblebee github's and I'm not sure which one I should follow. To be honest some of them seem somewhat connected to the noob's eye.

In the case of this laptop bbswitch not working is an issue of bbswitch, or is it coming from bumblebee? Might collect some info and open a bug report for bbswitch just to make sure that the devs are aware of it.


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#78 2018-09-11 09:48:13

IngeniousDox
Member
Registered: 2018-06-24
Posts: 21

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

I believe it is already in this thread, but I'll do it again:

Bumblebee: https://github.com/Bumblebee-Project/Bu … issues/978

If you are not going to use bbswitch, it has to be changed in Bumblebee, someone has already done that, you can find the result in the pull request someone made: https://github.com/Bumblebee-Project/Bumblebee/pull/98

Nvidia-xrun: https://github.com/Witko/nvidia-xrun/issues/67
Fincer's nvidia-xrun: https://github.com/Bumblebee-Project/Bu … issues/978

michelesr created it for nvidia-xrun: https://github.com/michelesr/nvidia-xru … vidia-xrun

Offline

#79 2018-09-11 09:48:54

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 484

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

IngeniousDox wrote:

I believe it is already in this thread, but I'll do it again:

Bumblebee: https://github.com/Bumblebee-Project/Bu … issues/978

If you are not going to use bbswitch, it has to be changed in Bumblebee, someone has already done that, you can find the result in the pull request someone made: https://github.com/Bumblebee-Project/Bumblebee/pull/98

Nvidia-xrun: https://github.com/Witko/nvidia-xrun/issues/67
Fincer's nvidia-xrun: https://github.com/Bumblebee-Project/Bu … issues/978

michelesr created it for nvidia-xrun: https://github.com/michelesr/nvidia-xru … vidia-xrun

Thanks!


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#80 2018-09-12 12:07:27

maxiix3
Member
Registered: 2018-09-12
Posts: 2

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

yaworski wrote:

I've found a way to prevent Xorg from loading nvidia module on boot. I've created a /etc/X11/xorg.conf.d/01-noautogpu.conf file with

Section "ServerFlags"
	Option "AutoAddGPU" "off"
EndSection

Then the iGPU needs to be added manually. I've created a /etc/X11/xorg.conf.d/20-intel.conf file with:

Section "Device"
	Identifier "Intel Graphics"
	Driver "intel"
EndSection

I've tested this multiple times and now the nvidia module is not loaded by the Xorg at all.

I don't use bbswitch. Instead I've created /etc/tmpfiles.d/nvidia_pm.conf file with:

w /sys/bus/pci/devices/0000:01:00.0/power/control - - - - auto

This switches on the kernel power management for the NVidia card. It depends on whether the nvidia module is loaded or not. The bumblebee loads the module, turning on the card when the optirun/primusrun is executed, but unfortunately it doesn't even try to unload it if bbswitch is not installed. But after manually unloading the module, the card turns off. The card is turned off after boot by default.

I have a question about this part. Intel drivers is installed with xf86-video-intel, right? Your solution work here only when the xf86-video-intel package is uninstalled. Dell xps 15 9570 her also. I'm using the forceunload branch you made a pullrequest with.
Many of you would ask why I want the xf86-video-intel package installed, but it looks like it is the only way my computer gets under 10W with powertop.
With xf86-video-intel I somehow get the known «pci 0000:01:00.0: Refused to change power state, currently in D3». Without that I understand how this should do something with the nvidia card.

Edit: it looks like xorg starts starts the nvidia driver if I don't mention a driver in 20-intel.conf. without xf86-video-intel the intel module is not found and I can't start a x. If I delete the 20-intel.conf X starts, but with nvidia module loaded

Last edited by maxiix3 (2018-09-12 19:16:14)

Offline

#81 2018-09-12 20:16:49

yaworski
Member
Registered: 2018-08-05
Posts: 12

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

maxiix3 wrote:
yaworski wrote:

I've found a way to prevent Xorg from loading nvidia module on boot. I've created a /etc/X11/xorg.conf.d/01-noautogpu.conf file with

Section "ServerFlags"
	Option "AutoAddGPU" "off"
EndSection

Then the iGPU needs to be added manually. I've created a /etc/X11/xorg.conf.d/20-intel.conf file with:

Section "Device"
	Identifier "Intel Graphics"
	Driver "intel"
EndSection

I've tested this multiple times and now the nvidia module is not loaded by the Xorg at all.

I don't use bbswitch. Instead I've created /etc/tmpfiles.d/nvidia_pm.conf file with:

w /sys/bus/pci/devices/0000:01:00.0/power/control - - - - auto

This switches on the kernel power management for the NVidia card. It depends on whether the nvidia module is loaded or not. The bumblebee loads the module, turning on the card when the optirun/primusrun is executed, but unfortunately it doesn't even try to unload it if bbswitch is not installed. But after manually unloading the module, the card turns off. The card is turned off after boot by default.

I have a question about this part. Intel drivers is installed with xf86-video-intel, right? Your solution work here only when the xf86-video-intel package is uninstalled. Dell xps 15 9570 her also. I'm using the forceunload branch you made a pullrequest with.
Many of you would ask why I want the xf86-video-intel package installed, but it looks like it is the only way my computer gets under 10W with powertop.
With xf86-video-intel I somehow get the known «pci 0000:01:00.0: Refused to change power state, currently in D3». Without that I understand how this should do something with the nvidia card.

Edit: it looks like xorg starts starts the nvidia driver if I don't mention a driver in 20-intel.conf. without xf86-video-intel the intel module is not found and I can't start a x. If I delete the 20-intel.conf X starts, but with nvidia module loaded

I have the xf86-video-intel driver installed. The error you're getting (refused to change power state) is caused by bbswitch, which you probably still have installed. Either uninstall it or blacklist it. I've started playing with nvidia-xrun which requires bbswitch to be installed, so I've had to blacklist it in the end by creating a file /etc/modprobe.d/bbswitch.conf with following content:

blacklist bbswitch
install bbswitch /usr/bin/false

The install line is needed because nvidia-xrun loads the bbswitch anyway. If you don't want to play with nvidia-xrun, then just uninstall bbswitch.

Offline

#82 2018-09-12 20:28:04

yaworski
Member
Registered: 2018-08-05
Posts: 12

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

BTW, a little off topic question: what GPU clock speeds do you get on dGPU? I've opened nvidia-settings while running unigine-heaven benchmark and the GPU clock seems to oscillate around 370 MHz. Only sometimes goes as high as 410 MHz. The performance level in powermizer is set to 3. I also get the same behaviour when using nvidia-xrun with whole session running on dGPU. My system is fully up to date (nvidia 396.54).

Last edited by yaworski (2018-09-12 20:29:17)

Offline

#83 2018-09-12 23:19:36

supremecoconut
Member
Registered: 2018-05-06
Posts: 11

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

And what if I only needed to make it work with CUDA, for tensorflow scripts? What would be the best way?

Offline

#84 2018-09-17 06:44:40

maxiix3
Member
Registered: 2018-09-12
Posts: 2

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

yaworski wrote:
maxiix3 wrote:
yaworski wrote:

I've found a way to prevent Xorg from loading nvidia module on boot. I've created a /etc/X11/xorg.conf.d/01-noautogpu.conf file with

Section "ServerFlags"
	Option "AutoAddGPU" "off"
EndSection

Then the iGPU needs to be added manually. I've created a /etc/X11/xorg.conf.d/20-intel.conf file with:

Section "Device"
	Identifier "Intel Graphics"
	Driver "intel"
EndSection

I've tested this multiple times and now the nvidia module is not loaded by the Xorg at all.

I don't use bbswitch. Instead I've created /etc/tmpfiles.d/nvidia_pm.conf file with:

w /sys/bus/pci/devices/0000:01:00.0/power/control - - - - auto

This switches on the kernel power management for the NVidia card. It depends on whether the nvidia module is loaded or not. The bumblebee loads the module, turning on the card when the optirun/primusrun is executed, but unfortunately it doesn't even try to unload it if bbswitch is not installed. But after manually unloading the module, the card turns off. The card is turned off after boot by default.

I have a question about this part. Intel drivers is installed with xf86-video-intel, right? Your solution work here only when the xf86-video-intel package is uninstalled. Dell xps 15 9570 her also. I'm using the forceunload branch you made a pullrequest with.
Many of you would ask why I want the xf86-video-intel package installed, but it looks like it is the only way my computer gets under 10W with powertop.
With xf86-video-intel I somehow get the known «pci 0000:01:00.0: Refused to change power state, currently in D3». Without that I understand how this should do something with the nvidia card.

Edit: it looks like xorg starts starts the nvidia driver if I don't mention a driver in 20-intel.conf. without xf86-video-intel the intel module is not found and I can't start a x. If I delete the 20-intel.conf X starts, but with nvidia module loaded

I have the xf86-video-intel driver installed. The error you're getting (refused to change power state) is caused by bbswitch, which you probably still have installed. Either uninstall it or blacklist it. I've started playing with nvidia-xrun which requires bbswitch to be installed, so I've had to blacklist it in the end by creating a file /etc/modprobe.d/bbswitch.conf with following content:

blacklist bbswitch
install bbswitch /usr/bin/false

The install line is needed because nvidia-xrun loads the bbswitch anyway. If you don't want to play with nvidia-xrun, then just uninstall bbswitch.

Never understood why it didn't work earlier, uninstalled bbswitch and everything and it didn't work. After a clean new arch install I had the same problem. I gave up. Tried again a day later and it worked, tried later the same day, it had stop working again. Started to wonder if I have to connect the computer to a charger? even if I disable tlp I get the same error. Big part of my testing have been at home without a charger connected.

About the clock speed I get a lot higher than you! I ran unigine-heaven and it oscillated around 1615-1620 MHz (???). Looks like they gave me the normal gtx1050 ti and not the MAX-Q version?

Edit: A new restart fixed it and made it work on battery....

Last edited by maxiix3 (2018-09-17 07:00:23)

Offline

#85 2018-09-18 07:49:50

setzer22
Member
Registered: 2014-07-26
Posts: 45

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

I can confirm the exact same problem happens on the new Dell G5 15 laptop. I was able to fix the issue by following the suggestions in this thread. Now I can use optirun/primusrun/nvidia-xrun and the nvidia card will get stopped when it's not necessary anymore. I'll leave a summary of the steps I followed because it took me a while to figure them out by just reading the thread.

- Removed bbswitch from the system
- Installed the forceunload branch of https://github.com/yawor/Bumblebee, replacing bumblebee from the official repositories. To do so, I used the following PKGBUILD adapted from AUR bbswithch-git: https://paste.pound-python.org/show/df1 … I4AzFxscj/
- Installed michelesr fork of nvidia-xrun using the PKGBUILD: https://paste.pound-python.org/show/Uax … Ve5U11ixm/
- Followed yaworski's suggestions, creating two files in xorg.conf.d and another in  tmpfiles.d, quoted below:

I've found a way to prevent Xorg from loading nvidia module on boot. I've created a /etc/X11/xorg.conf.d/01-noautogpu.conf file with

Section "ServerFlags"
    Option "AutoAddGPU" "off"
EndSection

Then the iGPU needs to be added manually. I've created a /etc/X11/xorg.conf.d/20-intel.conf file with:

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
EndSection

I've tested this multiple times and now the nvidia module is not loaded by the Xorg at all.

I don't use bbswitch. Instead I've created /etc/tmpfiles.d/nvidia_pm.conf file with:

w /sys/bus/pci/devices/0000:01:00.0/power/control - - - - auto

This switches on the kernel power management for the NVidia card. It depends on whether the nvidia module is loaded or not. The bumblebee loads the module, turning on the card when the optirun/primusrun is executed, but unfortunately it doesn't even try to unload it if bbswitch is not installed. But after manually unloading the module, the card turns off. The card is turned off after boot by default.

Offline

#86 2018-10-07 10:29:54

cdutsov
Member
Registered: 2018-10-07
Posts: 3

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

I have followed all the steps from the suggestions in the thread. That is:

-Removed bbswitch, installed forceunload branch of yawor's Bumblebee fork and created the xorg.conf.d and tmpfiles.d files. I see that this thread is for  Dell XPS 15 9570 laptops, but I seem to have the same problem on my Asus N580VD laptop with Nvidia GTX 1050 card. I have tried all possible packages: nvidia, nvidia-dkms, nvidia-39xx but haven't managed to run anything with optirun. I get the following errors in dmesg after trying to start optirun:

[  156.922085] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20180531/nsarguments-66)
[  160.922402] NVRM: RmInitAdapter failed! (0x31:0xffff:842)
[  160.922493] NVRM: rm_init_adapter failed for device bearing minor number 0
[  168.651853] NVRM: RmInitAdapter failed! (0x31:0xffff:842)
[  168.651899] NVRM: rm_init_adapter failed for device bearing minor number 0

I have also tried all variations of the kernel parameters: rcutree.rcu_idle_gp_delay=1 pcie_port_pm=off pcie_aspm=force modeprobe.blacklist=nouveau acpi_osi=Linux acpi=force acpi_enforce_resources=lax.
No matter what I try I get the following error:

118 [   168.643] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA GPU at PCI:1:0:0.  Please
119 [   168.643] (EE) NVIDIA(GPU-0):     check your system's kernel log for additional error
120 [   168.643] (EE) NVIDIA(GPU-0):     messages and refer to Chapter 8: Common Problems in the
121 [   168.643] (EE) NVIDIA(GPU-0):     README for additional information.
122 [   168.643] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA graphics device!
123 [   168.643] (EE) NVIDIA(0): Failing initialization of X screen 0

Could you please help me understand whats going on. Thanks!

PS: sorry for invading the thread with my Asus, but it seems to have similar hardware.

Offline

#87 Yesterday 08:39:44

LazyLucretia
Member
Registered: 2016-01-28
Posts: 24

Re: Dell XPS 15 9570 - bbswitch not working, Nvdia card won't power off/on

yaworski wrote:

I've found a way to prevent Xorg from loading nvidia module on boot. I've created a /etc/X11/xorg.conf.d/01-noautogpu.conf file with

Section "ServerFlags"
	Option "AutoAddGPU" "off"
EndSection

Then the iGPU needs to be added manually. I've created a /etc/X11/xorg.conf.d/20-intel.conf file with:

Section "Device"
	Identifier "Intel Graphics"
	Driver "intel"
EndSection

I've tested this multiple times and now the nvidia module is not loaded by the Xorg at all.

I don't use bbswitch. Instead I've created /etc/tmpfiles.d/nvidia_pm.conf file with:

w /sys/bus/pci/devices/0000:01:00.0/power/control - - - - auto

This switches on the kernel power management for the NVidia card. It depends on whether the nvidia module is loaded or not. The bumblebee loads the module, turning on the card when the optirun/primusrun is executed, but unfortunately it doesn't even try to unload it if bbswitch is not installed. But after manually unloading the module, the card turns off. The card is turned off after boot by default.

Unfortunately, this did not work for me. Nvidia is still loaded at boot. I'm using forceunload branch, xf86-video-intel and sddm. No bbswitch, tlp or nvidia-xrun is installed.

Update: I disabled SDDM and booted into a tty. Nvidia GPU was off. I started SDDM with 'systemctl start sddm', Nvidia was still off. Then I logged in to Gnome and gpu immediately turned on. Also tried logging in to Plasma, same result. I logged out, switched to tty, stopped sddm and card was still on. Had to manually unload nvidia with 'modprobe -r nvidia' to turn it off.

Update 2: I tried uninstalling xf86-video-intel. Now sddm does not start. 'Failed to read display number from pipe' error popped up in journalctl.

Last edited by LazyLucretia (Yesterday 13:11:51)

Offline

Board footer

Powered by FluxBB