Which distros are energy efficient? I have a capable desktop, and I mean to push it, but I don’t want to be using energy if it’s not necessary. I’m not looking to rescue an old laptop, for example.

I hear CachyOS is fast. Does that translate to energy efficient?

(Does the OS even matter that much for efficiency?)

  • dfgxx@lemmy.zip
    link
    fedilink
    arrow-up
    4
    ·
    13 hours ago

    Try chimera Linux, it is very efficient, it doesn’t have any bloat, it is a musl libc distro ( like alpine but they modified the musl to have better performance (they’re saying it can complete or surpass glibc), it isn’t gnu/Linux, they changed the gnu userland to freeBSD userland with the Linux kernel and it is much lighter, they also use dinit instead of systemd and the boot times are very fast. Also the package manager is apk and it is very lightweight and efficient (and very fast)

    • pastermil@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      11 hours ago

      Do correct me if I’m wrong here, but aren’t those embedded libc only excel in taking less space? I wouldn’t be so sure if they’d be less resource intensive. If any, it may be more, due to the CPU vs memory trade-off.

      • dfgxx@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        9 hours ago

        I didn’t really understand, but I did heard that standard musl is lightweight but the performance is much worse than glibc. But chimera Linux changed the allocator to mimalloc that is bit less light then the standard allocator for musl but still much lighter than glibc. Also it’s performance is very close to glibc and can even beat it sometimes

        • thingsiplay@lemmy.ml
          link
          fedilink
          arrow-up
          2
          ·
          2 hours ago

          standard musl is lightweight but the performance is much worse than glibc.

          Is it? I never heard this statement before (note not saying its wrong or right, just never read about that). I wonder if that statement is true and if it even matters in most cases. Similar to how performance of Python doesn’t matter for all kind of programs. The main benefit of musl is, it can be embedded into the application to make it standalone without depending on a dynamic library. Its entirely possible the code is not as optimized as glibc, but maybe it depends on the programming language its used and compiled with? Also maybe the stuff you read and heard was from early versions of musl and later they improved it to match glibc. Just speculation, but we don’t have anything else at hand right now.

          • dfgxx@lemmy.zip
            link
            fedilink
            arrow-up
            2
            ·
            57 minutes ago

            Maybe you’re right, but to clarify bit what I heard is that musl is slower in heavy tasks, but still, maybe you’re right.

            2 things I’m almost sure about are you that musl is lighter than glibc and that the allocator chimera Linux uses have better performance than the standard musl allocator.

            • thingsiplay@lemmy.ml
              link
              fedilink
              arrow-up
              1
              ·
              48 minutes ago

              I wonder why those optimizations are not part of generalized standard musl library. This (just thinking about it) indicates the optimizations by Chimera Linux are focused on specific performance improvements, while leaving something behind to reach that. What that is, I don’t know, maybe compatibility for edge cases or giving up performance for other tasks.

              I’m just a bit cautious with these statements.

  • whatiswrongwithyou@lemmy.ml
    link
    fedilink
    arrow-up
    16
    ·
    22 hours ago

    Stop reading this thread and buy this thing or something like it.

    There are at least three things in between the wall and what the os tries to do before you start fiddling around in the settings. Did the thing you changed take effect? Did it stay in effect? Is the cpu actually doing what you ask it? Can you even trust what the cpu is reporting back to you? The motherboard?

    Don’t just start fucking around with stuff before you put a watt meter in line. Everything else is just guesswork.

  • Lemmchen@feddit.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    18 hours ago

    I assume Alpine Linux is very limited in terms of power usage, at least out of the box.

      • Lemmchen@feddit.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        3 hours ago

        Alpine Linux is an independent, non-commercial, general purpose Linux distribution designed for power users who appreciate security, simplicity and resource efficiency.

        https://www.alpinelinux.org/about/

        It’s also around for 20 years already, so long before Docker was a thing. But setting it up as a desktop OS would be a bit of work, I agree.

      • lilith267@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        3
        ·
        14 hours ago

        Actaully super nice using it with KDE or a independant window manager- But then you just have all the desktop packages installed anyway so my resource useage is the exact same as my arch setup…

        Alpine is amazingly small compared to other bare bones distros, but that saved 10mb of ram doesn’t mean much when your desktop and browser are using a gig

  • diaphragmwp@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    1 day ago

    I was writing a really long answer but it disappeared, fuck me.

    Anyways, I guess I am going to skip the scientific explanation, but CachyOS’s optimizations most of the time mean energy efficiency. Most of the time. It’s not a hard guarantee, could make things much worse depending on what’s running.

    Now, as for distributions. Load one of the following with a copy of sway-git or hyprland (or if your box is old enough to have 2D acceleration, better use TWM, DWM…).

    If you want a “traditional” distribution, like when you can just run some random binary from the interwebs and meet most of it’s assumptions to let it “just run”, I suggest Arch Linux (yes, really) with a thing called “ALHP.go” (basically repos that provide optimized packages just like CachyOS, except that this is the original). I don’t know of anything like CachyOS and ALHP elsewhere anywhere, so this may be the most performing option.

    If you are fine with having to run a container for the unity shovelware friends send you, look into Adelie Linux and Alpine. They are energy efficient, but for the wrong reasons: lighter weight component alternatives just means less work to do. In Alpine, the packages are also optimized for storage rather than performance, which has a side effect that your CPU can load whole chunks of programs into cache and use RAM less. If you are fine with a virtual machine on non-Linux, you probably wouldn’t need this advice, but there’s midnightBSD and OpenBSD and such. OpenBSD is meant for security and not performance (even blocks multi threading by default), but it comes with the side effect of being very small and thus energy efficient.

    Technically, a source distribution like T2 or Gentoo would be the most performant AND energy efficient, but you need to burn quite a lot of electricity to get there first and to install updates. Using clang instead of GCC makes this a bit less painful but still. UNLESS you just rent a server and offload everything there with something like distcc.

    Now, a few little remarks:

    • What the other person said about the web is true, the modern web sucks balls. You could use browsers like Chawan, Netsurf (git since last release is old) and Dillo (git), then play videos with mpv + yt-dlp and stuff. However, you will eventually run into one of the abominations of websites that have 3 language translations on top of each other and require the latest of technologies. Also, you would be locked out of most Lemmy instances (some have JSless old.{domain} but not mine :/). Now, ALHP has optimized Firefox, but most of the most important routines have been turned into hand crafted assembly for each generation of CPU (yes, really), so the performance (and energy) impact isn’t as good as you would expect. Your web browser will be using the most power regardless. Although you can make it slightly better with UBlock Origin and decentraleyes (both included in Arch repos)… I’ve heard the Firefox people are starting to upstream a native adblock engine which means it will be faster, though it’s not quite there yet.
    • Sometimes, the Linux kernel will set the minimum CPU frequency above the actual minimum and I couldn’t find a proper reason for it. My workaround is running this script in a few places on startup as root: echo "1" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq.
    • Avoid running flatpak, snapd…
    • Disable daemons you don’t need (like Avahi).
    • Avoid running web browser wrappers (Element, Discord, Jitsi meet…), just use your default browser. When you need them (Steam, Signal), stop them after you are done.
    • You may have luck turning off devices physically with “acpi_call”.

    You can also make scripts like this (example is for Arch):

    scripts

    minimize_network_services.sh

    #!/bin/sh
    sudo systemctl stop snowflake-proxy
    sudo systemctl stop i2pd
    sudo systemctl stop [email protected]
    sudo systemctl stop zerotier-one
    sudo systemctl stop gnunet
    sudo systemctl stop tor
    akonadictl stop
    pkill -9 akonadi
    pkill -9 Telegram
    pkill -9 signal-desktop
    pkill -9 steam
    

    no_network_services.sh

    #!/bin/sh
    . ./minimize_network_services.sh
    sudo systemctl stop NetworkManager
    sudo rfkill block wlan
    sudo systemctl stop ntpd
    

    min_network_services.sh

    #!/bin/sh
    sudo rfkill unblock wlan
    sudo systemctl start NetworkManager
    sudo systemctl start ntpd
    

    yes_network_services.sh

    #!/bin/sh
    . ./min_network_services.sh
    sudo systemctl start snowflake-proxy
    sudo systemctl start i2pd
    sudo systemctl start gnunet
    systemctl --user start ipfs
    
  • fuckwit_mcbumcrumble@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    20
    ·
    2 days ago

    I guess whatever distro uses the least resources.

    The power difference is going to be negligible though. Unless you’re running a pentium 4 and all you do is boot the OS, check mail, then shut it down you’d never notice a difference. As soon as you open a web browser any savings goes out the window. The web will destroy any savings a distro has.

    Also performant doesn’t necessarily mean more efficient. It could mean it better utilizes the hardware, but because it’s using more of the hardware it’s using more power.

  • Knoxvomica@lemmy.ca
    link
    fedilink
    arrow-up
    5
    ·
    1 day ago

    So I do suggest you get some sort of energy monitor plug for your desktop and realize that it probably already uses less power than you think it does. I was very surprised at the efficiency once I did that.

    • adarza@lemmy.ca
      link
      fedilink
      English
      arrow-up
      3
      ·
      20 hours ago

      very surprised at the efficiency

      i remember hooking ours up to a 10th gen celeron desktop (supposedly 58w cpu).

      the whole box doesn’t even hit 20w at the wall under a full load, and it idles awake at about 5w.

      i immediately set that one aside for future use to feed media to a tv or run a dietpi or something.

  • onlinepersona@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    1 day ago

    OS matters, linux is probably the most efficient. The distribution matters less. But it also depends on what you want to do. Use it as a desktop?

    As others have said, disable services you don’t need, close programs you aren’t using.

    Actually that does make me think, there might be distros that automatically clean up unused programs and turn down the frequency of the CPU when it’s not in use. Haven’t done a thorough search though.

    • diaphragmwp@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      1 day ago

      Turn down the frequency

      Kernel already does.

      Clean up unused programs

      ??? So it would close my IRC client when I look away? Fuck that.

      • onlinepersona@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        1 day ago

        Kernel already does.

        Depends on which governor you have active

        ??? So it would close my IRC client when I look away? Fuck that.

        Don’t be daft. Look at what Android provides.

        • diaphragmwp@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          1 day ago

          Depends on which governor

          Default one.

          Android

          That’s also bad, but there’s a difference: developers on Android know about this and do workarounds like keeping a notification open. Because Android is Android, it always has this. No existing program elsewhere is designed around this.

  • undrwater@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    2 days ago

    Stop services you don’t need. Doesn’t matter the distro.

    You can also turn off devices right at the bus.

    Powertop is a great tool.

  • sudoer777@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 day ago

    IDK what exactly your goal is, but with distros like Arch, background services are opt-in and there’s documentation on fine-tuning the power settings.

    • diaphragmwp@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 day ago

      Yes, but the user doesn’t want it. To quote them:

      I have a capable desktop, and I mean to push it

      Also, Raspberry are greedy bastards, shit’s overpriced. May as well use another SBC for a much smaller price. Or one of the Chromebooks that would otherwise be e-waste.

  • jollyrogue@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 days ago

    The distro doesn’t really matter. Buying more efficient hardware and running efficient software matters.

    A 65w proc is going to use less electricity then a 240w proc. Native software is more efficient then running lots of web browsers.

    If you really want to know how much power the desktop is using, measure. Measure the power coming out of the wall. Measure how much time the system is active, and feed that into a time series database with a something like Grafana for visualizations.

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 days ago

    There is no such thing in the way you’re imagining it. You can tune any distro to use as little power as possible, but there’s only so much you can do if the hardware platform you’re running isn’t very efficient.

    What are you currently running?