Suspend with NVME not working - Default Debian
#1
Suspend stopped working after I installed an NVME drive.  It appears the PBP goes into suspend.   The screen goes black and the led turns red.  However, when pressing the power button the PBP will never wake up again.  I have to hold the power button 6 seconds to reset it and then boot from scratch.
 
The drive I installed was the Intel 660p SSDPEKNW512G8X1 

I am setting power limiting on boot.  I added "sudo nvme set-feature /dev/nvme0 -f 2 -v 2" in /etc/rc.local and have verified that it is setting the feature correctly on boot.

Any ideas how to troubleshoot?  Has anyone else gotten suspend to work with an NVME drive installed?
  Reply
#2
This is probably related to the same nvme issues I solved for Linux on the Macbook Pro, recently. The drive would "sleep" but then resume as read-only - with unpredictable effects!

The Macs don't support APST, and many nvme units also seem to be "idiosyncratic" about implementations. The fix is to "turn-off" the ability of the kernel to impose sleep states on hardware that does not conform.

After researching a bit about this, my solution was:
echo 0 > /sys/bus/pci/devices/0000\:01\:00.0/d3cold_allowed

This is now featured on the authoritative  Dunedan /mbp-2016-linux github: https://github.com/Dunedan/mbp-2016-linux

This needs to be done in a root shell, sudo user won't cut it. You can elevate by runing 'sudo su -' and have a root shell, without additional login process.
I'd seriously give this a shot, AFTER you determine with lspci the actual device number for your nvme.

If this solves your problem, I supplied scripts and a systemd service wrapper, so you may automate at boot:
https://github.com/cb22/macbook12-spi-dr...-540208177

Create this file:

Quote:/etc/systemd/system/fix_sleep.service

# systemd oneshot service to set sleep boolean on Apple Macbook Pro disks
# Original by Pier Lim. Posted at https://kerpanic.wordpress.com/2018/03/1...in-ubuntu/

   [Unit]
   Description=Job that disables sleep from stopping nvme hardware on MBP
   
   [Service]
   ExecStart=/sbin/fixsleep
   Type=oneshot
   RemainAfterExit=yes

   [Install]
   WantedBy=multi-user.target


And the actual script:

Quote:/sbin/fixsleep

#!/bin/bash
/bin/echo 0 > /sys/bus/pci/devices/0000\:01\:00.0/d3cold_allowed

If you try this out, I'd love to hear how it goes.
— Jeremiah Cornelius
"Be the first person not to do some­thing, that no one has thought of not doing before’’
— Brian Eno, "Oblique Strategies"
  Reply
#3
(02-06-2020, 08:06 PM)Jeremiah Cornelius Wrote: This is probably related to the same nvme issues I solved for Linux on the Macbook Pro, recently. The drive would "sleep" but then resume as read-only - with unpredictable effects!

The Macs don't support APST, and many nvme units also seem to be "idiosyncratic" about implementations. The fix is to "turn-off" the ability of the kernel to impose sleep states on hardware that does not conform.

After researching a bit about this, my solution was:
echo 0 > /sys/bus/pci/devices/0000\:01\:00.0/d3cold_allowed

This is now featured on the authoritative  Dunedan /mbp-2016-linux github: https://github.com/Dunedan/mbp-2016-linux

This needs to be done in a root shell, sudo user won't cut it. You can elevate by runing 'sudo su -' and have a root shell, without additional login process.
I'd seriously give this a shot, AFTER you determine with lspci the actual device number for your nvme.

If this solves your problem, I supplied scripts and a systemd service wrapper, so you may automate at boot:
https://github.com/cb22/macbook12-spi-dr...-540208177

Create this file:

Quote:/etc/systemd/system/fix_sleep.service

# systemd oneshot service to set sleep boolean on Apple Macbook Pro disks
# Original by Pier Lim. Posted at https://kerpanic.wordpress.com/2018/03/1...in-ubuntu/

   [Unit]
   Description=Job that disables sleep from stopping nvme hardware on MBP
   
   [Service]
   ExecStart=/sbin/fixsleep
   Type=oneshot
   RemainAfterExit=yes

   [Install]
   WantedBy=multi-user.target


And the actual script:

Quote:/sbin/fixsleep

#!/bin/bash
/bin/echo 0 > /sys/bus/pci/devices/0000\:01\:00.0/d3cold_allowed

If you try this out, I'd love to hear how it goes.

My output from lspci:


Code:
00:00.0 PCI bridge: Device 1d87:0100
01:00.0 Non-Volatile memory controller: Intel Corporation Device f1a8 (rev 03)

Do I have to modify that command with this information somehow?
  Reply
#4
I tried this and it didn't work. I did sudo su,then from there I ran the command and hit suspend and the same wake issue occurred.
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Built-in Webcam Not Working fozzedout 6 197 1 hour ago
Last Post: Jazzband
  Default OS update log Luke 190 43,691 9 hours ago
Last Post: xmixahlx
  New PBP - WiFi not working! ashwinpatel 6 116 11 hours ago
Last Post: carlosqueso
  Games compilation howto on the Pinebook-pro (Manjaro Linux and Debian native) astr0baby 128 15,804 06-05-2020, 02:48 PM
Last Post: astr0baby
  DOA — power light but screen not working Inklings 4 139 06-04-2020, 08:34 AM
Last Post: Jantje
  MakeHuman working? charlespine 0 45 06-03-2020, 06:36 PM
Last Post: charlespine
  extracting debian to SD jbradley419 1 57 06-03-2020, 05:56 AM
Last Post: khanku
  How do you upgrade Chromium on default Debian that came with my PBP james64 6 235 05-26-2020, 07:21 AM
Last Post: rick1959
Photo Looking for a PBP NVMe/SSD cable ab1jx 12 424 05-03-2020, 10:44 AM
Last Post: ab1jx
  Possible Software To Debian PBP From Debian Intel jcj52436999 1 118 04-28-2020, 06:15 AM
Last Post: tophneal

Forum Jump:


Users browsing this thread: 1 Guest(s)