You are not logged in.

#26 2018-07-06 15:44:25

michelesr
Member
Registered: 2016-02-04
Posts: 5

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

Look at this discussion as well: https://github.com/Bumblebee-Project/Bu … issues/764, in particular a comment by dosyoyas, there seems to be a workaround to make bumblebee work with this card.

Offline

#27 2018-07-06 23:13:07

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

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

I had a systemfreeze indeed when running lspci, but that was before bios 1.2.2 / Linux 4.17. Right now without overrides I have no issue.

Anyways, michelesr, which acpi_calls are you using to turn the card off? Since I think bbswitch can turn on/off the system for me, I just have issues loading nvidia after I do. If we can switch to using ACPI calls (this is an option with bumblebee btw), then we can start using that.

Offline

#28 2018-07-07 22:41:03

Zeben
Member
Registered: 2015-08-26
Posts: 4

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

I have the same issues with Dell Vostro 5459 with its dGPU and recent ( > 4.16.11) Linux kernels.
The answer I described is here, in bbswitch's issue tracker: https://github.com/Bumblebee-Project/bb … -403246647
TL;DR:
1. bbswitch module fails with traceback in dmesg when I try to restart bumblebeed;
2. optirun stops working after AC adapter unglugging;
3. dGPU enables and keeps working after I starting VLC, watching some videos and even after closing VLC. When I'm trying to restart bumblebeed - the module falls again and dGPU keeps powered on.
C: as a temporary conclusion for me at the time is just rollback to Linux 4.16.12 with nvidia-dkms module.

Offline

#29 2018-07-09 10:55:29

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

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

michelesr wrote:

Look at this discussion as well: https://github.com/Bumblebee-Project/Bu … issues/764, in particular a comment by dosyoyas, there seems to be a workaround to make bumblebee work with this card.

dosyoyas has stated that he's been using kernel version 4.15 with Ubuntu 18.04, this might be why it is working for them.

Offline

#30 2018-07-10 14:06:33

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

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

I have indeed been keeping an eye on the conversations, though I have not had time to fiddle myself. dosyoyas solution is based on Ubuntu, an older kernel, and I don't think it will work for me, though setting library path might be something to keep in mind. And his acpi_osi settings and the GLX setting could work for us (once I figure out what they do).

I had a short chat with Lekensteyn on IRC, which suggests that the pm-rework branch is working fine for us, and we should start looking at the module loading by bumblebee / nvidia-xrun.

[13:41] <IngeniousDox> Lekensteyn: Your pm-rework branch without the last commit, is that basically everything that is needed to use runtime-pm for newer nvidia cards? I mean is it finished or were you planning to do more work on it?
[13:43] <IngeniousDox> I have a Dell XPS15 9570 and we are trying to figure out what is needed to make it work with newer 4.17 kernel, since normal bbswitch doesn't.
[13:44] <Lekensteyn> IngeniousDox: yes it should work
[13:44] <IngeniousDox> (Not looking to bugreport it here, just ruling out incomplete implementation / production readyness)
[13:44] <IngeniousDox> https://bbs.archlinux.org/viewtopic.php?id=238389
[13:44] <Lekensteyn> I originally wanted to make it compatible with configurations that have a HDMI/DP audio function (hence the vgaswitcheroo integration), but I never finished that
[13:45] <Lekensteyn> do you actually want to combine with bumblebeed?
[13:45] <IngeniousDox> Yeah, it doesn't compile / work on Arch, so I make a PKGBUILD without that last commit. bbswitch seems to work. (I'm new at laptops with it, so still learning)
[13:46] <Lekensteyn> ok, I am using nouveau w/o bumblebee/bbswitch atm since it integrates nicely
[13:46] <IngeniousDox> However, getting some issues with modules that can't be loaded unloaded. Something about nvlink / ipmi. I think setting acpi_osi=XXX might fix that...I'll check on that further.
[13:46] <Lekensteyn> before xorg 1.20 multi monitor worked too, but since 1.20 something unfortunately broke (somewhere on the todo list)
[13:47] <Lekensteyn> I've no idea about nvlink/ipmi, sorry :/
[13:47] <Lekensteyn> since you mentioned the XPS, at least with the XPS 9560 you had to boot with acpi_osi=... as a workaround
[13:47] <IngeniousDox> Does bbswitch unload nvidia modules?
[13:47] <Lekensteyn> bbswitch does not unload nvidia, that is done by bumblebeed
[13:47] <Lekensteyn> bbswitch is the kernel module which is controlled by the bumblebeed userspace program
[13:48] <IngeniousDox> Aha, then there we go, the issue might be in bumblebee and your new pm-rework works fine. 
[13:49] <IngeniousDox> I tested a lot of different acpi_osi= with normal bbswitch, I'm going to retry them with pm-rework.
[13:50] <IngeniousDox> And there is a lot of info about other people having issues with 4.17, that are either not using bbswitch anymore (just using pm-suspend from TLP / LMT). etc etc... I'll keep fiddling.
[13:52] <Lekensteyn> seems reasonable, for newer devices, runtime PM should be enough
[13:52] <IngeniousDox> Its just bumblee then that has trouble unloading nvidia modules, since they are being used by another module I guess..and enabling fails perhaps due to similar reasons.
[13:52] <IngeniousDox> I guess thats where the acpi_osi=XXX comes in, that might not load those modules.
[13:53] <Lekensteyn> bumblebee needs to be updated to use that runtime PM approach. The issue is that older devices do not work with that approach and need something like bbswitch
[13:54] <Lekensteyn> if unloading kernel modules fails with "module still in use", then using acpi_osi will probably not make a difference in solving that problem
[13:54] <Lekensteyn> my guess is that Xorg is somehow using it (you can check with lsof against the device nodes in /dev/)
[13:54] <Lekensteyn> the acpi_osi addition is needed to workaround an issue where the hardware fails to power on and causes a hang/lockup in the ACPI subsystem in the kernel
[13:55] * Lekensteyn lunch
[13:55] <IngeniousDox> I'll have to look into this more, but that information is available. Thx for your time.
[13:55] <IngeniousDox> We will figure it out.

I won't have time to test more till this weekend, but I want to confirm with powertop (and /sys/ output) that bbswitch correctly sets dGPU in suspend. I think this is the case though, it would confirm our problem no longer is in bbswitch, but with bumblebee itself, specifically the loading/unloading of modules. I figure our solution will end up being one of these:

1) Use older kernel (lts perhaps), disable pcie_port_pm, and normal bbswitch. (This option I do not want to use)

2) Use current kernel, and bbswitch with pm-suspend. Figure out why nvlink / ipmi modules are loaded, then make sure nvidia module loads correctly. Things to check: Library path? acpi_osi=XXX? acpi_rev_override=? Blacklisting certain modules?

3) Use current kernel, without bbswitch, but with LMT/TLP to manage pm-suspend. Load/unload nvidia modules by hand, or by bumblebee (it should be possible), when we want to use it. Not sure if this will work with X-run since that still seems to be using bbswitch, but I guess we can turn that off somehow.

I would prefer to get 2) or 3) working myself. If you have time to look it before me, and figure it out, please let me know. wink


Dox


PS: I'm also looking at https://aur.archlinux.org/packages/nvidia-prime/ which, though outdated, could be OK as well. Perhaps update it so it uses v0.8.8. Though this means nvidia-gpu is always on when you select PRIME, but at least you can easily switch between everything on iGPU with dGPU off, and nvidia PRIME.

PS2: https://github.com/Fincer/nvidia-xrun/b … vidia-xrun is a fork of nvidia-xrun that is in the process of being integrated with nvidia-xrun, this is an improvement that is interesting since it provides an alternative to using "optirun" that can be run in the current X environment.

Last edited by IngeniousDox (2018-07-10 14:17:05)

Offline

#31 2018-07-11 09:21:39

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

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

I don't know much about internal workings of the kernel, drivers, modules, bumblebee and other stuff involved in this issue. However, my understanding is that, one cannot unload nvidia modules without completely terminating the GUI since it's utilizing those modules. When I tried to do it manually, I had to log out, swıtch to a tty and terminate all GUI sessions before unloading nvidia and loading back nouveau. How did Bumblebee achive this in older kernels, is a complete mistery for me.

Offline

#32 2018-07-11 09:41:54

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 4,922

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

Bumblebee achieves this because it opens up another "hidden" xserver where the graphics card renders into, the result of that is then copied over to the x server displayed on your intel card. If you close the window being rendered by that hidden x server bumblebee can cleanup that connection and unload the nvidia module. There's some more specific magic going on as to how it is able to copy the buffers, however the gist of how it works is as explained.

FWIW if the underlying issue is that you get a freeze with modern pcie pm when trying to load the nvidia driver, you can simply blacklist the PCI bus the nvidia card is on. E.g. TLP will do that by default, so that bbswitch and co can use the traditional method to disable power (that still works on many systems, Dells seem to be a special outlier here)

FWIW in regards to that, nvidia-xrun (or nvidia-prime for that matter) won't make a difference, nvidia-xrun doesn't do anything that isn't explained in https://wiki.archlinux.org/index.php/NV … ing_nvidia already. It simply redelegates that to a specifically started x server. None of these approaches have anything to do with/or have differences in handling the power management problem.

Offline

#33 2018-07-15 20:28:03

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

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

IngeniousDox wrote:

I had a systemfreeze indeed when running lspci, but that was before bios 1.2.2 / Linux 4.17. Right now without overrides I have no issue.

Anyways, michelesr, which acpi_calls are you using to turn the card off? Since I think bbswitch can turn on/off the system for me, I just have issues loading nvidia after I do. If we can switch to using ACPI calls (this is an option with bumblebee btw), then we can start using that.

I went ahead and tried using acpi_call to turn card off dGPU as described in here: https://wiki.archlinux.org/index.php/hy … _acpi_call And I got this output when I ran 'sudo /usr/share/acpi_call/examples/turn_off_gpu.sh':

Trying \_SB.PCI0.P0P1.VGA._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.P0P2.VGA._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB_.PCI0.OVGA.ATPX: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB_.PCI0.OVGA.XTPX: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.P0P3.PEGP._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.P0P2.PEGP._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.P0P1.PEGP._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.MXR0.MXM0._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.PEG1.GFX0._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.PEG0.GFX0.DOFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.PEG1.GFX0.DOFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.PEG0.PEGP._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
works!
Trying \_SB.PCI0.XVR0.Z01I.DGOF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.PEGR.GFX0._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.PEG.VID._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.PEG0.VID._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.P0P2.DGPU._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.P0P4.DGPU.DOFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.IXVE.IGPU.DGOF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.RP00.VGA._PS3: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.RP00.VGA.P3MO: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.GFX0.DSM._T_0: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.LPC.EC.PUBS._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.P0P2.NVID._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.P0P2.VGA.PX02: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB_.PCI0.PEGP.DGFX._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB_.PCI0.VGA.PX02: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.PEG0.PEGP.SGOF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed
Trying \_SB.PCI0.AGP.VGA.PX02: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
failed

tl;dr:

Trying \_SB.PCI0.PEG0.PEGP._OFF: /usr/share/acpi_call/examples/turn_off_gpu.sh: line 39: warning: command substitution: ignored null byte in input
works!

and the rest has failed.
However, when I checked with powertop, my dGPU was still on. It's worth mentioning that I ran this script while I was using nvidia with bumblebee and without bbswitch. I will try without bumblebee or with nvidia-xrun as soon as possible.

Last edited by LazyLucretia (2018-07-15 20:30:29)

Offline

#34 2018-07-17 14:23:32

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

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

Yes, V1del, nvidia-xrun or prime shouldn't make a difference, but we were discussing it because this thread was first named slightly more general at first. Then we changed the name since we thought our issue was with bbswitch. Which it in fact was, till we started using the pm-suspend branch. Perhaps it is time to rename it again. Since our issue now is with loading/unloading nvidia modules.

Anyways, back to business: Confirming that using bbswitch with the pm-suspend branch actually works for our XPS15 9570. I have just had time to check it. bbswitch correctly disables / enables the nvidia dGPU (checked with Powertop).

I'm using Bumblebee to disable it on boot. On top of that, I have TLP running and I don't even Blacklist the pci-e of the nvidia driver, it seems TLP isn't disabling the dGPU again after I turn it on with bbswitch, so this is working nicely together it seems.

Now I'm going to work on the module problem, since Bumblebee doesn't actually work yet. But I wanted to post, since you were trying out ACPI calls, and I don't think we need to look that way anymore.

Offline

Board footer

Powered by FluxBB