sysfs.conf(5)
π sysfs.conf β the sysfsutils glow-up guide π
okay bestie, so this is sysfs.conf(5), from the sysfsutils fam. if you've ever wanted to tell your Linux kernel's /sys filesystem what to do at boot, this is literally the page for you. no cap.
β¨ NAME β¨
sysfs.conf, sysfs.d/*.conf β Linux sysfs attributes setting configuration files π
π¦ DESCRIPTION π¦
so these configuration files are the ones that set sysfs attribute values and also tweak their file mode or owner, and they do it all during the system boot. main character behavior fr fr.
β οΈ okay important vibe check: these files are all about the/sysfilesystem, so do not get them confused with the/etc/sysctl.confconfiguration, which is a whole different thing that deals with the/proc/sysfilesystem instead. two different girlies, two different filesystems, don't mix them up. π
πΈ FORMAT πΈ
the syntax is a series of line based directives for sysfs attributes β and those attributes are just pathnames inside that filesystem β written in this format:
attribute = valueβ setsvaluefor the sysfs attribute. slay.mode attribute = modeβ sets the mode for the sysfs attribute. andmodehere can be any mode accepted bychmod(1). iconic.owner attribute = owner[:group]β sets the owner (and/or the group) for the sysfs attribute. andowner(and/orgroup) can be any specification accepted bychown(1). obsessed.
okay now the little rules that make it all work:
- Leading and trailing whitespace (
SPACE,TAB), plus any whitespace around the=character, is ignored. she does not care. π - Comments start with a
#character and run until the end of the line. Empty lines or whitespace-only lines are also ignored. bye. - The attribute paths support
glob(7)wildcard patterns. so you can be wild with it.
π«Ά heads up: any attribute that doesn't exist will get warned about, but it will not cause the loading to fail. so like, she'll side-eye it but she won't ghost you.
π FILES π
/etc/sysfs.confβ the main configuration file. it gets loaded first, if readable. the headliner. π/etc/sysfs.d/*.confβ the optional configuration fragment files. these get loaded after the main configuration file, if readable, in glob order. the opening acts, if you will.
β EXAMPLES β
always use the powersave CPU frequency governor:
devices/system/cpu/cpu0/cpufreq/scaling_governor = powersave
use userspace CPU frequency governor and set initial speed:
devices/system/cpu/cpu0/cpufreq/scaling_governor = userspace
devices/system/cpu/cpu0/cpufreq/scaling_setspeed = 600000
set permissions of suspend control file:
mode power/state = 0660
owner power/state = root:power
π SEE ALSO π
sysfs(5)- <https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt>
- <https://www.kernel.org/doc/Documentation/ABI/stable/>
okay that's the whole thing, bestie, you ate that. π§ this was sysfs.conf(5) from sysfsutils version 2.1.1-7, dated 2025-03-28 β go forth and configure your sysfs, mwah πβ¨πΈ
π¦ where this page comes from
- debian trixie: sysfsutils 2.1.1-7
- ubuntu questing: sysfsutils 2.1.1-7
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms