Bug 204735 - nvidia gtx 1050 power back on with Suspend/Resume in deep method
Summary: nvidia gtx 1050 power back on with Suspend/Resume in deep method
Status: CLOSED WILL_NOT_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: ACPICA-Core (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: acpi_acpica-core@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-30 08:19 UTC by andyjackson
Modified: 2019-09-09 23:49 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.19.0-5-amd64
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description andyjackson 2019-08-30 08:19:22 UTC
i followed https://wiki.archlinux.org/index.php/Dell_XPS_15_9570 to make nvidia card poweroff after boot success. start another xserver using the dGPU try some opengl/vulkan test and exit the second xserver, kernel control the nvidia power on/off is fine. i'm using nvidia non-free driver V418 not nouveau.

  prevent nvidia kernel module loaded and echo 'auto' to 'pci bus .../power/control' to boot and login desktop is working, then suspend with default 'deep' method and resume, nvidia gpu power back on and never off, the '/sys/bus/.../powe/control' still keep in 'auto'.

  i change /sys/power/mem_sleep to s2idle then suspend/resume,nvidia card power not back on, kenrel control the power on/off works fine. but deep is better, right?

  in fact no need to start xserver just boot in single user mode, no load nvidia module and echo 'auto' to '/sys/bus/.../powe/control', nvidia gpu power is off, then suspend/resume in deep way, nvidia card power back on, so it's kernel bug i think. 

  i tried nouveau, bbswitch, kernel boot parm 'acpi_osi='!windows 2015', acpi_rev_override=5 etc, start x hangs, lspci hangs.

  intel i5-8300HQ + nvidia gtx 1050
  debian10 kernel 4.19.0-5-amd64
Comment 1 Zhang Rui 2019-09-09 03:09:46 UTC
(In reply to andyjackson from comment #0)
>   i tried nouveau, bbswitch, kernel boot parm 'acpi_osi='!windows 2015',
> acpi_rev_override=5 etc, start x hangs, lspci hangs.
> 
do you mean that you can not use nouveau driver on this machine? If yes, please file a bug at freedesktop to fix the graphics driver issue first.

(In reply to andyjackson from comment #0)
> i'm using nvidia non-free driver V418 not
> nouveau.

we can not help if you're using a non-free graphics driver, we only works on issues that can be reproduced with vanilla kernel first.
But if you can reproduce the problem with none nvidia driver, neither nouveau nor non-free driver, then this seems like something we need to work on.
Comment 2 andyjackson 2019-09-09 03:39:21 UTC
with nouveau login desktop ok, run lspci hangs, didnt try suspend/resume but i think will hangs too.

i think it's about kernel acpi control part to nvidia newer card not driver itself(nouveau or non-free). because blacklist nouveau and not install non-free driver, modprobe bbswitch module to poweroff nvidia pci bus success, then start x hangs, or lspci hangs, totally freeze can not log anything.  

with older nvidia gpu (k1100m or older) i didnt meet any acpi error(both nouveau or non-free) to startx, lspci, suspend/resume.
Comment 3 Zhang Rui 2019-09-09 04:57:19 UTC
(In reply to andyjackson from comment #2)
> with nouveau login desktop ok, run lspci hangs, didnt try suspend/resume but
> i think will hangs too.
> 
okay, then that is the first problem, which I think is more important.

> i think it's about kernel acpi control part to nvidia newer card not driver
> itself(nouveau or non-free). because blacklist nouveau and not install
> non-free driver, modprobe bbswitch module to poweroff nvidia pci bus
> success, then start x hangs, or lspci hangs, totally freeze can not log
> anything.

Let me summarize this,
1. what would happen if you run with intel graphics only?
x/lspci hangs, right?
2. what would happen if you run with kernel nvidia graphics driver?
lspci hangs, right?
3. what would happen if you run with intel graphics and non-free nvidia graphics driver?
nvidia graphics got powered on after resume, which is the problem in this bug report, right?

if this is the case, IMO, we should focus on the first two issues first. working on an graphics related issue with non-free driver and a broken graphics control (issue 1 and issue 2) is not a good idea.
Please file a bug to freedesktop.org, as we have graphics experts there, both nvidia and Intel.
Comment 4 Zhang Rui 2019-09-09 04:59:58 UTC
BTW, please try the latest upstream kernel, say, 5.3-rc8 to see if the first two issues are still there, because I've seen some progress in this page https://wiki.archlinux.org/index.php/Dell_XPS_15_9570 although I'm not sure if it fixes the first two issues or not.
Comment 5 andyjackson 2019-09-09 08:10:55 UTC
(In reply to Zhang Rui from comment #3)
> (In reply to andyjackson from comment #2)
> > with nouveau login desktop ok, run lspci hangs, didnt try suspend/resume
> but
> > i think will hangs too.
> > 
> okay, then that is the first problem, which I think is more important.

so it's not the driver issue but acpi driver part? more /sys/kernel/debug/vgaswitcheroo/switch see "1:DIS: :DynOff:0000:01:00.0", nvidia gpu already poweroff.

> Let me summarize this,
> 1. what would happen if you run with intel graphics only?
> x/lspci hangs, right?
> 2. what would happen if you run with kernel nvidia graphics driver?
lspci hangs, right?

my noteboot BIOS can not disable nvidia gpu like old notebook, so can not boot only with intel gpu. but try this: blacklist nouveau, boot as single user(add kernel parm:single) and login console, modprobe -r nouveau, at this time lspci or start x just fine because nvidia gpu is keep power ON. if modprobe bbswitch make nvidia gpu power OFF, lspci or startx got totally hangs.

> 3. what would happen if you run with intel graphics and non-free nvidia
> graphics driver?

no hangs, because nvidia gpu keep power ON, bbswitch can not power off it.

> nvidia graphics got powered on after resume, which is the problem in this
> bug report, right?

yes. and in my case i think when suspend nvidia gpu already power back ON.
Comment 6 andyjackson 2019-09-09 08:26:51 UTC
the point about my report is: followed https://wiki.archlinux.org/index.php/Dell_XPS_15_9570, boot and login desktop, at this time, non-free nvidia driver not loaded, nvidia gpu is power OFF by kernel acpi control. but suspend/resume  kernel acpi control have some bug make it power back ON and no power off, non-free nvidia driver still not loaded. 

i really think its acpi bug about pci bus power control.
Comment 7 Zhang Rui 2019-09-09 15:58:25 UTC
(In reply to andyjackson from comment #6)
> the point about my report is: followed
> https://wiki.archlinux.org/index.php/Dell_XPS_15_9570, boot and login
> desktop, at this time, non-free nvidia driver not loaded, nvidia gpu is
> power OFF by kernel acpi control. but suspend/resume  kernel acpi control
> have some bug make it power back ON and no power off, non-free nvidia driver
> still not loaded. 
> 
so there is no driver for nvidia graphics card all the time, right?
and the nvidia device power is controlled by the PCI bus code (which invokes the ACPI power control). And the problem is that it powers off nvidia device after boot but keeps it on after resume, right?
Comment 8 andyjackson 2019-09-09 23:49:56 UTC
(In reply to Zhang Rui from comment #7)

> so there is no driver for nvidia graphics card all the time, right?
> and the nvidia device power is controlled by the PCI bus code (which invokes
> the ACPI power control). And the problem is that it powers off nvidia device
> after boot but keeps it on after resume, right?

YES

Note You need to log in before you can comment on or make changes to this bug.