file did not save after reboot

D

Diederik

Guest
Hi all, my first linux question on a forum :)

i was having major headaches from my videocard fan , so i changed the speed by doing this :

== su -c 'echo low > /sys/class/drm/card0/device/power_profile' ==

however when i reboot , the fan is noisy again. what am i missing ?

please talk slow :)
 


D

DevynCJohnson

Guest
Hi all, my first linux question on a forum :)

i was having major headaches from my videocard fan , so i changed the speed by doing this :

== su -c 'echo low > /sys/class/drm/card0/device/power_profile' ==

however when i reboot , the fan is noisy again. what am i missing ?

please talk slow :)
/sys/ is a mount-point for a virtual filesystem called "sysfs". Any changes to it are not saved. /etc/ is the long-term/permanent place for configuration. You have many options that can fix your problem.

#1. Start-up script
The command that fixes your problem can be placed in a script. That script can be set to execute on boot-up via rc-scripts (/etc/rc*.d/YOUR-SCRIPT-HERE), systemd script (example below), etc.

Code:
[email protected]:~$ cat /etc/systemd/system/sshd.service
[Unit]
Description=OpenBSD Secure Shell server
After=network.target auditd.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run

[Service]
EnvironmentFile=-/etc/default/ssh
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=sshd.service

This link may help - http://unix.stackexchange.com/questions/25382/make-changes-to-sys-persistent-between-boots
 
D

DevynCJohnson

Guest
Option #2.

Make a script that you place on you desktop. When the script is clicked/executed, "gksu" (or some other GUI-frontend for sudo/su) will ask for Root privileges. Then, your command will be executed.
 
D

DevynCJohnson

Guest
Example Script

Code:
#!/bin/sh
function FIX {
    echo low > /sys/class/drm/card0/device/power_profile'
}
gksudo FIX
exit 0
 
R

rdarw

Guest
Hi all, my first linux question on a forum :)

i was having major headaches from my videocard fan , so i changed the speed by doing this :

== su -c 'echo low > /sys/class/drm/card0/device/power_profile' ==

however when i reboot , the fan is noisy again. what am i missing ?

please talk slow :)
Rdarw
 
C

Christina Campell

Guest
This trouble generally occurs when system doesn't shutdown properly
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top