On linux something is changing my backlight brightness. How to know what process it is?

2

I'm using Linux with a 3.9 kernel (BohdiLinux, but I'm looking for a distro (or at least desktop environment) agnostic answer).

Something is periodically (or on some event, perhaps) reseting the backlight level of my screen laptop, and I would like to know what process it is.

I naivly try to watch acess on /sys/class/backlight with inotifywatch[1], but events on /sys does not seems to be recorded.

I also try to see if there was some acpi events, but nothing was recorded by acpi_listen when the reset occures.

I have no idea of the process doing the reset, or even if it is always started or started on demand by another one, so I don't see how I could use lsof.

How could I progress from here ? Thanks for any advice !

[edit] :

[1] actual command: sudo inotifywatch -r -v /sys/class/backlight/

[2] actual command: sudo acpi_listen

[3] output

% sudo udevadm monitor --udev --property
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing

UDEV  [27661.753446] change   /devices/pci0000:00/0000:00:02.0/backlight/acpi_video1 (backlight)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:02.0/backlight/acpi_video1
SEQNUM=6027
SOURCE=sysfs
SUBSYSTEM=backlight
UDEV_LOG=7
USEC_INITIALIZED=27661753199

fanf42

Posted 2013-05-04T07:24:50.777

Reputation: 231

Answers

1

Mount tmpfs at /sys/class/backlight/ and inotifywatch it. You may add some symlinks there as well.

Mikhail Kupchik

Posted 2013-05-04T07:24:50.777

Reputation: 2 381

I don't succeed in making it works, could you please give some more explanation about how it should work ? – fanf42 – 2013-05-05T09:35:10.643

0

Have you tried top to see all running processes?

Also you can run ps -aux to get a snapshot of all running processes.

jason

Posted 2013-05-04T07:24:50.777

Reputation: 261

Yes, but both don't really fit for the task, as I don't know if it is a long running process or an ad hoc one, nor how it changes the backlight level. – fanf42 – 2013-05-05T06:41:10.840