You are not logged in.

#1 2017-09-02 21:48:50

asjaddev
Member
Registered: 2017-09-02
Posts: 4

Execute systemd-tmpfiles for each boot up

I have created some lines to the /etc/tmpfiles.d/trackpoint.conf file which consist of configurations of my trackpoint that I would like to keep persistent. However, I am not able to keep the configuration persistent as the trackpoint is rolled back to normal configuration after a reboot. The lines I have added to /etc/tmpfiles.d/trackpoint.conf are:

w /sys/devices/platform/i8042/serio1/speed - - - - 255
w /sys/devices/platform/i8042/serio1/sensitivity - - - - 255
w /sys/devices/platform/i8042/serio1/inertia - - - - 6
w /sys/devices/platform/i8042/serio1/press_to_select - - - - 0

When I paste sudo systemd-tmpfiles --prefix=/sys --create anytime (even after reboot) the new configuration is working, so I just need to make a way to auto load the configuration on boot up.

Any idea?

Offline

#2 2017-09-02 23:06:43

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: Execute systemd-tmpfiles for each boot up

I don't really know any way to fix the problem, but what you are probably running into is that the tmpfiles are loaded before the kernel has created the proper directories in /sys, thus causing no action because once the device is loaded it will erase all values you set.

Offline

#3 2017-09-02 23:59:28

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: Execute systemd-tmpfiles for each boot up

Would suggest you try loading the i8042 module in the initrd so it will be loaded sooner or use the modprobe.d install option to call a script that will set the options after loading the module.
If those options fails possibly create a custom service that will call system-tmpfiles again at a later point in the boot process.
Edit:
A udev rules matching against the trackpad that calls a script to set the parameters might be simplest.

Last edited by loqs (2017-09-03 00:29:13)

Offline

#4 2017-09-03 02:27:52

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Execute systemd-tmpfiles for each boot up

There are a number of solutions listed in the wiki: https://wiki.archlinux.org/index.php/TrackPoint


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB