How to make permanant changes to /sys/devices/platform/?

1

I'm configuring my thinkpad's trckpoint using the following command:

sudo echo -n 120 > /sys/devices/platform/i8042/serio1/serio2/speed
sudo echo -n 255 > /sys/devices/platform/i8042/serio1/serio2/sensitivity

But I have to run it after reboot. Is there anyway to make this change permanant?

draw

Posted 2013-02-02T02:27:58.440

Reputation: 111

Answers

0

You could add these into a startup script that gets executed at boot. That would be easiest.

Another way would be to recompile the Linux kernel and set the defaults of these parameters to what you desire.

mdpc

Posted 2013-02-02T02:27:58.440

Reputation: 4 176

0

As @mdpc says, the best way to do that is in the startup script. I've done something similar (this should work on most distros).

Add the following lines to /etc/rc.local anywhere before the last line "exit 0" (If exit 0 does not exist, just add them to the file)

echo -n 120 > /sys/devices/platform/i8042/serio1/serio2/speed echo -n 255 > /sys/devices/platform/i8042/serio1/serio2/sensitivity

davidgo

Posted 2013-02-02T02:27:58.440

Reputation: 49 152

Hi David, I tried to pu the 2 lines into /etc/rc.local but after reboot, it did not work... I'm using Linux Mint – draw – 2013-02-05T04:35:05.357

Looks like my formatting got munged - did you put that in as 1 line or 2 ? (There should be a line break before the second echo). – davidgo – 2013-02-05T07:54:33.953

here is my file: http://pastebin.com/VHqg9eik

– draw – 2013-02-05T17:16:57.223

That looks correct to me. Not sure what to advise from here. The obvious thing to check is if the script is running. You can do this by adding a line "/bin/date > /tmp/date.log" before the exit 0 and rebooting. If it creates/adds to a file /tmp/date.log on reboot with the date inside then the script is running on startup, if not we could investigate why. (Are the permissions set correctly on /etc/rc.local - chmod 755 /etc/rc.local ?) If it is running, maybe something is overriding your config ? – davidgo – 2013-02-05T22:17:32.433

Eh... Seems it's running now... – draw – 2013-02-07T17:13:16.440