i want to edit actual_brightness with gedit in (/sys/class/backlight/acpi_video0) to change brightness level. my way is pressing alt+f2 then gksudo gedit then enter the password after editing the number and press save
its give me (you don't have the permission necessary to save the file)

note:i cannot change brightness level from settings

where is the mistake?

| improve this question | | | | |
  • First of all what is you video adapter? Please edit your question and add output of lspci -k | grep -EA2 'VGA|3D' terminal command. And what is your computer model? – Pilot6 Jul 8 '15 at 20:51
  • possible duplicate of cat showing file content but mousepad and abiword won't – muru Jul 9 '15 at 8:46
  • Whatever I said about /proc is equally applicable to /sys. – muru Jul 9 '15 at 8:46

run ll /sys/class/backlight/acpi_video0 and you'll probably get something like this

% ll /sys/class/backlight/intel_backlight/
total 0
-r--r--r-- 1 root root 4096 Jul  6 14:01 actual_brightness
-rw-r--r-- 1 root root 4096 Jul  6 14:01 bl_power
-rw-r--r-- 1 root root 4096 Jul  6 14:01 brightness
lrwxrwxrwx 1 root root    0 Jul  6 14:01 device -> ../../card0-eDP-1
-r--r--r-- 1 root root 4096 Jul  6 14:01 max_brightness
drwxr-xr-x 2 root root    0 Jul  6 14:01 power
lrwxrwxrwx 1 root root    0 Jul  6 14:01 subsystem -> ../../../../../../../class/backlight
-r--r--r-- 1 root root 4096 Jul  6 14:01 type
-rw-r--r-- 1 root root 4096 Jul  6 14:01 uevent

actual_brightness is read-only. I'm guessing you're supposed to write to brightness, and actual_brightness will be automatically updated when/if your write to brightness causes an update.

Before you do this, though, try xbacklight.

| improve this answer | | | | |
  • did you try xbacklight? – user3113723 Jul 6 '15 at 23:00
  • you mean xbacklight file ? no i don't have it ... see the picture i.imgur.com/7e5NPcM.png – Mussab Abdulhameed Jul 6 '15 at 23:53
  • the program xbacklight – user3113723 Jul 7 '15 at 0:06
  • by mistake i delete my first replay it was (after i edit brightness file it say: could not create backup file while saving . save any way ? when press save any way it ask me again same question and repeat it) – Mussab Abdulhameed Jul 7 '15 at 0:13
  • seriously, use xbacklight. it will probably work. – user3113723 Jul 7 '15 at 0:16

To write a number to a system file you do it like this:

echo "5" | sudo tee /sys/class/backlight/acpi_video0/brightness


sudo tee /sys/class/backlight/acpi_video0/brightness <<< "5"

But in your case it may be not acpi_video0 but intel_backlight.

Depending on your laptop model and video adapter this issue can be fixed by adding kernel boot parameters.

| improve this answer | | | | |

2 possibilities I can think of:

  • Sudo ain't giving you "full" root rights. Sudo is just executing stuff with root's rights while still being you - roughly speaking. (It also does not require root password, but sudo password, this might even be the password of the user who is "sudo-ing") It might fix your problem if you try to become root: do "su" in the terminal and enter the roots password. You will see that your prompt will change to root@PCNAME. Then try editing the file with gedit (launch via this terminal session ofcourse) again.

  • If this does not work, it's simply not a permission problem (afaik) - the file is read-only. Part of the unix-philosophy is "everything is a file". Even devices, even not really "existing" stuff. It does not always make sense to have something writable. Example: No matter how much permissions you have, you never will be able to really mount an iso read-writeable. So: Try achieving the same without writing the "file" ;-)

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.