Tag Archives: ubuntu19

Some problems encountered in using e200p solid state on Ubuntu 19 (failed command: write fpdma queue status: {drdy})

With multi-dimensional model as the core, let the factory digital transformation and upgrading “within reach”>>>

Problem description

I bought a Hikvision e200p SSD during the double 11 in 2019 and installed it on my computer four years ago. I’m going to make it fight for another five years. The operating system is windows 10 and Ubuntu 19. When I use Ubuntu 19, I will find that sometimes the hard disk light will be on for a long time, and then the computer will get stuck. I use the following command to view the log file

gedit /var/log/kern.log

I found that when my computer was stuck, there would be a lot of such log records

Nov 19 16:51:28  kernel: [ 1716.668534] ata2.00: exception Emask 0x0 SAct 0x4018c000 SErr 0x0 action 0x6 frozen
Nov 19 16:51:28  kernel: [ 1716.668544] ata2.00: failed command: WRITE FPDMA QUEUED
Nov 19 16:51:28  kernel: [ 1716.668556] ata2.00: cmd 61/20:70:e0:fb:7a/00:00:24:00:00/40 tag 14 ncq dma 16384 out
Nov 19 16:51:28  kernel: [ 1716.668556]          res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
Nov 19 16:51:28  kernel: [ 1716.668561] ata2.00: status: { DRDY }
Nov 19 16:51:28  kernel: [ 1716.668565] ata2.00: failed command: READ FPDMA QUEUED
Nov 19 16:51:28  kernel: [ 1716.668574] ata2.00: cmd 60/08:78:08:04:bc/00:00:25:00:00/40 tag 15 ncq dma 4096 in
Nov 19 16:51:28  kernel: [ 1716.668574]          res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
Nov 19 16:51:28  kernel: [ 1716.668578] ata2.00: status: { DRDY }
Nov 19 16:51:28  kernel: [ 1716.668582] ata2.00: failed command: WRITE FPDMA QUEUED
Nov 19 16:51:28  kernel: [ 1716.668591] ata2.00: cmd 61/38:98:18:41:cb/00:00:2d:00:00/40 tag 19 ncq dma 28672 out
Nov 19 16:51:28  kernel: [ 1716.668591]          res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Nov 19 16:51:28  kernel: [ 1716.668594] ata2.00: status: { DRDY }
Nov 19 16:51:28  kernel: [ 1716.668598] ata2.00: failed command: READ FPDMA QUEUED
Nov 19 16:51:28  kernel: [ 1716.668606] ata2.00: cmd 60/08:a0:48:30:ff/00:00:3b:00:00/40 tag 20 ncq dma 4096 in
Nov 19 16:51:28  kernel: [ 1716.668606]          res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Nov 19 16:51:28  kernel: [ 1716.668609] ata2.00: status: { DRDY }
Nov 19 16:51:28  kernel: [ 1716.668614] ata2.00: failed command: READ FPDMA QUEUED
Nov 19 16:51:28  kernel: [ 1716.668622] ata2.00: cmd 60/08:f0:f8:b1:78/00:00:1f:00:00/40 tag 30 ncq dma 4096 in
Nov 19 16:51:28  kernel: [ 1716.668622]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
Nov 19 16:51:28  kernel: [ 1716.668625] ata2.00: status: { DRDY }
Nov 19 16:51:28  kernel: [ 1716.668631] ata2: hard resetting link
Nov 19 16:51:28  kernel: [ 1716.983379] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Nov 19 16:51:28  kernel: [ 1716.983793] ata2.00: configured for UDMA/133
Nov 19 16:51:28  kernel: [ 1716.993891] ata2.00: device reported invalid CHS sector 0
Nov 19 16:51:28  kernel: [ 1716.993916] sd 1:0:0:0: [sda] tag#15 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Nov 19 16:51:28  kernel: [ 1716.993922] sd 1:0:0:0: [sda] tag#15 Sense Key : Illegal Request [current] 
Nov 19 16:51:28  kernel: [ 1716.993926] sd 1:0:0:0: [sda] tag#15 Add. Sense: Unaligned write command
Nov 19 16:51:28  kernel: [ 1716.993932] sd 1:0:0:0: [sda] tag#15 CDB: Read(10) 28 00 25 bc 04 08 00 00 08 00
Nov 19 16:51:28  kernel: [ 1716.993938] blk_update_request: I/O error, dev sda, sector 633078792 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
Nov 19 16:51:28  kernel: [ 1716.993967] sd 1:0:0:0: [sda] tag#20 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Nov 19 16:51:28  kernel: [ 1716.993971] sd 1:0:0:0: [sda] tag#20 Sense Key : Illegal Request [current] 
Nov 19 16:51:28  kernel: [ 1716.993974] sd 1:0:0:0: [sda] tag#20 Add. Sense: Unaligned write command
Nov 19 16:51:28  kernel: [ 1716.993978] sd 1:0:0:0: [sda] tag#20 CDB: Read(10) 28 00 3b ff 30 48 00 00 08 00
Nov 19 16:51:28  kernel: [ 1716.993982] blk_update_request: I/O error, dev sda, sector 1006579784 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
Nov 19 16:51:28  kernel: [ 1716.994000] ata2: EH complete

Setup steps

After many searches, it is found that it is possible to close NCQ, so try it: first, open grub file

sudo vi /etc/default/grub

Then add it at the end of grub file

GRUB_CMDLINE_LINUX="libata.force=noncq"

Finally, run the following code to update “/ boot/grub/grub. CFG”

sudo update-grub

after restarting , you can check whether NCQ has been closed through the following code

dmesg | grep NCQ

If the shutdown is successful, information such as not used will be displayed

[    1.313263] ata2.00: 2000409264 sectors, multi 16: LBA48 NCQ (not used)

Experimental results

In the day after NCQ was turned off, the hard disk light was not on for a long time, the computer was stuck, and the previous errors were not found in the log. I guess it may be the compatibility problem caused by the installation of relatively new system and SSD in my old computer . Finally, I hope the domestic products will get better and better