You are not logged in.

#1 2011-09-26 22:10:42

bradomyn
Member
Registered: 2011-08-05
Posts: 15

[solved] and yet this question..why my rc.local doesn't work

Hi,

I would like to add some commands to the rc.local but I can't figure out why rc.multi is reading it but it doesn't have any effect.

rc.local

#!/bin/bash

echo "LOCAL"
 
/usr/bin/xset dpms 180 360 720 &> /dev/null
/usr/bin/cpufreq-set -c 1 -f ondemand &> /dev/null
/usr/bin/cpufreq-set -c 0 -f ondemand &> /dev/null

I see during booting that the echo "LOCAL" is written but when I check for instance xset the values are the default and not what I want... the same applies for the cpufreq...

just in case if I run:

#/etc/rc.local

it works.. it does what I want but why not at boot-time?

I understood from the wiki that:

  • it is run after the basic setup (modules/daemons)

  • as the root user,

  • and whether or not X starts.

I'd appreciate it if someone can tell me how to set the rc.local

Last edited by bradomyn (2011-09-26 22:27:48)

Offline

#2 2011-09-26 22:27:30

bradomyn
Member
Registered: 2011-08-05
Posts: 15

Re: [solved] and yet this question..why my rc.local doesn't work

It's working actually, my bad.

First issue:

/usr/bin/cpufreq-set -c 1 -f ondemand &> /dev/null
/usr/bin/cpufreq-set -c 0 -f ondemand &> /dev/null

this two commands can be replaced by

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

for each of my cores in /etc/rc.local to set the governor during boot.

as  moetunes suggested me in this post:

https://bbs.archlinux.org/viewtopic.php?id=127165

and the other issue:

/usr/bin/xset dpms 180 360 720 &> /dev/null

well after reading the xorg documentation xset sets the values but the default values are going to be load after...overwriting. If I specify this values in the xorg.conf according to:

blanking section

http://www.shallowsky.com/linux/x-screen-blanking.html

Offline

#3 2011-09-27 00:23:21

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [solved] and yet this question..why my rc.local doesn't work

More likely, xset is erroring out because it requires X to be running... e.g.

$ DISPLAY= xset q
xset:  unable to open display ""

As you've already discovered, xorg.conf is a lovely place for it.

Offline

Board footer

Powered by FluxBB