Henrique de Moraes Holschuh wrote:
> Maybe video.ko will be able to be told not to react to the events, and just
> report them AND export the backlight interface to userspace. That would fix
> the issues people have currently (when they are caused by bad userspace
> configuration, usually by distros).
There are so many programs interacting in different ways, it's almost
surprising it works on any laptops. :)
> > acpi_listen shows the brightness up/down events the same regardless of
> > whether video.ko was ever loaded, so that trick doesn't seem to affect
> > anything here. So my solution for now will likely be an ACPI handler
>
> That means you already have the good behaviour (you get the events). Nice.
>
> You will need acpi handlers, yes. I wish I knew how to ask the kernel "is
> the current VT a text console, or a X video port?", but I have
> no idea how to do that.
>From userspace, I think this does the trick:
#include <linux/kd.h>
int fd, arg;
fd = open("/dev/console", O_NOCTTY);
ioctl(fd, KDGETMODE, &arg);
if (arg == KD_GRAPHICS)
printf("X");
else
printf("text");
-jim
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
ibm-acpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel