Guide for using Niagara 4.3 to set 12g speed in firmware limited HGST sas3 drives

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.
Jun 22, 2015
91
61
18
This guide is for people who either don't understand firmware manual (like me) or simply don't have time to dig through the long Niagara software guide to find the answers. I simply stole the idea from jcl333 who posted his solution on Windows in the Deals section. The tests were run on a D51B-2U with Ubuntu 20.04. The drives are HUSMH8020BSS204 with firmware C250 made in first half of 2015. The procedure has also been reported to work on Fedora 33.

For preparation, you need to connect the drives in JBOD modes so that the drives are exposed to the OS. You do not necessarily need to de-allocate the drives however. I took some drives from a raid 10 array in HP server and performed the change before putting them back and everything was normal. I also did this on a zfs array created by Proxmox on the same server by simply booting to Ubuntu. But I stress that it's always a good idea to do a full backup before you do this!

1) First step is to download the Niagara 4.3 release for Linux from ftp://ftp.abacus.cz/distribuce/HGST/Niagara/4.3/Linux/. Download the file: niagara_customer_inst-4.3.tar.

2) My system is not a 100% fresh install Ubuntu 20.04, but pretty close. I normally install 20.04 server, then install ubuntu-desktop. So your mileage may vary here. If you encounter problems you can post it here. For me the following installation was pretty automatic. First untar the tar file. There will be two files in the directory. Then simply run the script:
Code:
sudo ./niagara_customer_inst-4.3.sh
The script automatic installs necessary Ubuntu packages for Niagara as well as installing Niagara files into the system.

3) Niagara checks the system date and if it sees that the time is too long after the release date it will not run and ask the user to upgrade the software. Since we only use it for tweaking old drives before the release date it doesn't concern us. One solution is to disable auto system time adjustment in "Date and Time" panel in Ubuntu setting. And then back dating the time to 2018. Using October 2018 worked for me.

4) Now you can launch Niagara by typing:
sudo niagara-customer
and this window will appear:
launcher.png

The default driver SG worked for me so you can just click "Launch Niagara".

4) This window will appear:
selection.png

You can see that in the "Device List" panel on the left five HGST drives are listed. But Niagara sometimes can remove some drives from the list for whatever reason. In this case you need to use middle button to click on the white highlighted area until the "Lock Devices" window appears like in this picture:
restore.png

In the picture you see that one of the HGST drives is in the "Removed Drives" list, by clicking on the "Restore non-system drive" button you can restore the drive to the drive selection list. If you don't want to operate on a drive, you can also click "Remove Device" to remove the device from any operation.

5) On the lower right panel in the first window of step 4), there is a "Mode Fields" button. You can click on it, which brings out this window:

modefields.png

In this window, first select in the "Mode Pages" panel the entry: "0x19_01 : PHY Control And Discover" entry. At lower left select: Options: Decimal; (You can also select Hex here, but need to change the values below accordingly). At "Drive" selection select "Saved", and "Save Pages".

6) You can now edit the fields that governs the maximum SAS speeds that's governed. There are four fields at the right panel: "<PHY 1> Programmed Maximum Physical Link Rate", "<PHY 1> Hardware Maximum Physical Link Rate", and "<PHY 2> Programmed Maximum Physical Link Rate", "<PHY 2> Hardware Maximum Physical Link Rate". You have to change the values of ALL the four fields from 10 to 11. (If you had selected Hex format above, change from 0x0A to 0x0B).

7) Now click "ModeSelect" button to save to drive.

8) Repeat this to all the drives in the "Device List" window in step 4)

9) For verification on drive performance you can simply use hdparm to see the speed bump:
Code:
sudo hdparm -Tt /dev/sd<x>
The buffered read speed should increase to be above 800MB/s

Now you are done!
 
Last edited:
Jun 22, 2015
91
61
18
Oh sorry found tons of small errors. Will correct later and add some more info. Please post suggestions here too. thanks
 

jcl333

Active Member
May 28, 2011
253
74
28
Just noticed this post, thanks for the cred, and thanks for creating an actual guide.

-JCL
 

james23

Active Member
Nov 18, 2014
441
122
43
52
wow! thanks for this guide! this helped me resolve my 8x 1.6tb HUSMM HGST drives i received /bought from ebay, only linking at sas2 speeds (6.0gbps) - im using a 3008 HBA in IT mode, and my supermicro backplane is sas3 (24bay 2.5", direct attached BP). I had assumed they were linked at sas3, but my benchmarks did not seem correct, when i was comparing several similar drives.

Through the bios on this supermicro x11 board i was able to access the 3008 HBA and see that these HUSMM1616ASS204 drives were only connecting at sas2 ! (yet i had a few other drives showing up as sas3/12gbit, so i was pretty sure it was a drive-specific issue):

before:
1676071232447.png

after (following this guide):
1676071255786.png

For those wondering, i was able to follow all the steps in this post, using an ubuntu 20 live CD (live usb stick) only 2x notes to be aware of:
1- dont change the clock (back to oct 2018) until AFTER the niagra install is fully done (ie change it right before you run sudo niagara-customer
2- i had to add 1x repo to my /etc/apt/sources.list (as xterm was failing to find a source during the sudo ./niagara_customer_inst-4.3.sh install).
deb Index of /ubuntu bionic main universe
so googling lead me to this repo, which i added and was able to proceed.

Also it seems there is a windows version of Niagara, in this particular case that would have been quicker for me to use, but perhaps there is a reason OP used the linux version here.

(btw- after following the steps, my drives did NOT show sas3 speeds, UNTIL they were restarted - which makes sense, but FYI).
thanks again!
 
  • Like
Reactions: gb00s and yukas

kagerou_el7

New Member
Oct 11, 2021
5
3
3
Nice manual! Thanks.
Niagara GUI is user-friendly but requires too much tasks before running...

so I write simple script - using some sdparm command line.

This script changes Max negotiated link speed param [0x19, 0x01 offset 0x29 and 0x59] (0x0A) to 0x0B.
literally same work with Niagara gui.

Example:
Bash:
#!/bin/bash

sdparm -p 0x19,0x01 --set=0x29:0:1=1 -t sas -S /dev/sdi
sdparm -p 0x19,0x01 --set=0x29:4:1=1 -t sas -S /dev/sdi
sdparm -p 0x19,0x01 --set=0x59:0:1=1 -t sas -S /dev/sdi
sdparm -p 0x19,0x01 --set=0x59:4:1=1 -t sas -S /dev/sdi

sdparm -p pcd -l /dev/sdi

Revert to 0xA:
Bash:
#!/bin/bash

sdparm -p 0x19,0x01 --set=0x29:4:1=0 -t sas -S /dev/sdi
sdparm -p 0x19,0x01 --set=0x29:0:1=0 -t sas -S /dev/sdi
sdparm -p 0x19,0x01 --set=0x59:4:1=0 -t sas -S /dev/sdi
sdparm -p 0x19,0x01 --set=0x59:0:1=0 -t sas -S /dev/sdi

sdparm -p pcd -l /dev/sdi
I tested in DELL R730, HBA Mode H730P adapter, and CentOS 7.
maybe work with another adaptors - SAS9211, SAS9300, SAS9400 IT etc...

I wishes to helpful someone.
 

starshipeleven

New Member
Dec 10, 2019
2
2
3
so I write simple script - using some sdparm command line.
Just done the console commands from your post to enable 12gbit mode in a batch of 1.6TB Hitachi sas SSDs
Product: HUSMM141CLAR1600
Revision: C350

After I gave the console commands I had to pull the drives and insert again to make them re-negotiate to 12Gbit speed.

Thanks everybody
 
  • Like
Reactions: kagerou_el7

BeTeP

Well-Known Member
Mar 23, 2019
657
433
63
This script changes Max negotiated link speed param [0x19, 0x01 offset 0x29 and 0x59] (0x0A) to 0x0B

This script does not change NLLR (negotiated logical link rate) directly. It changes PMALR (programmed maximum link rate) instead which affects the NLLR on the next enumeration. Also there is no need to change the values bit by bit. Just set the whole field with a single command:

Code:
sdparm -t sas -p pcd -s PMALR.0=11,PMALR.1=11 -S /dev/sdX
 

M041633ns

New Member
Jan 3, 2024
1
0
1
How do I use niagara in windows. It only shows the internal hdd in ata mode and not the USB to SATA. It only shows the hdd on SPTI. BTW I am using Niagara 4.3.