Author Topic: Alarms, Why Not Kernel Level?  (Read 2417 times)

cpuffer_zaurus

  • Newbie
  • *
  • Posts: 31
    • View Profile
Alarms, Why Not Kernel Level?
« on: January 01, 2006, 10:49:15 pm »
I would like to be using my Z (860) more than I am. But the lack of working alarms is a problem.
Some people have gotten user space solutions to work, but I have not had any luck with this.
Depending on X and other dependencies being met for alarms to work, does not seem like the best of ideas.

So I would like to suggest that the kernel should take care of some of alarm/wakeup.

The kernel set a wakeup time as it suspends.
The kernel can wakeup and sound an alarm, if no other script listed in /etc/apm/alarm.d takes over.
The kernel can wakeup for a few seconds every hour to check on the next wakeup. (Since the real time clock on the Z is lacking.)

This would more dependable. Free the Z user space from having to make up for the lack of a real time clock. And keeping track of time and interfacing with hardware is what the kernel is suppose to be doing.
While I am sure my suggesting is not complete I think the idea is plain and can be done. I still am willing to pay to get this working. If someone with time and skills wants to email me with an estimate please do cpuffer@red-belt.org.

Charles Puffer

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Alarms, Why Not Kernel Level?
« Reply #1 on: January 08, 2006, 06:46:03 pm »
Quote
I would like to be using my Z (860) more than I am. But the lack of working alarms is a problem.
Some people have gotten user space solutions to work, but I have not had any luck with this.
Depending on X and other dependencies being met for alarms to work, does not seem like the best of ideas.

So I would like to suggest that the kernel should take care of some of alarm/wakeup.

The kernel set a wakeup time as it suspends.
The kernel can wakeup and sound an alarm, if no other script listed in /etc/apm/alarm.d takes over.
The kernel can wakeup for a few seconds every hour to check on the next wakeup. (Since the real time clock on the Z is lacking.)

This would more dependable. Free the Z user space from having to make up for the lack of a real time clock. And keeping track of time and interfacing with hardware is what the kernel is suppose to be doing.
While I am sure my suggesting is not complete I think the idea is plain and can be done. I still am willing to pay to get this working. If someone with time and skills wants to email me with an estimate please do cpuffer@red-belt.org.

Charles Puffer
[div align=\"right\"][a href=\"index.php?act=findpost&pid=109166\"][{POST_SNAPBACK}][/a][/div]

Actually, the kernel does do most of this stuff as part of the apm. You still need a userspace app to tell it when to suspend, wake up etc (kernel doesn't know which apps are installed and shouldn't be involved with these anyway).

Basically the situation at present is that we have add-ons to apps such as kopi that interact with the pdaXrom kernel. This could conceivably be built into kopi, but then it would possibly be too platform specific. Linux strengths lie in the power to manipulate this stuff through multiple programs, rather than having monolithic applications that do everything at once.
SL6000-L, RC12

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Alarms, Why Not Kernel Level?
« Reply #2 on: January 08, 2006, 09:26:54 pm »
I have no idea about what you mean by "making up for a lack of a RTC" as all pxa chips ship with a propper RTC

what you can do is write to the real time clock interface in the proc susbsystem that will susequently enable and activate the on board alarm to wake the device at a specified time,.

all it does is turn on the device, however if a userspace program polls the clock every second then the alarm should trigger, and as long as it dosent mind gaps of more than a second between polls then it should be fine

you second point: The kernel can wakeup and sound an alarm, if no other script listed in /etc/apm/alarm.d takes over. is somthing that no kernel should do. what it should do IMHO is run a preregistred user space program (like how hotplug regiseters itself throgh the proc interface see /proc/sys/kernel/hotplug)
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

gromituk

  • Full Member
  • ***
  • Posts: 207
    • View Profile
Alarms, Why Not Kernel Level?
« Reply #3 on: January 09, 2006, 05:10:10 am »
The KO/Pi alarm issue has been solved - see this thread.

shula

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Alarms, Why Not Kernel Level?
« Reply #4 on: January 10, 2006, 03:41:31 pm »
i wrote a command-line alarm utility, that uses the APM scripts etc.
if you're a command-line lover, try it
http://shula.is.dreaming.org/zaurus/zaurus-scripts.html

it depends on python,
and if you want a popup msgbox, you should have gtk  (pdaxrom's default anyway).
C860, pdaxrom rc8,
with Gnumeric as the perfect PIM :-)