Hi everyone!

My daily driver is a Surface Go 1 running Fedora with 8GB of ram and 128GB of storage. It is always hooked up to a Philips 273B screen via USB-C.

Most of the time, it is really fast and a perfect tiny Linux and Gnome machine easily hookable to a big screen for when you’re not travelling.

However, sometimes, after installing updates but maybe not always, it is slow as hell. Sometimes, detaching the Surface from the big screen and hooking it again, solves the issue, but not always. It is a behavior I already had when I was using Ubuntu and I’ve had on Fedora since version 36.

Here are some useful printscreens from HTOP and the ressource management system:

#high cpu usage

#low cpu usage

I thought that maybe installing the Surface kernel would stop the issue, but it didn’t…

Sometimes it’s annoying enough to make me just want to use my wife’s MacBook Pro 2012 running Fedora as a daily driver but the form factor is less practical.

Thanks in advance for any help!

Edit: it happens on startup, even after days of inactivity

  • bruhbeans@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    15 小时前

    My Go 2 was always dog slow under GNOME with Fedora Silverblue, I ended up bagging it for a Chuwi Minibook X which is like twice as thick but all the other dimensions about the same and so much faster with an N100. The current version has an N150 which should be slightly better. All the hardware, even the camera, worked ootb. Highly recommended.

    • Dariusmiles2123@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      2
      ·
      14 小时前

      When working properly, my Go 1 is perfect and I don’t need more power. So I wouldn’t want to get rid of it and would prefer solving the problem.

      But, if one day it dies, I would try to find something more Linux friendly, even if using Microsoft or Apple devices to do something they were not designed for is also quite nice😅

  • glitching@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    21 小时前

    first, press F2 in htop and then scroll down to enable show CPU temp and frequency. you’ll know if it’s running at full speed and what the temp is when it acts like that. if it’s stuck at 400 MHz or such, it’s a BD_PROCHOT issue, which is fixable.

    also, try undervolting it a bit. if you make it to -100 mV and beyond, that’s a significant decrease in heat in stress-intensive activities and makes the battery last way longer.

  • mech@feddit.org
    link
    fedilink
    arrow-up
    14
    ·
    2 天前

    This looks like a hardware issue.
    I’d guess at overheating, or an error with the CPU’s energy management.
    First thing I’d do is look if there’s a BIOS update available.
    Then install lm-sensors (there’s also a GUI frontend called psensor and a gnome shell extension) to show CPU temperature, and check if they’re too high. If they aren’t, you could set your CPU to always use max power and see if that fixes it, but it will reduce battery life.
    Or try a different distro from a live USB and see if that makes a difference.

  • jokro@feddit.org
    link
    fedilink
    arrow-up
    8
    ·
    2 天前

    Can you check the cpu frequency? Maybe it’s in a sort of low power mode with low frequencies when it’s slow.

    • IanTwenty@piefed.social
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 天前

      This is my thought too. Your screenshots don’t show cpu freq. Everything can appear normal on other measures but if your cpu has throttled right back it’ll run slow with no obvious cause. I have seen this on certain laptops when external peripherals are added/removed after waking from sleep. Sometimes forcing sleep/wake or a reboot will fix.

      Use lscpu at the cmdline or better yet install gnome extension ‘system monitor next’ and put the cpu freq graph in your top bar to watch it in realtime.

      https://extensions.gnome.org/extension/3010/system-monitor-next/

  • utopiah@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    2 天前

    It’s all just speculations, both what you suggested and what others said.

    You are on the right path with your screenshots but you might not be measuring the right thing.

    So, you need a (paper) notebook to record objectively (not your biased feeling assuming a pattern that might not exist) when it happens and for how long. Only from then can you backtrack to WHAT causes it. Sure you can have some hypothesis (update related, screen attach/detach, BIOS, RAM, etc) but that should NOT lead to your data acquisition.

    So you htop is nice but AFAICT it’s just about CPU and memory, it’s not about e.g. IO so consider instead iotop, in particular if one process is some indexing (e.g. locatedb). Theoretically if it’s not CPU/memory (which you are saying it’s not the case) then it basically just leaves IO, that can be again indexing, some heavy process that is bottlenecked on disk access, but can also be a bug, e.g. BT pairing/unpairing that happens faster than you can notice.

    Think of this as a fun investigation that leads you to better understanding of your setup, good luck.

    • Dariusmiles2123@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      3
      ·
      2 天前

      Yeah I guess you’re right, my last chance of solving the problem could be by creating a spreadsheet with as much data as possible on every occurrence…

      I don’t think it would be a thrilling investigation though😅

      What are IO and Iotop?

      • atzanteol@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        2 天前

        What are IO and Iotop?

        Input / Output.

        Reading and writing to disk, network, etc.

        iotop shows will show applications writing and reading from disk. It’s going to likely be pretty sporadic.

        What may be happening, and what others are suggesting, is that you’re running out of memory (8gig isn’t that much these days). When that happens the system starts writing memory to disk so it can free more. That’s what you see with the “swap” usage. You can see a bit more about your memory usage with free -m:

        $ free -m
                       total        used        free      shared  buff/cache   available
        Mem:           64141       17077       24020        1981       30419       47063
        Swap:          20479           0       20479
        

        Using swap space isn’t necessarily bad. But reading/writing to it frequently can be a performance killer. You can monitor that with a command called vmstat:

        $ vmstat -w 3
        --procs-- -----------------------memory---------------------- ---swap-- -----io---- -system-- ----------cpu----------
           r    b         swpd         free         buff        cache   si   so    bi    bo   in   cs  us  sy  id  wa  st  gu
           1    0            0     24590136        70748     31066604    0    0   228   309 9959   18   8   1  91   0   0   0
           0    0            0     24595172        70748     31065076    0    0     0   119 3159 6677   2   1  98   0   0   0
           2    0            0     24607436        70748     31070316    0    0  2300    75 3147 6693   2   1  97   0   0   0
           0    0            0     24594892        70748     31070316    0    0     0   584 3417 5950   1   1  98   0   0   0
        

        The columns to pay attention to there are under the ---swap-- header. si is “Swap In” and so is "Swap Out. Those are reads/writes to and from swap space. Seeing a little activity there is fine. It is typically pretty spikey. But if you’re seeing lots of numbers there then it could just indicate that you’re running low on memory and the OS needs to move things to and from disk frequently. While it’s moving things to and from the disk the application trying to use that memory has to wait.

  • SapphironZA@sh.itjust.works
    link
    fedilink
    arrow-up
    3
    ·
    2 天前

    I have had this with some laptops if the charger is faulty. The laptop goes into a limp mode, where the CPU locks to its lowest clock speed.

    Since the display is using USB-C it may be triggering the slowness. Some USB-C monitors also deliver power to the connected device.

    Is the laptop slow, even when running off battery, or only when running off battery?

    Keeping an eye on the CPU frequency with something like Btop can maybe help troubleshoot the issue.

    • SteveTech@aussie.zone
      link
      fedilink
      arrow-up
      1
      ·
      1 天前

      That limp mode is usually controlled by ‘BD PROCHOT’, it can be disabled, but check your sensors and make sure there isn’t something wrong before doing so.

  • TechnoCat@piefed.social
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 天前

    Can you do screenshots with btop? Would be nice to see if the cpus are being throttled for temperature. I believe btop shows frequency and temp by default.

    • Dariusmiles2123@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      1
      ·
      2 天前

      I’ve never heard of btop but I can look at it👍

      But wouldn’t it be weird for it to be temperature related when the computer was just started and unplugging/plugging the external screen solve the issue? This would make think it’s display related no?

    • Dariusmiles2123@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      4
      ·
      2 天前

      I guess I should have said it before, but it happens when starting the computer, sometimes a week after an update, so I don’t think it’s heat related. Especially because it sometimes solves itself after unplugging/plugging the external monitor through USB-C.

      • CameronDev@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        2 天前

        Ah, I thought the timeline between the events and the slowdown were a lot closer, and that unplugging the monitor just gave it enough time to cool down.

        The monitor part is definitely odd, is it a particularly high res/Hz monitor?

        Otherwise I’m also leaning towards excessive swapping being the culprit, but that doesn’t explain the monitor part.

  • isgleas@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    2 天前

    Disable any file indexing service and/or repositories update that may be running on the background

    • Dariusmiles2123@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      2 天前

      Apparently the BIOS is up to date even if my knowledge about these is quite limited…

      About something dying in the computer, it would be surprising as it has been like this for the last 4 years and only happens maybe once a month after starting…

  • kumi@feddit.online
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    2
    ·
    edit-2
    2 天前

    Apart from what others said about power/throttling, I wonder if the filled up memory during the upgrade (or other memory-heavy use) pushes some central pages to swap and then they stay there after?

    After the upgrade and you have plenty of free memory again you can force back everything to RAM by temporarily disabling swap:

    swapoff $swapdev && swapon $swapdev  
    

    To list swap devices, just run swapon.

    Also switching to an X11 window manager can be quite a lot snappier than modern GNOME for older hardware. You could try Xfce, Cinnamon, MATE, or KDE with the X session.

    If it’s not throttling/thernals, I wouldn’t be surprised if those two together is what made things worse after migrating dist.

    If you’ve been swapping heavily over time you might also want to check disk health with smartctl and check that you don’t have related errors in dmesg.

    If you press tab in htop you can also see if there is high IO load going on.

      • kumi@feddit.online
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        2 天前

        Hence:

        After the upgrade and you have plenty of free memory again

        If it’s like the last htop image should be no problem.

        • atzanteol@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 天前

          Turning off swap could make things much worse though. The system will have less memory for file caches.

          I’d leave swap alone, just monitor for whether the system is paging frequently. “vmstat 3” should show if you’re writing to swap frequently.

          • kumi@feddit.online
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            2 天前

            Turning off swap could make things much worse though

            How so, given that we immediately re-enable the same swap device right after so that it’s only off for a very brief moment? Let go :)

            Anecdotally, this maneuver can help tremendously tonrecover responsiveness in some cases. I guess the overall sitiation could be improved by tweaking vm.swappiness.

            • atzanteol@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              2
              arrow-down
              1
              ·
              2 天前

              How so, given that we immediately re-enable the same swap device right after so that it’s only off for a very brief moment? Let go :)

              $ free -m
                            total        used        free      shared  buff/cache   available
              Mem:           64141       17213       24010        1984       30297       46927
              Swap:          20479           0       20479
              

              See that buff/cache column? That’s memory being used by the system for caching. Files you you open and access get cached into memory as do inodes, filesystem objects, etc. If you run a “find / -type f” twice in a row the second one will be significantly faster because the first run cached a lot of objects into memory.

              By starving the system of memory all that will be flushed and you get more disk access doing things you’re actually trying to do. Whereas things sitting in swap are there because they aren’t currently needed.

              By turning off swap and then back on again you’re just forcing the system to drop all that cache which it will then attempt to reclaim space for and push things back out to swap.

              I don’t know what benefit you think you’ll gain in the process.

  • TechnoCat@piefed.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 天前

    I will share an issue I and others have with their laptop that presents just a bit differently (a single cpu pegged at 100% instead of all of them).

    If i wake my laptop from sleep while it is plugged into an external monitor, I will have a single cpu pegged at 100% trying to handle endless acpi interrupts. I have to hibernate my machine and turn it back on to fix it. Alternatively I can unplug the monitor before waking from sleep to prevent it from happening. I just hibernate instead of sleeping now.

  • snailstone@piefed.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 天前

    I am not sure how this works, but have you played around with the power settings? Tried to set it to high performance?