All of lore.kernel.org
 help / color / mirror / Atom feed
* RFE: console_blank_hook that calls userspace helper
@ 2005-08-01 10:22 Eugene Pavlovsky
  2005-08-02 11:04 ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Eugene Pavlovsky @ 2005-08-01 10:22 UTC (permalink / raw)
  To: Linux Kernel

[-- Attachment #1: Type: text/plain, Size: 1797 bytes --]

http://bugzilla.kernel.org/show_bug.cgi?id=4767:

Bugzilla Bug 4767 	RFE: console_blank_hook that can call userspace
program
Submitter:   	heilong@bluebottle.com (Eugene Pavlovsky)

I think it'd be very good to have a console_blank_hook handler that
would call a
userspace program/script/generate hotplug event whatever. Currently,
the console
can only be blanked using APM, so no options exist for people using
ACPI. I've
got a Radeon graphics chip on my laptop, and the LCD backlight can be
controlled
(on/off) using radeontool. If there was a userspace callback
interface
to
console blanking, I would just make a callback script that calls
"radeontool
light off" on blank and "radeontool light on" on unblank - really
easy. I think
this userspace console_blank_hook handler is very simple to put into
kernel, but
I'm not a kernel developer myself, so wouldn't risk sending any
patches (that
call system("some_script")), because I probably won't make things as
they should
be in the kernel.


------- Additional Comment #1 From Eugene Pavlovsky 2005-06-29 06:46
-------

Created an attachment (id=5238)
implemented this functionality in a kernel module

I've actually checked the kernel sources on how this can be done and
implemented the proposed functionality in a kernel module. The module
attaches
a console blank hook function that uses kernel's
call_usermodehelper()
to
execute /sbin/user_vc_blank (defined at compile-time) to
blank/unblank
the
console. I've written a sample script (which I use on my laptop) that
uses
radeontool to turn the LCD backlight off/on. Maybe this functionality
should be
moved to the kernel. On the other hand, as it still needs userspace
utilities,
maybe it's better off as a module. Anyway, please give it a thought,
or at
least made this module available.


[-- Attachment #2: user_vc_blank-0.1.tar.gz --]
[-- Type: application/x-gzip, Size: 2818 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFE: console_blank_hook that calls userspace helper
  2005-08-01 10:22 RFE: console_blank_hook that calls userspace helper Eugene Pavlovsky
@ 2005-08-02 11:04 ` Pavel Machek
  2005-08-02 14:01   ` Gene Pavlovsky
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2005-08-02 11:04 UTC (permalink / raw)
  To: Eugene Pavlovsky; +Cc: Linux Kernel

Hi!

> http://bugzilla.kernel.org/show_bug.cgi?id=4767:
> 
> Bugzilla Bug 4767 	RFE: console_blank_hook that can call userspace
> program
> Submitter:   	heilong@bluebottle.com (Eugene Pavlovsky)
> 
> I think it'd be very good to have a console_blank_hook handler that
> would call a
> userspace program/script/generate hotplug event whatever. Currently,
> the console
> can only be blanked using APM, so no options exist for people using
> ACPI. I've
> got a Radeon graphics chip on my laptop, and the LCD backlight can be
> controlled
> (on/off) using radeontool. If there was a userspace callback
> interface
> to
> console blanking, I would just make a callback script that calls
> "radeontool
> light off" on blank and "radeontool light on" on unblank - really
> easy. I think
> this userspace console_blank_hook handler is very simple to put into
> kernel, but
> I'm not a kernel developer myself, so wouldn't risk sending any
> patches (that
> call system("some_script")), because I probably won't make things as
> they should
> be in the kernel.

Radeonfb should blank console automatically, without userspace
helper. Send a patch to do that ;-).

								Pavel

-- 
teflon -- maybe it is a trademark, but it should not be.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFE: console_blank_hook that calls userspace helper
  2005-08-02 11:04 ` Pavel Machek
@ 2005-08-02 14:01   ` Gene Pavlovsky
  2005-08-02 14:05     ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Gene Pavlovsky @ 2005-08-02 14:01 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Linux Kernel

I can try to do this, but it will have to wait, I've got too much work now.
Don't you think the userspace solution deserves a try?

Pavel Machek wrote:
> Hi!
> 
> 
>>http://bugzilla.kernel.org/show_bug.cgi?id=4767:
>>
>>Bugzilla Bug 4767 	RFE: console_blank_hook that can call userspace
>>program
>>Submitter:   	heilong@bluebottle.com (Eugene Pavlovsky)
>>
>>I think it'd be very good to have a console_blank_hook handler that
>>would call a
>>userspace program/script/generate hotplug event whatever. Currently,
>>the console
>>can only be blanked using APM, so no options exist for people using
>>ACPI. I've
>>got a Radeon graphics chip on my laptop, and the LCD backlight can be
>>controlled
>>(on/off) using radeontool. If there was a userspace callback
>>interface
>>to
>>console blanking, I would just make a callback script that calls
>>"radeontool
>>light off" on blank and "radeontool light on" on unblank - really
>>easy. I think
>>this userspace console_blank_hook handler is very simple to put into
>>kernel, but
>>I'm not a kernel developer myself, so wouldn't risk sending any
>>patches (that
>>call system("some_script")), because I probably won't make things as
>>they should
>>be in the kernel.
> 
> 
> Radeonfb should blank console automatically, without userspace
> helper. Send a patch to do that ;-).
> 
> 								Pavel
> 

-- 
The human knowledge belongs to the world

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFE: console_blank_hook that calls userspace helper
  2005-08-02 14:01   ` Gene Pavlovsky
@ 2005-08-02 14:05     ` Pavel Machek
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2005-08-02 14:05 UTC (permalink / raw)
  To: Gene Pavlovsky; +Cc: Linux Kernel

Hi!

> I can try to do this, but it will have to wait, I've got too much work now.
> Don't you think the userspace solution deserves a try?

Well, how do you unblank when something bad happens
(oops,panic?). Blanking should really be done from kernel.
								Pavel

> >>http://bugzilla.kernel.org/show_bug.cgi?id=4767:
> >>
> >>Bugzilla Bug 4767 	RFE: console_blank_hook that can call userspace
> >>program
> >>Submitter:   	heilong@bluebottle.com (Eugene Pavlovsky)
> >>
> >>I think it'd be very good to have a console_blank_hook handler that
> >>would call a
> >>userspace program/script/generate hotplug event whatever. Currently,
> >>the console
> >>can only be blanked using APM, so no options exist for people using
> >>ACPI. I've
> >>got a Radeon graphics chip on my laptop, and the LCD backlight can be
> >>controlled
> >>(on/off) using radeontool. If there was a userspace callback
> >>interface
> >>to
> >>console blanking, I would just make a callback script that calls
> >>"radeontool
> >>light off" on blank and "radeontool light on" on unblank - really
> >>easy. I think
> >>this userspace console_blank_hook handler is very simple to put into
> >>kernel, but
> >>I'm not a kernel developer myself, so wouldn't risk sending any
> >>patches (that
> >>call system("some_script")), because I probably won't make things as
> >>they should
> >>be in the kernel.
> > 
> > 
> > Radeonfb should blank console automatically, without userspace
> > helper. Send a patch to do that ;-).


-- 
Boycott Kodak -- for their patent abuse against Java.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-08-02 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-01 10:22 RFE: console_blank_hook that calls userspace helper Eugene Pavlovsky
2005-08-02 11:04 ` Pavel Machek
2005-08-02 14:01   ` Gene Pavlovsky
2005-08-02 14:05     ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.