Skip to content

tuned expects the config file in /etc/tuned #798

@Pointedstick

Description

@Pointedstick

Per https://www.man7.org/linux//man-pages/man7/file-hierarchy.7.html, /usr/share/factory/ is the expected location for vendor-supplied configuration data to live, while /etc is for local overrides. It specifically says:

System-specific configuration. This directory may or may not
be read-only. Frequently, this directory is pre-populated with
vendor-supplied configuration files, but applications should
not make assumptions about this directory being fully
populated or populated at all, and should fall back to
defaults if configuration is missing.

(my emphasis)

Tuned does not adhere to this guideline, and requires its config data to live in /etc. This causes problems on operating systems where /usr/share/factory/ is deliberately used as the default location for vendor config data:

$ tuned-gui
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/tuned/utils/global_config.py", line 45, in load_config
    with open(file_name) as f:
         ~~~~^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/etc/tuned/tuned-main.conf'

The systemd service fails too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions