3

I have an Asus laptop, and the keyboard backlight comes on full at startup. I formerly used the instructions here to issue a sudo command to turn it off. Basically, the steps were:

  1. gksudo gedit /etc/rc.local
  2. put echo 0 > /sys/class/leds/asus::kbd_backlight/brightness before exit 0
  3. Save and sudo chmod +x /etc/rc.local

On upgrade to 15.04, this stopped working. And I can't seem to fix it. Any ideas???

Rsync
  • 1,274
  • 6
  • 19
  • 32

1 Answers1

2

This is because of the new systemd. try:

systemctl enable rc-local.service

To check status:

systemctl status rc-local.service

make sure that /etc/rc.local is executable and has #!/bin/sh in the first line.

niry
  • 921
  • 9
  • 16
  • Oh. That makes sense. FYI to future readers. When I entered systemctl enable rc-local.service. I got: `The unit files have no [Install] section. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are:
    1. A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory.
    2. A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it.
    3. A unit may be started when needed.` But when I checked the status, it did say active. Restarting now to see if if worked.
    – Rsync May 17 '15 at 16:13
  • It did not work.

    Here is the text of rc.local file: !/bin/sh -e sleep 15s echo 0 > /sys/class/leds/asus::kbd_backlight/brightness exit 0

    It is executable.

    – Rsync May 17 '15 at 16:47
  • Unfortunately, it still is not working -- even though rc-local.service has a status of active (exited). Here is what I now have in the rc.local file:
    #!/bin/sh -e (sleep 10 && echo 562 > /sys/class/backlight/intel_backlight/brightness) (sleep 5 && echo 0 > /sys/class/leds/asus::kbd_backlight/brightness) exit 0
    – Rsync May 23 '15 at 19:55
  • This worked under 16.04. First systemctl enable rc-local.service. Then paste this into /etc/rc.local --- #!/bin/sh -e (sleep 20 && echo 0 > /sys/devices/platform/asus-nb-wmi/leds/asus::kbd_backlight/brightness) exit 0. Then make /etc/rc.local executable with sudo chmod a+x /etc/rc.local. Finally, to check enter systemctl status rc-local.service. If all is working it should show green and active. – Rsync May 30 '16 at 02:01