Former title: SSD having issues after I filled up its storage

I wrote this poorly last time so here’s a more clear description: Hey all, so I filled my SSD up on Linux Mint and it’s running sluggishly. I deleted more than half of my storage but there’s still issues. It can read / write fast according to my inexperienced testing and I have trimmed it (to my knowledge) but there’s still issues. Loading up programs now takes 30 seconds (even something like VLC which typically took like 0.5 seconds). Loading new audio files into VLC can take 10 seconds. I have checked my system monitor and nothing seems out of place. Also, when the program starts running, it runs perfectly. The computer itself is fast but loading anything new takes ages. Does anyone have any ideas? It’s a new laptop, not even two months old.

Edit: This is somehow, and strangely, a Flatpak issue apparently? It was triggered either by a full SSD or the new Linux Mint 21.3 Cinnamon update.

Edit 2: Interesting experiment result

‘it took 30 seconds but this got outputted and then the file ran: dave@dog: ~$ flatpak run org.x.Warpinator Gtx-Message: 14:29:03.389: Failed to load module “xapp-gtk3-module” Using landlock for incoming file isolation’

It appears there’s either a xdg-desktop-portal-gtk and/or xdg-desktop-portal-gnome error and I’m not alone, Mint and Arch users are both reporting it as of recent strangely???

This was a real sneaky fu(ker as it dodged all logical system testing. The only reason I caught it was cause it was suspicious how fast system programs booted and how flatpaks booted like sh(t. Not sure if I’m even right about the module, but I’m highly suspicious

Some comment mentioned this and it explained it well: Random shot, because it’s probably not an issue on Mint like it was on Arch a few months ago, but xdg-desktop-portal problems can cause apps to take forever to load, but run fine once loaded.

edit: Try removing xdg-desktop-portal-gtk and/or xdg-desktop-portal-gnome

  • f00f/eris@startrek.website
    link
    fedilink
    English
    arrow-up
    10
    ·
    edit-2
    11 months ago

    It still sounds to me like something’s up with the disk. Can’t think of any solutions to suggest but I would run a SMART health check on it:

    sudo apt install smartmontools  
    sudo smartctl -a /dev/sda
    

    If you prefer a graphical tool, you can do the same thing with GNOME Disks, which also has options for disk benchmarking.

    In the resulting report, the overall health state should be “PASSED”, the “Type” column should show “Pre-fail” and “Old age” values, and the “Media-Wearout-Indicator” should be close to 100. If the overall health state is “FAILED”, then you will want to back up your files immediately and consider getting a new SSD.

    • jackpot@lemmy.mlOP
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      11 months ago

      wait i think ive had a breakthrough, all system packages SEEM to run fine but all flatpak applications are effected. this seems to be flatpak related

      • jackpot@lemmy.mlOP
        link
        fedilink
        arrow-up
        2
        ·
        11 months ago

        just tested it, vlc system package opens in .2 seconds but flatpak opens in 30 seconds.

        • db2@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          11 months ago

          Who’d have ever thought that having 47 copies of a library instead of using a shared library wouldn’t work out great. 🙄

            • db2@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              11 months ago

              You mean 1 copy and 46 links.

              That’s a shared library with extra steps. It’s also loaded 47 times. Thanks for playing.

            • db2@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              11 months ago

              Not specifically. It’s probably actually a configuration problem though, for any other program I’d delete or default the settings. Not sure how to do that for flatpak itself as I won’t use it.

        • f00f/eris@startrek.website
          link
          fedilink
          English
          arrow-up
          2
          ·
          11 months ago

          Definitely flatpak related then. Try running one of your flatpak apps from the terminal, and post the output here; might help pinpoint the issue. You can list the ones you have installed with flatpak list, then flatpak run <one of the listed apps, e.g. org.videolan.vlc>.

          • jackpot@lemmy.mlOP
            link
            fedilink
            arrow-up
            2
            ·
            11 months ago

            it took 30 seconds but this got outputted and then the file ran: dave@dog: ~$ flatpak run org.x.Warpinator Gtx-Message: 14:29:03.389: Failed to load module “xapp-gtk3-module” Using landlock for incoming file isolation

            • f00f/eris@startrek.website
              link
              fedilink
              English
              arrow-up
              1
              ·
              11 months ago

              Looking online, there are some suggestions to either (re)install xapp:

              sudo apt install --reinstall xapp

              or a related library:

              sudo apt install --reinstall gir1.2-xapp-1.0

              However, usually I find that errors like this mean nothing, so I wouldn’t be surprised if these steps change nothing.

        • jackpot@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

          this impacts file access speeds too, system package opens things in like .2 of a second but flaptak again takes like 30

    • jackpot@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      ive tried that actuqllt, it said there was no dev/sda. it did aay there was a dev/nvme0. scanned it and it ‘passed’ but i can try again

  • Bipta@kbin.social
    link
    fedilink
    arrow-up
    6
    ·
    11 months ago

    In my experience once you fill an SSD it takes a long time for the performance to recover even after clearing it out, but I don’t know why.

    I partition my SSDs to make sure in never fill them.

    • V ‎ ‎ @beehaw.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      11 months ago

      Usually trim runs on a cycle, either invoked by the OS or triggered by the drive. The time between trim and you deleting the files may see a performance hit as the firmware has to check if the blocks are in use, rather than knowing beforehand if they are.

  • jackpot@lemmy.mlOP
    link
    fedilink
    arrow-up
    3
    ·
    11 months ago

    alright edit: I have a Flatpak issue, not an SSD issue. does anyone have any thoughts? this could be due to the new linux mint update. my pc is a samsung galaxy s2 (750XED P13CFG)

  • bazsy@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    What filesystem are you using? Is it encrypted?

    Could you run a benchmark to verify if reads and writes are both affected? KDiskMark is like crystaldiskmark or Gnome Disks has a built in benchmark.

    • jackpot@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      not encyrpted. i tried running a write test in gnome disks but i get 'error unmounting /dev/nvme0n1p2: target is busy (udisks-error-quark, 14)

  • infinitevalence@discuss.online
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    How long ago did you delete everything?

    SSD’s dont work like old HD’s depending on the generation of tech it might be storing multiple values per cell which means when you “filled” the SSD you put a charge into every single storage cell on the drive.

    Garbage collection and TRIM will slowly over time clear out all the cells flagged as deleted but if one bit is still valid in a cell that was holding 3-4 other bits it cant overwrite that, or relocate it.

    That means that your files/videos and such stay fragmented and may never get put back together sequentially or in a way that the controller can optimize again for speed.

    The only fix, may be running a factory wipe from the Drive MFG’s tool set, that should fully blank each cell and let you re-install and make it feel fresh again.

    Be warned though, you have already done a full drive write once at least, this would be another. You can expect some dead cells and while there is over provisioning that should provide replacements you could see a loss in usable space sooner than later.

    • jackpot@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      i deleted everything ywsterday, and i trimmed today. i was unaware of the dead cell issue. is there a way to disk defragment an ssd?

      • infinitevalence@discuss.online
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 months ago

        in theory time, it should slowly rewrite everything to consolidate it. If you dont have time, then factory format and reinstall.

      • PseudoSpock@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        1
        ·
        11 months ago

        I’m sorry, I found your response confusing. Arch is a Linux distro, I know flatpak is available for it. If there’s a bug with flatpak, I would expect it to be pretty much the same across most GNU based Linux systems. My question, however, was why use flatpak on Arch Linux at all, as the AUR has pretty much everything including the kitchen sink… unless you are developing flatpaks, I guess, in which then it would make sense to me.

        You don’t owe me an explanation, it just sounded odd to me to be needing flatpak when there was AUR, was all.

  • Unyieldingly@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    I had this issue as well, but my file system was broken when i was trashing a OS, I did not know it was xdg-desktop-portal-gtk or xdg-desktop-portal-gnome I think it was Debian with cinnamon or maybe LMDE.

  • Limcon@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    I had this problem with flatpaks, I changed the dbus implementation to dbus-broker (in endeavouros) and it fixed the issue. It may be the same problem.

      • Limcon@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        11 months ago

        I installed dbus-broker and the package manager checked the dependencies and removed the unnecessary stuff. After that I applied the dbus-broker services:

        systemctl enable dbus-broker.service

        sudo systemctl --global enable dbus-broker.service

        And then restarted.

        Idk if it might break things in mint, so I would be cautious.

          • Limcon@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            11 months ago

            Yes, I remember reading about a gtk thing that interacts with flatpak, they said it should not give this error in April, but it seems to still be happening, idk.

            Edit: I just saw that you deleted the gtk portal and it worked! So no need to install another dbus daemon.

  • Guenther_Amanita@feddit.de
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    What do you mean with “Deleted half of my storage”?
    How did you do that? Did you just go into your file manager and deleted some photos, or did you remove partitions and stuff outside of /home/?

    You know of the “linuxatemyram.com”-site, do you? Did you try to “optimize” the RAM consumption or other performance tweaks? It sounds like you “don’t have enough RAM” and then Linux tries to use the swap space, pulling stuff from your SSD.

    Did you install Mint freshly onto the new SSD? Did you use the recommended partioning-layout (regarding swap space)?

    I hate to say it, but did you try to reinstall your OS? Maybe that might help…

    • jackpot@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      11 months ago

      i deleted half of the data on the ssd (no it’s not in the trash folder.) i deleted timeshift files and unused apps. how do i optimize ram consumption and get ‘other performancw tweaks’. i shouldnt be running out of ram if nothing is loaded and i just booted up? yeah i installed mint on to the ssd when i got it. i dont dual boot so do i need to partition? no i have not reinstalled linux but i might

      • Guenther_Amanita@feddit.de
        link
        fedilink
        arrow-up
        1
        ·
        11 months ago

        i deleted half of the data on the ssd (no it’s not in the trash folder.) i deleted timeshift files and unused apps.

        Can you name a few examples? Apps usually don’t need much data, and timeshift backups aren’t accumulative, so only the first one is big, and the following ones are just a few MBs big.
        Why not store them on an external drive? That would be the best method anyway, in case you can’t access your PC.

        how do i optimize ram consumption and get ‘other performancw tweaks’. i shouldnt be running out of ram if nothing is loaded and i just booted up?

        Easy. You don’t :) Linux is already very optimized ootb, and the only thing you can install for example is TLP, a battery life prolonger for better runtime on laptops.
        Other than that, don’t. And take a look at the link, everything gets explained very well and simple there.

        i dont dual boot so do i need to partition?

        If you have to ask this, it should be fine. The default layout on Mint is good as is.

        no i have not reinstalled linux but i might

        Remember to backup your data!!!
        If you haven’t made many customisations, every file should be restored easily. Might help, but keep an eye on your actions.

        Don’t do stupid things and maybe consider immutable distros, like Fedora Silverblue, since you can’t mess up anything on them.

        • jackpot@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

          read the edited post! apparently somethings wrong with the gtk3 module, im only having slow boots for flatpaks!!