2

According to linuxaudio.org, I should add the command echo 3072 >/sys/class/rtc/rtc0/max_user_freq to my startup scripts.

In previous versions, I've done this by adding the line to the file /etc/rc.local, however as I understand, this does not work in 18.04 anymore.

Then, I found an answer that mentions creating a startup script in /etc/systemd/system/ like so:

[Unit]
Description=RTC Max User Freq

[Service]
ExecStart=echo 3072 >/sys/class/rtc/rtc0/max_user_freq
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

The script was found by the systemctl autocomplete command and I enabled it successfully, however it does not come into effect upon reboot.

What do I have to do in Ubuntu 18.04 to execute this command on startup?

Edit: The solution to this issue is a simple syntax change, the code in the .service-file when using systemd to run the script on startup should actually be:

[Unit]
Description=RTC Max User Freq

[Service]
ExecStart=/bin/bash -c "echo 3072 >/sys/class/rtc/rtc0/max_user_freq"
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

After wrapping the command in /bin/bash -c "...", the script worked immediately.

Prototype700
  • 1,120

0 Answers0