Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: AORUS NVMe Gen4 SSD - TRIM not working

  1. #11
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: AORUS NVMe Gen4 SSD - TRIM not working

    Are you running this command from within a virtual machine?
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  2. #12
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: AORUS NVMe Gen4 SSD - TRIM not working

    FYI,
    Phoronix benchmarked a PCIe 4.0 SSD on Ubuntu, so the NVMe driver does work - at least with the tested drive.
    https://www.phoronix.com/scan.php?pa...ce-mp600&num=1

    Note: The testing used the 5.2 kernel, so that might be what's needed.
    Last edited by Dennis N; July 21st, 2019 at 03:11 AM. Reason: added the note.

  3. #13
    Join Date
    Nov 2017
    Beans
    55

    Re: AORUS NVMe Gen4 SSD - TRIM not working

    Ongoing saga for fstrim. I Turned on kernel tracing for the nvme as per instructions from someone willing to help out. Unfortunately, the person helping doesn't know enough about error to help further, but are trying to enlist others to help.

    Could you collect logs via the following steps?

    Code:
    Suppose your nvme disk name is /dev/nvme0n1:
    
    1) queue limits log:
    
        #(cd /sys/block/nvme0n1/queue && find . -type f -exec grep -aH . {} \;)
    
    
    2) NVMe IO trace
    
    - enable nvme IO trace before running fstrim:
    
        #echo 1  > /sys/kernel/debug/tracing/events/nvme_setup_cmd/enable
        #echo 1  > /sys/kernel/debug/tracing/events/nvme_complete_rq/enable
    
    - run fstrim
    
    - after the fstrim failure is triggered, disable the nvme io trace & post the log:
    
        #echo 0  > /sys/kernel/debug/tracing/events/nvme_setup_cmd/enable
        #echo 0  > /sys/kernel/debug/tracing/events/nvme_complete_rq/enable
    
        #cp    /sys/kernel/debug/tracing/trace /root/nvme_io_trace.log


    thanks,
    Ming


    Hello Ming

    Thank you for the quick reply See attached
    From the IO trace, discard command(nvme_cmd_dsm) is failed:

    From the IO trace, discard command(nvme_cmd_dsm) is failed:

    kworker/15:1H-462 [015] .... 91814.342452: nvme_setup_cmd: nvme0: disk=nvme0n1, qid=7, cmdid=552, nsid=1, flags=0x0, meta=0x0, cmd=(nvme_cmd_dsm nr=0, attributes=4)
    <idle>-0 [013] d.h. 91814.342708: nvme_complete_rq: nvme0: disk=nvme0n1, qid=7, cmdid=552, res=0, retries=0, flags=0x0, status=8198

    And the returned error code is 0x8198, I am not sure how to parse the
    'Command Specific Status Values' of 0x98, maybe Christoph, Keith or our other
    NVMe guys can help to understand the failure.


    Thanks,
    Ming
    Last edited by backspin; July 23rd, 2019 at 11:15 PM.

  4. #14
    Join Date
    Nov 2017
    Beans
    55

    Re: AORUS NVMe Gen4 SSD - TRIM not working

    Quote Originally Posted by QIII View Post
    Are you running this command from within a virtual machine?

    Negative.. Only Ubuntu is on the drive.

  5. #15
    Join Date
    Nov 2017
    Beans
    55

    Re: AORUS NVMe Gen4 SSD - TRIM not working

    Quote Originally Posted by Dennis N View Post
    FYI,
    Phoronix benchmarked a PCIe 4.0 SSD on Ubuntu, so the NVMe driver does work - at least with the tested drive.
    https://www.phoronix.com/scan.php?pa...ce-mp600&num=1

    Note: The testing used the 5.2 kernel, so that might be what's needed.
    I would like to add your information to the people trying to help, but before I do I have some questions.

    Are you saying you have tried fstrim on this PCIe 4.0 SSD, and is not working?

    Thanks,

    David

  6. #16
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: AORUS NVMe Gen4 SSD - TRIM not working

    Phoronix didn't test trim - it's just performance benchmarking. My suggestion in the note is that a newer kernel is often needed to support all features of newest hardware. For that Corsair drive and yours, the vendor information I saw is that the drive supports trim. But maybe you need the latest kernel to make trim work.

  7. #17
    Join Date
    Nov 2017
    Beans
    55

    Re: AORUS NVMe Gen4 SSD - TRIM not working

    Quote Originally Posted by Dennis N View Post
    Phoronix didn't test trim - it's just performance benchmarking. My suggestion in the note is that a newer kernel is often needed to support all features of newest hardware. For that Corsair drive and yours, the vendor information I saw is that the drive supports trim. But maybe you need the latest kernel to make trim work.
    I've tried 3 different kernels including 5.2 rc7.

  8. #18
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: AORUS NVMe Gen4 SSD - TRIM not working

    Quote Originally Posted by backspin View Post
    I've tried 3 different kernels including 5.2 rc7.
    Well, I guess you've eliminated that cause. Two obvious possibilities come to mind - the fstrim utility needs updating to handle PCIe 4.0 drives, or it's the drive itself.

  9. #19
    Join Date
    Nov 2017
    Beans
    55

    Re: AORUS NVMe Gen4 SSD - TRIM not working

    Quote Originally Posted by Dennis N View Post
    Two obvious possibilities come to mind - the fstrim utility needs updating to handle PCIe 4.0 drives, or it's the drive itself.
    That's the 10k question at this point. I've opened a case with Gigabyte asking if there are any firmware updates, but will take 3-5 days to get back with me. I was hoping to see more people with PCIe 4.0 drives with issues so we could press this issue more, but appears this is bleeding edge for Ubuntu and the trim utility. I think another issue is I went off the beaten path by going with a Gigabyte SSD which is actually made by Phision, so this may be a while before it gets enough recognition to be fixed.

  10. #20
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: AORUS NVMe Gen4 SSD - TRIM not working

    Are you using an m.2 drive with adapter? If you have an unused PCIe 3 slot, you could move the adapter and drive to that and see if trim works with drive operating at PCIe 3 speed. These devices are supposed to be backward compatible.
    Last edited by Dennis N; July 24th, 2019 at 12:37 PM.

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •