Skip to content

u/craftkiller

In this archive from Jan 2012 to Apr 2023

1
posts
116
comments
0
media
1.3k
score

To do it temporarily (as in, rebooting would reset the setting) you could do:

echo 1 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo

echo "power" | sudo tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference

To make it permanent you'd use tmpfiles.d to automatically write to those paths. For example, my /etc/tmpfiles.d/disable_turboboost.conf is:

w- /sys/devices/system/cpu/intel_pstate/no_turbo - - - - 1

and my /etc/tmpfiles.d/energy_performance_preference.conf is (note, this file would need to be different based on the number of logical CPU cores you have. My laptop has 4 physical cores but also hyperthreading which makes it appear like 8 logical cores):

# Favor energy efficiency for Speed Shift
w- /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference - - - - power
w- /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference - - - - power
w- /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference - - - - power
w- /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference - - - - power
w- /sys/devices/system/cpu/cpufreq/policy4/energy_performance_preference - - - - power
w- /sys/devices/system/cpu/cpufreq/policy5/energy_performance_preference - - - - power
w- /sys/devices/system/cpu/cpufreq/policy6/energy_performance_preference - - - - power
w- /sys/devices/system/cpu/cpufreq/policy7/energy_performance_preference - - - - power

To verify the tmpfiles.d settings were correctly applied, you could reboot and check that your output matches:

$ cat /sys/devices/system/cpu/intel_pstate/no_turbo
1

$ cat /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
power
power
power
power
power
power
power
power

btw if you're running anything like TLP, that might override the setting. I'm pretty sure TLP has its own way of setting these things.

2 points

Personally I disable turboboost and tune the epp (energy performance preference) for speedshift (Intel hardware p-states) to favor efficiency instead of performance. This way I never hear my fans even if I'm doing heavy computation. I don't even notice the performance difference, though I assume it is at least measurable in tests.

2 points

Ripgrep. That's it. As much as some of the sexy new tools improve ergonomics, I am frequently the dev my coworkers ask for help so I find the value of being intimately familiar with the standard tools to be of far more value. That's why I trudge through the git CLI instead of using magit, why I use GNU coreutils despite not being a fan of the GPL, and why all my scripts are written for bash despite zshell being superior.

25 points

Small clarification, waybar does not need to rely on intervals (though it can if you want). Scripts can run as a daemon who's corresponding block is updated whenever the script outputs a new json line to stdout so that can occur whenever the underlying script wants, as frequently or infrequently as desired. (Though admittedly all my custom scripts for waybar are interval-based)

Custom module doc: https://github.com/Alexays/Waybar/wiki/Module:-Custom

If no interval is defined, it is assumed that the out script loops it self.

10 points

The efi/boot/bootx64.efi path is a special path for UEFI. Firmwares will always attempt to boot that path if no others are configured. This is useful for things like bootable USBs or devices without configurable firmware.

That file could have been there from anything (windows or Linux). If you're going to nuke it to see if that solves your issue, I'd suggest renaming instead of deleting and having a liveusb ready in case your boot breaks and you need to put it back.

6 points

Media players seem like an ideal candidate. They don't need to self-update due to package managers, and I don't need it downloading album art. You could block it for privacy reasons (I don't need the album art downloader revealing my affinity for 90s pop music or bondage porn) or security reasons.

Edit: PDF viewers! There is no reason evince should make a network call, and PDF viewers are no stranger to horrific security vulns.

Edit2: probably should add word processors to the list. They tend to have network functions that some people use, but the closest I've come to using networking in a word processor was Ctrl+clicking a link to open it in my browser. If we went with sandboxing instead of open snitch then the browser wouldn't get network either since it was launched by a sandboxed program but I'd be willing to put up with copy+pasting links from my sandboxed word processor to my exposed browser.

Edit3: also most of the coreutils. I trust them enough that I wouldn't go through the effort, but if the coreutils would sandbox themselves like OpenBSD is doing with pledge(2), then that would still be an improvement.

1 points

So it's not news to anyone that archiso now has an installer built in

Hold up! Arch has an installer again? I'm actually learning about this now and I've been an arch user long enough to remember the previous installer.

Personally I'm going to keep doing it the manual way because I like the direct control with full knowledge of all actions performed. Also, I can do the arch install manually from memory at this point. But regardless, this will be great for new users to ease them into it.

1 points

Well I know it's an open source driver which also means it is getting ported to less common operating systems like OpenBSD. That along with supporting GBM means I can use any Wayland compositor I want whereas Nvidia has me restricted to only a few. But I don't have first-hand experience since I've been on nvidia for the past decade. Here's the arch wiki on it in case that helps.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.