Okay. I've been able to set my laptop's screen brighter by working with the program spicctrl and the sonypi device.
But everytime I boot, I login under my username then have to do the following every time... First I go into the bash terminal, then su because I can't do this under my login name
mknod /dev/sonypi c 10 250 #because sonypi is not listed in /dev - it disappears everytime I shut down
then I type
chmod o+w sonypi #because I want to be able under my login name, not root, to set the brightness
then i exit su
and type spicctrl --setbrightness=150
and it works...
My questions are:
Why do I have to recreate the device every time? Shouldn't it be there every time?
Your comments would be greatly appreciated.
Ralph Loizzo
Ralph Loizzo wrote:
Okay. I've been able to set my laptop's screen brighter by working with the program spicctrl and the sonypi device.
<SNIP!>
My questions are:
Why do I have to recreate the device every time? Shouldn't it be there every time?
Ralph,
If you are running CentOS 4, I believe CentOS 4 uses udev to create device files at boot. This is a new feature of the 2.6 kernel. This way the devices in the /dev directory should only represent what is present on the machine as opposed to having 1000s of device files to account for every last possibility.
I believe the configuration is handled in /etc/udev, but you should look at the udev man page to make sure. I seem to recall that there was a way to configure udev to "keep" certain device files.
I wish I had more information for you. The last time I configured dynamic device files it was with devfs, which was an earlier attempt at the same functionality.
Hope this helps,
Shawn M. Jones
On 7/30/05, Ralph Loizzo ralphloizzo@sbcglobal.net wrote:
Okay. I've been able to set my laptop's screen brighter by working with the program spicctrl and the sonypi device.
But everytime I boot, I login under my username then have to do the following every time... First I go into the bash terminal, then su because I can't do this under my login name
mknod /dev/sonypi c 10 250 #because sonypi is not listed in /dev - it disappears everytime I shut down
then I type
chmod o+w sonypi #because I want to be able under my login name, not root, to set the brightness
then i exit su
and type spicctrl --setbrightness=150
and it works...
As the following post indicated, you need to learn more about udev and how to setup devices using udev.
However, as a workaround, your can put the commands you have to issue manually in /etc/rc.d/rc.local and they will be issued each time you boot. Be aware:
1. You don't need sudo for commands in rc.local. 2. you need to code the absolute pathname to each command.
Try it, and you can forget about the problem until you learn a lot more about udev.
Collins Richey wrote:
On 7/30/05, Ralph Loizzo ralphloizzo@sbcglobal.net wrote:
Okay. I've been able to set my laptop's screen brighter by working with the program spicctrl and the sonypi device.
But everytime I boot, I login under my username then have to do the following every time... First I go into the bash terminal, then su because I can't do this under my login name
mknod /dev/sonypi c 10 250 #because sonypi is not listed in /dev - it disappears everytime I shut down
then I type
chmod o+w sonypi #because I want to be able under my login name, not root, to set the brightness
then i exit su
and type spicctrl --setbrightness=150
and it works...
As the following post indicated, you need to learn more about udev and how to setup devices using udev.
However, as a workaround, your can put the commands you have to issue manually in /etc/rc.d/rc.local and they will be issued each time you boot. Be aware:
- You don't need sudo for commands in rc.local.
- you need to code the absolute pathname to each command.
Try it, and you can forget about the problem until you learn a lot more about udev.
Well I went ahead and changed rc.local instead of rc.sysinit (which i had tried before) and it worked!
I will investigate udev at a later time, but at least now I can see my screen!
Thanks to you Collins and also to Shawn
Ralph Loizzo wrote:
Collins Richey wrote:
On 7/30/05, Ralph Loizzo ralphloizzo@sbcglobal.net wrote:
Okay. I've been able to set my laptop's screen brighter by working with the program spicctrl and the sonypi device.
But everytime I boot, I login under my username then have to do the following every time... First I go into the bash terminal, then su because I can't do this under my login name
As the following post indicated, you need to learn more about udev and how to setup devices using udev.
However, as a workaround, your can put the commands you have to issue manually in /etc/rc.d/rc.local and they will be issued each time you boot.
Well I went ahead and changed rc.local instead of rc.sysinit (which i had tried before) and it worked!
I will investigate udev at a later time, but at least now I can see my screen!
Thanks to you Collins and also to Shawn
This sounds much like the nvidia issues that plagued many nvidia driver users. The issue involved udev and the nvidia driver some time ago. I know it was answered in the Fedora list several times you may want to google udev and nvidia. There is some syntax that allows you to keep certain devices.
The problem was that you had to keep reinstalling the nvidia driver because udev would empty every reboot. To solve this the following was done as a result on google:
cp -a /dev/nvidia* /etc/udev/devices/ chown root: /etc/udev/devices/nvidia*
sooo..what you need to do is: cp -a /dev/sony* (perhaps /dev/sonypi?) /etc/udev/devices/ chown root: /etc/udev/devices/sony* (perhaps /dev/sonypi?)
I think this would solve your problem...much more cleanly and without having to muddle around with any rc.local anything, which is not particularly ideal especially when you (and this may not be your case) have to have a something present early on and not at the very end of the entire boot process.
HTH
Alex White
On Sat, 2005-07-30 at 11:09 -0500, Ralph Loizzo wrote:
Okay. I've been able to set my laptop's screen brighter by working with the program spicctrl and the sonypi device.
But everytime I boot, I login under my username then have to do the following every time... First I go into the bash terminal, then su because I can't do this under my login name
mknod /dev/sonypi c 10 250 #because sonypi is not listed in /dev - it disappears everytime I shut down
then I type
chmod o+w sonypi #because I want to be able under my login name, not root, to set the brightness
then i exit su
and type spicctrl --setbrightness=150
and it works...
My questions are:
Why do I have to recreate the device every time? Shouldn't it be there every time?
Your comments would be greatly appreciated.
Ralph-
Take a look at the files in /etc/makedev.d
I think you can do something like create a file in /etc/makedev.d called sonypi, with the following contents.
c $CONSOLE 10 250 1 1 sonypi
Sean