NVMe Tuning
#11
@Redbeard,
Does the new setting survive a reboot?
Does the new setting survive a power cycle?

If it does, then perhaps that drive does not need the saving option.

If it does not save it, you can always add a startup script to make it semi-permanent. (Obviously, on a desktop it's not that critical. I am referring to if you used the same NVMe drive in a Pinebook Pro.)
--
Arwen Evenstar
Princess of Rivendale
  Reply
#12
(01-11-2020, 10:27 PM)Arwen Wrote: @Redbeard,
Does the new setting survive a reboot?
Does the new setting survive a power cycle?

If it does, then perhaps that drive does not need the saving option.

If it does not save it, you can always add a startup script to make it semi-permanent. (Obviously, on a desktop it's not that critical. I am referring to if you used the same NVMe drive in a Pinebook Pro.)

Unfortunately it doesn't survive a power cycle.   I suspect the smaller capacity versions of the same drive listed in the wiki and discussed in the forum have the same limitation.   If I end up using that drive in the PBP I'll set up a startup script as you suggest.  I've never set one up but I assume I can pretty easily Google how to do so.  It would have to run as root.  Do you know if that is an issue?
  Reply
#13
@Redbeard, yes, startup scripts need to run as root, and that's not a problem.
The exact nature of the the startup script varies depending the OS.
--
Arwen Evenstar
Princess of Rivendale
  Reply
#14
(01-12-2020, 11:32 PM)Arwen Wrote: @Redbeard, yes, startup scripts need to run as root, and that's not a problem.
The exact nature of the the startup script varies depending the OS.

Thanks again.

I just got this working by creating a cron job at boot.  From the terminal, I typed: 


Quote:sudo crontab -e

In the editor, I added the following line to the end of the file (just past the last commented line):


Quote:@reboot sudo nvme set-feature /dev/nvme0 -f 2 -v 2

I then exited, saving the edit.  After a reboot I ran the following to confirm that it worked:


Quote:sudo nvme get-feature /dev/nvme0 -f 2

It came back with:


Quote:get-feature:0x2 (Power Management), Current value:0x000002

Which shows that it is working.  I tested this after both a restart and a boot after shutting down entirely, and it worked both ways.  

One thing I did find is that if I used the -s switch in this situation not only does it throw an error that it can't process the save, but the entire command appears not to function.  I originally made the mistake of including the -s switch when I first edited crontab, and when I did that the power state wasn't set after reboot.  So if someone tries this and it comes back with "Current value:00000000" after rebooting, double check that the -s switch isn't included in the crontab line.
  Reply
#15
nice work redbeard
Linux n00b trying to learn.
Brute force and ignorance sometimes works!
| Pinebook Pro + Toshiba OCZ RC100 240GB |
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  NVME SPI Update not booting SD Card WZ9V 5 561 10-18-2020, 08:36 PM
Last Post: wdt
  NVMe-related crashes and instability, plus a solution simonsouth 7 443 10-13-2020, 11:48 PM
Last Post: xmixahlx
  nvme drive disappears after about an hour of uptime codebreaker 9 527 10-01-2020, 09:52 AM
Last Post: simonsouth
  Possible to upgrade PBP with NVMe M.2 1TB SSD from Sabrent? kkdao 15 1,749 08-22-2020, 05:20 AM
Last Post: kkdao
  LTE adapter via NVMe grego 2 523 07-08-2020, 01:37 PM
Last Post: manawyrm
  Pro NVMe adapter Does not fit ! ? bcnaz 110 18,137 07-03-2020, 10:51 PM
Last Post: xmixahlx
  NVME problem chaoskampf 2 549 07-01-2020, 09:10 AM
Last Post: chaoskampf
  PBP with NVMe installed - Issues booting to SD eluno1 2 534 06-05-2020, 09:33 AM
Last Post: eluno1
Lightbulb Hacking the Ill-Fitting NVMe Adapter diodelass 0 381 06-03-2020, 03:15 PM
Last Post: diodelass
  NVMe SSD Interface Adapter linuxfreund 1 527 06-02-2020, 06:31 AM
Last Post: tophneal

Forum Jump:


Users browsing this thread: 1 Guest(s)