sysfs.conf(5)

πŸ“¦
version 2.1.1 Β· 5 versions
, in debian trixie, ubuntu questing

πŸ’– 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 /sys filesystem, so do not get them confused with the /etc/sysctl.conf configuration, which is a whole different thing that deals with the /proc/sys filesystem 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 β€” sets value for the sysfs attribute. slay.
  • mode attribute = mode β€” sets the mode for the sysfs attribute. and mode here can be any mode accepted by chmod(1). iconic.
  • owner attribute = owner[:group] β€” sets the owner (and/or the group) for the sysfs attribute. and owner (and/or group) can be any specification accepted by chown(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 πŸ‘‘


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