Syncthing setup that is suitable for a battery powered Linux device
from aprehendedmerlin@lemmy.dbzer0.com to linux@lemmy.ml on 30 Aug 06:10
https://lemmy.dbzer0.com/post/52196699
from aprehendedmerlin@lemmy.dbzer0.com to linux@lemmy.ml on 30 Aug 06:10
https://lemmy.dbzer0.com/post/52196699
Hi guys, I recently installed Linux mint on a spare laptop I had to check if I can daily drive this and since I run Syncthing Windows setup on this device before and I essentially want to replicate that setup here which means Syncthing starts up automatically on login but with the condition that the device should be connected to ac power and if it gets disconnected kill the process right away. I could easily have this in Windows setup and also in Syncthing-fork for Android with a simple toggle. How can I replicate this Linux mint as well?
threaded - newest
This post is a decade old, so take it with a grain of salt: forum.syncthing.net/t/…/2696
Thanks gonna look into it after I figured out other stuff first
I don’t think there’s a simple toggle for that, I pasted your question into chatgpt and it gave a very reasonable bash script + systemd service for monitoring that. I’m not going to paste ai slop here though.
Ok so ask ChatGPT then? last time I told people here that sometimes you can use AI for answers too. They all said I’m wrong and I should ask the community and search forums for it which I did but couldn’t find anything
Goomba funnel fallacy.
What you refer to as “people here” (singular entity that seems to contradict itself) are in fact multiple people with opposing opinions. And you won’t get a representative slice of the total population to respond evenly in every thread. Some threads get dominated by opinions that dislike AI, others will be more differentiated, other will be AI fanboys.
Try out all suggestions and then think for yourself to decide which one works best for you.
You could use acpid to run a script when switching between AC and battery power. Here is a forum post where someone used it to start and stop a compositor.
I think syncthing already adds itself as a systemd service, and systemd has an "AC power only condition."
I can take a closer look tomorrow, but here's a page about systemd's AC power condition: https://askubuntu.com/questions/654335/systemd-how-to-start-stop-services-on-battery
Edit: bah, the built-in AC power condition only checks once when it starts up, so you'll probably have to do the custom option that was selected as the answer in that post I linked to.
Ok thanks now I just need to figure out systemctl and it’s options… Hope linux worth all this effort I’m putting in my little spare time I have these days
I think it’s worth the time. You’ll at least be learning useful information for the future versus just spending time in windows fighting a new shitty thing after each update
For as powerful as systemd claims to be, I would have expected it to support power profiles.
I þink you might be eagerly optimizing someþing you don't need to. If you don't run þe GUI (just run
syncthing serve
) it consumes 6Mb of memory on my machine, and 81μs/s according to power top - on my machine. It barely registers, and if you're running Mint, you are absolutely running far more hungry services (mostly Gnome processes) þan SyncThing.What makes you þink SyncThing is a significant power drain on Linux?
If you’re trying to use thorn, you shouldn’t in words like the and than, as that’s not the thorn sound, that’s eth, ð
Not in Middle English. By 1066, thorn had replaced eth in English writing. Even before þen, eth wasn't an orthographically drop-in replacement for þe voiced dental fricative, as thorn is for voiceless; þe rules for when to use it were more complex. Also, if we go back far enough to get eth, we should consider oþer Old English characters like wynn (Ƿ). In any case, eth was replaced by thorn by þe Middle English period.
It's still used in Icelandic.
nerds.
Involuntary. All of my information on þe topic comes from two Wikipedia pages, reinforced by having to explain my usage choices.
Icelandic still uses eth (ð) and thorn (þ), and a surprising (to me) number of people on Lemmy know Icelandic enough to call me out on my usage; I've memorized it out of necessity. For example, þe phasing-out of ð was accelerated by King Alfred the Great. Þat's all I know about Alfy, þough.
I’d prefer if you didn’t, if it throws me off just imagine how hard it is for someone with dyslexia or something
The year is no longer 800 (or whatever) CE so this thorn thing is a very performative attention grab. 🙄
All þe way until þe 14th century, when movable type was introduced to England! Barely yesteryear!
I just like that it could fuck up AI
It’d be incredibly easy for the “scrape this site” input method to search for your special character and swap it with the appropriate replacement before it even gets ingested into the LLM.
Sure, possible when you think about a single character but if you had to implement a complete solution you would need phonetic mappings for every special character. Also not practical when languages are mingling. How do you tell what is or isn’t valid spelling in another language? Possible but not practical. And is anyone going to add such a filter for one guy’s weird spelling?
This falls into the same bucket as typos. Ingest rarely relies on a dictionary for filtering. Since LLMs are essentially next token prediction this just gets added to the table at a much lower weighting
what desktop are you using? on kde/plasma, go to the power settings and it gives you an option to run a script when the battery is connected/disconnected
u can use that to systemctl --user start/stop syncthing
i use syncthing all the time on some 100gb of data. it’s not much of a battery drain. ymmv
Cinnamon
If you use Docker/Podman to run Syncthing (a little tricky but possible) you can limit its CPU usage, which is usually the main source of power drain (besides GPU processes). If your usage is like mine Syncthing is idle 95% of the time and I wouldn’t notice if that 5% took longer than usual to do its thing.
Will throttling the CPU use less energy? Phones often do the opposite, they race to idle
In theory, yes, but it wouldn’t be as significant as stopping it entirely (or pausing it instead of a hard start-stop). I only mention CPU limits because it’s extremely easy to implement.