Comment 94 for bug 357673

Revision history for this message
nsoriano (el-gartito15) wrote : Re: No notification when sliding audio volume, muting volume, sliding LCD brightness on ThinkPad X31, X32, X60, T22, T42, T60, R50e, R51, R52

After trying to resolve my notification feedback problem (volume and brightness) with Johannes Hessellund solution and roundly failed in my attempt, I decided to give it a try with bwalex's solution (C program), which worked out pretty well.

After checking out the source code I noticed the program constantly read's from the processes filesystems /proc/acpi/ibm/volume, /proc/acpi/ibm/brightness and /proc/acpi/video/VID/LCD0/brightness so it can accordingly call the function that will display the pop-up notification. I tried to imagine a better way to make the calls to the functions without the constant need to read from the procfs files, this led me to an inode-based filesystem notification technology called inotify. With this tool I managed to make the calls to the functions that will display de pop-up notifications only when the procfs presented an event (File was read from, File was written to, File was opened, etc.). In this way I assume the CPU has less activity and earns processing time, either way you can correct me.

A special thanks to bwalex from which whom's code I reused to create this new version.

P.S. Hoping this program can help other people just like it did to me.