You are not logged in.

#1 2014-01-16 23:18:09

Dyzaster
Member
Registered: 2013-03-26
Posts: 67

LED Keys are not working.

Ok so i have a Toshiba P850 with LED keys, when i turn my computer on they light up while im on the BIOS screen, and the BIOS has it enabled, however when i boot Arch Linux they dont show (Yet if i go with Debian they do) I know this is a configuration issue im just confused as to how.

When i try and edit

/sys/class/leds/toshiba::illumination/brightness

none of my changes actually save, this is while using "sudo nano".

What all is in my toshiba::illumination folder:

SeeThroughZone% cd /sys/class/leds/toshiba::illumination
SeeThroughZone% ls -a
.  ..  brightness  device  max_brightness  power  subsystem  trigger  uevent


Does anyone know what i need to do to enable this? Its really important to me lol. Thanks for any help guys!!

Offline

#2 2014-01-17 00:17:32

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,822

Re: LED Keys are not working.

I think you have to do it like this:  echo 'yourData' > /sys/class/leds/toshiba::illumination/brightness
"Files" in /sys are not real files.  They are handles to functions in the kernel to pass status out and commands in that are made to look like files to user space.
I do not know that a text editor handles file writes in the same manner the kernel expects it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-01-17 02:58:24

Dyzaster
Member
Registered: 2013-03-26
Posts: 67

Re: LED Keys are not working.

ewaller wrote:

I think you have to do it like this:  echo 'yourData' > /sys/class/leds/toshiba::illumination/brightness
"Files" in /sys are not real files.  They are handles to functions in the kernel to pass status out and commands in that are made to look like files to user space.
I do not know that a text editor handles file writes in the same manner the kernel expects it.

Yea ive actually done that, and this is what i get:

bash: /sys/class/leds/toshiba::illumination/brightness: Permission denied


I also have a script i edited (Got from here) Which i used and it always claimed to have edited it, but not once has it worked.

#!/bin/bash

#<- Configuration ->
disp=/sys/class/backlight/intel_backlight/brightness
dstep=2048
kbd=/sys/class/leds/toshiba::illumination/brightness
kstep=15
self="$(basename $0)"


#<- Error Handling ->
E_HELP=44
E_PERMS=45


#<- Function Declarations ->
permissions () {
    if [ "$UID" != 0 ]; then
echo "$self must be run with root privileges"
        exit "$E_PERMS"
    fi
}

usage () {
    echo "Usage: $self [-h|--help] [<increase|decrease> device]"
    exit "$E_HELP"
}

update-kbd () {
    permissions
    sudo tee "$kbd" <<< "$new"
    exit 0
}

update-disp () {
    permissions
    sudo tee "$disp" <<< "$new"
    exit 0
}


#<- Run Contents ->
case "$1" in
    -h|--help)
        usage
        ;;
    increase)
        case "$2" in
            keyboard)
                current="$(<"$kbd")"
                new="$(( current + kstep ))"
                update-kbd
                ;;
            display)
                current="$(<"$disp")"
                new="$(( current + dstep ))"
                update-disp
                ;;
            *)
                usage
                ;;
        esac
        ;;
    decrease)
        case "$2" in
            keyboard)
                current="$(<"$kbd")"
                new="$(( current - kstep ))"
                update-kbd
                ;;
            display)
                current="$(<"$disp")"
                new="$(( current - dstep ))"
                update-disp
                ;;
            *)
                usage
                ;;
        esac
        ;;
    *)
        usage
        ;;
esac

Also, i have attempted to run

sudo echo 275 > /sys/class/leds/toshiba::illumination/brightness

and i get the same error.
When i run the command in sudo su it goes through, but i notice no changes

Last edited by Dyzaster (2014-01-17 03:01:59)

Offline

#4 2014-01-17 03:42:19

toz
Member
Registered: 2011-10-28
Posts: 497

Re: LED Keys are not working.

No guarantees that this will actually get the LED keys to light up, but to clarify a couple of items...

Also, i have attempted to run

    sudo echo 275 > /sys/class/leds/toshiba::illumination/brightness

and i get the same error.

As a regular user, to avoid the permissions error, you need to use a command like:

echo XX | sudo tee /sys/class/leds/toshiba::illumination/brightness

...where XX is a value between 0 and the contents of /sys/class/leds/toshiba::illumination/max_brightness.

When i run the command in sudo su it goes through, but i notice no changes

If 275 is greater than the contents of max_brightness, then there will be no effect.

Offline

#5 2014-01-17 03:50:06

Dyzaster
Member
Registered: 2013-03-26
Posts: 67

Re: LED Keys are not working.

I tried that, it didnt work, my max_brightness is "1"
if i nano into brightness it says "255"

Offline

#6 2014-01-17 04:00:00

toz
Member
Registered: 2011-10-28
Posts: 497

Re: LED Keys are not working.

What happens if you echo 1 into that file:

echo 1 | sudo tee /sys/class/leds/toshiba::illumination/brightness

Offline

#7 2014-01-19 01:42:56

Dyzaster
Member
Registered: 2013-03-26
Posts: 67

Re: LED Keys are not working.

toz wrote:

What happens if you echo 1 into that file:

echo 1 | sudo tee /sys/class/leds/toshiba::illumination/brightness

Sorry I've taken so long to respond, right now I'm not at my system and my internet has been having issues, now its all up and running and ill test that once I get home

Offline

#8 2014-01-19 09:36:44

Dyzaster
Member
Registered: 2013-03-26
Posts: 67

Re: LED Keys are not working.

Well i did that, it did nothing. Didn't write the file nor did it make my keys do anything, i also tried using 200, 2, 3, 254, and a few random ones just for the heck of it, nothing happened.

Offline

#9 2014-02-21 11:48:09

Dyzaster
Member
Registered: 2013-03-26
Posts: 67

Re: LED Keys are not working.

Ok so i believe its a Kernel Module error, what module would i load exactly?

Offline

Board footer

Powered by FluxBB