You are not logged in.

#1 2010-12-26 12:55:10

STANKAR
Member
From: Czech Republic
Registered: 2010-11-16
Posts: 47

where are brightness and volume in percentage ?

Hi, i'm configuring conky and i don't see where are brightness and volume. I found temperatures in /sys/class/thermal/thermal_zone0/temp, but i didn't find brightness or volume, i tryed find it via checking keyboardkeys, but i think i have controlling brightness only in bios. I have shortcuts (Fn+left or right arrow) which works but i need percentage lighting display, which i'll use for conky. The same problem i have for volume. Thanks for help

Offline

#2 2010-12-26 13:09:04

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: where are brightness and volume in percentage ?

You have to grab it from amixer.

This line gets me the volume:

$ amixer get Master | tail -n 1 | cut -b 21-25 | sed -e 's/\[//g' -e 's/\]//g
38%

In conky you can execute this with ${execp <systemCommand>} (execp processes the output's keywords i.e. $alirgnr will align to the right rather than just be printed).

I have it executing a script which prints out all kinds of things. If you would like the line explaining then let me know.

Last edited by BaconPie (2010-12-26 13:17:02)

Offline

#3 2010-12-26 13:13:01

STANKAR
Member
From: Czech Republic
Registered: 2010-11-16
Posts: 47

Re: where are brightness and volume in percentage ?

THX Bacon Pie. It works and brightness ??

Offline

#4 2010-12-26 13:20:01

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: where are brightness and volume in percentage ?

The current brightness values are stored somewhere in /proc/acpi I think.

I haven't wrote anything for it because I can't control the brightness on either my desktop or laptop! Post if you need any help writing a command to single out the value though.

Offline

#5 2010-12-26 13:27:03

STANKAR
Member
From: Czech Republic
Registered: 2010-11-16
Posts: 47

Re: where are brightness and volume in percentage ?

BaconPie wrote:

The current brightness values are stored somewhere in /proc/acpi I think.

I haven't wrote anything for it because I can't control the brightness on either my desktop or laptop! Post if you need any help writing a command to single out the value though.

I found something like this, but this is output:

[root@acer ~]# cat /proc/acpi/video/OVGA/LCD/brightness 
<not supported>

Offline

#6 2010-12-26 13:30:37

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: where are brightness and volume in percentage ?

Check all the other files in /proc/acpi/video/OVGA/LCD/.

Just keep rooting around /proc/acpi/. How are you controlling brightness?

Offline

#7 2010-12-26 13:31:48

STANKAR
Member
From: Czech Republic
Registered: 2010-11-16
Posts: 47

Re: where are brightness and volume in percentage ?

BaconPie wrote:

Check all the other files in /proc/acpi/video/OVGA/LCD/.

Just keep rooting around /proc/acpi/. How are you controlling brightness?

[root@acer ~]# cat /proc/acpi/video/OVGA/CRT1/brightness 
<not supported>
[root@acer ~]# cat /proc/acpi/video/OVGA/DFP1/brightness 
<not supported>
[root@acer ~]# cat /proc/acpi/video/OVGA/DFP2/brightness 
<not supported>
[root@acer ~]# cat /proc/acpi/video/OVGA/DTV1/brightness 
<not supported>
[root@acer ~]# cat /proc/acpi/video/OVGA/DTV2/brightness 
<not supported>
[root@acer ~]# cat /proc/acpi/video/OVGA/LCD/brightness 
<not supported>

I controlling brightness via Fn+left or right arrow

Offline

#8 2010-12-26 13:55:05

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: where are brightness and volume in percentage ?

And how does Fn+left work?

Also, you only checked the brightness files, what about the info files (if there are any).

$ tree /proc/acpi/video

Check all of them.

Offline

#9 2010-12-26 14:02:24

STANKAR
Member
From: Czech Republic
Registered: 2010-11-16
Posts: 47

Re: where are brightness and volume in percentage ?

[root@acer ~]# cat /proc/acpi/video/OVGA/CRT1/info
device_id:    0x0100
type:         CRT
known by bios: no
[root@acer ~]# cat /proc/acpi/video/OVGA/DFP1/info
device_id:    0x0300
type:         UNKNOWN
known by bios: no
[root@acer ~]# cat /proc/acpi/video/OVGA/DFP2/info
device_id:    0x0600
type:         UNKNOWN
known by bios: no
[root@acer ~]# cat /proc/acpi/video/OVGA/DTV1/info
device_id:    0x0200
type:         TVOUT
known by bios: no
[root@acer ~]# cat /proc/acpi/video/OVGA/DTV2/info
device_id:    0x0500
type:         UNKNOWN
known by bios: no
[root@acer ~]# cat /proc/acpi/video/OVGA/LCD/info
device_id:    0x0400
type:         UNKNOWN
known by bios: no

I really don't know how Fn+key work but i checked all infos in previous post sad

Last edited by STANKAR (2010-12-26 14:04:17)

Offline

#10 2010-12-26 14:37:07

BaconPie
Member
Registered: 2010-08-11
Posts: 209

Re: where are brightness and volume in percentage ?

I don't know then, like I said I haven't been able to get brightness to work at all. Your best bet is finding out how your fn+key works to control the brightness. It will be putting a value somewhere, somehow. Figure out how it does it and then reverse engineer.

Offline

#11 2010-12-26 14:49:58

ferda
Member
Registered: 2010-02-05
Posts: 67

Re: where are brightness and volume in percentage ?

On my laptop (Asus) I have this file:

 cat /proc/acpi/video/VGA/LCDD/brightness 
levels:  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
current: 15

I don't know exactly, but maybe you need to load the acpi modules of
your notebook vendor?

Offline

#12 2010-12-26 15:17:18

STANKAR
Member
From: Czech Republic
Registered: 2010-11-16
Posts: 47

Re: where are brightness and volume in percentage ?

ferda wrote:

On my laptop (Asus) I have this file:

 cat /proc/acpi/video/VGA/LCDD/brightness 
levels:  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
current: 15

I don't know exactly, but maybe you need to load the acpi modules of
your notebook vendor?

I tried it but not work. And if i want writing something to /sys or /proc it say: I don't have permissions or Invalid argument

Offline

Board footer

Powered by FluxBB