Find the answer to your Linux question:
Results 1 to 7 of 7
Hi! Pardon me but I just decided to start another thread in "Misc" to be more specific to what I am trying to achieve. I feel. It is in relations ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272

    echo commands for /proc files


    Hi!

    Pardon me but I just decided to start another thread in "Misc" to be more specific to what I am trying to achieve. I feel. It is in relations to making the brightness settings of my laptop work using hot keys.

    Anyway, as I was trying to search system for possible solutions, I stumbled upon this and have tried to make adjustments to no avail.

    Code:
    root@jun-laptop:/# cd proc
    
    root@jun-laptop:/proc# cd acpi
    
    root@jun-laptop:/proc/acpi# cd video
    
    root@jun-laptop:/proc/acpi/video# cd GFX0
    
    root@jun-laptop:/proc/acpi/video/GFX0# 
    
    root@jun-laptop:/proc/acpi/video/GFX0# cd DD02
    
    root@jun-laptop:/proc/acpi/video/GFX0/DD02# ls
    brightness  EDID  info  state
    
    root@jun-laptop:/proc/acpi/video/GFX0/DD02# cat brightness
    levels:  5 15 25 35 45 55 65 75 85 95 100
    current: 100
    A friend who is an avid linux user mentioned that proc files cannot be easily manipulated but he thinks it can be done using "echo"?

    If this is truly possible, may I once again request for some help so that I can change the levels of brightness in my system?

    As always, thanks in advance!
    nujinini
    Linux User #489667

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,397
    The /proc files are both for current system state information as well as a means to manipulate system settings, such as, in your case, the display brightness. The data you see when you 'cat' one of the files is from the kernel. Try writing the level you want to that same file. Ie: echo 50 >brightness
    At worst it will ignore it. At best, your brightness level will change.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    Hello Rubberman!

    No dice. Not responding .....

    Code:
    root@jun-laptop:~# cd /proc/acpi/video/GFX0/DD02
    root@jun-laptop:/proc/acpi/video/GFX0/DD02# le:echo 50>brightness
    le:echo: command not found
    root@jun-laptop:/proc/acpi/video/GFX0/DD02# echo 50>brightness
    
    root@jun-laptop:/proc/acpi/video/GFX0/DD02# ls
    brightness  EDID  info  state
    root@jun-laptop:/proc/acpi/video/GFX0/DD02# cat brightness
    levels:  5 15 25 35 45 55 65 75 85 95 100
    current: 100
    root@jun-laptop:/proc/acpi/video/GFX0/DD02# echo 55>brightness
    
    root@jun-laptop:/proc/acpi/video/GFX0/DD02# ls
    brightness  EDID  info  state
    root@jun-laptop:/proc/acpi/video/GFX0/DD02# cat brightness
    levels:  5 15 25 35 45 55 65 75 85 95 100
    current: 100
    root@jun-laptop:/proc/acpi/video/GFX0/DD02#
    Did I execute it correctly. may I ask?
    nujinini
    Linux User #489667

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,397
    Put a space after the '55' before the '>'. It may not make any difference, but you were telling echo to send a new-line to fd 55, which is probably non-existent, so the results are indeterminate in the way you did it.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    Code:
    root@jun-laptop:/proc/acpi/video/GFX0/DD02# echo 25 >brightness
    root@jun-laptop:/proc/acpi/video/GFX0/DD02# cat brightness
    levels:  5 15 25 35 45 55 65 75 85 95 100
    current: 25
    root@jun-laptop:/proc/acpi/video/GFX0/DD02#
    Thank you very much for taking time!

    I think I got what I want
    nujinini
    Linux User #489667

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,397
    Kewl! Wonders will never cease! It sounds like you at least have a temporary work-around for this problem.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    Yeah!

    I noticed though that even if I set it at 55 or 5, the brightness seems to be the same. Its a little dim though. What was primarily removed was the glare (ouch!!!) off the screen. Kinder to my eyes.

    Thanks again.
    nujinini
    Linux User #489667

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •