linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [WISHLIST] IBM HD Shock detection in Linux
@ 2004-12-12 22:01 Niel Lambrechts
  2004-12-12 22:06 ` Jan Engelhardt
  2004-12-12 22:59 ` Bernd Eckenfels
  0 siblings, 2 replies; 22+ messages in thread
From: Niel Lambrechts @ 2004-12-12 22:01 UTC (permalink / raw)
  To: Linux Kernel ML

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

I picked this up from somewhere on the net, pity that it is not c
code...

The code apparently can display the horizon, but cannot prevent
shocks :(

-- 
Niel Lambrechts <antispam@telkomsa.net>

[-- Attachment #2: horizon.cs --]
[-- Type: text/x-csharp, Size: 5167 bytes --]

using System;
using System.IO;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Runtime.InteropServices;

public sealed class Accelerometer : IDisposable
{
	private const uint GENERIC_READ = 0x80000000;
	private const uint FILE_SHARE_READ = 1;
	private const uint FILE_SHARE_WRITE = 2;
	private const uint OPEN_EXISTING = 3;
	private readonly static IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
	private const uint IOCTL_SHOCKMGR_READ_ACCELEROMETER_DATA = 0x733fc;
	private const int FACILITY_WIN32 = unchecked((int)0x80070000);
	private IntPtr handle = INVALID_HANDLE_VALUE;
	private AccelerometerData sample;

	private static int HRESULT_FROM_WIN32(int x)
	{
		return x <= 0 ? x : ((x & 0x0000FFFF) | FACILITY_WIN32);
	}

	private struct AccelerometerData
	{
		internal int status;
		internal short x0;
		internal short y0;
		short x1;
		short y1;
		short x2;
		short y2;
		short x3;
		short y3;
		short x4;
		short y4;
		short x5;
		short y5;
		short x6;
		short y6;
		short x7;
		short y7;
		short x8;
		short y8;
		short x9;
		short y9;
		short x10;
		short y10;
		short x11;
		short y11;
		short x12;
		short y12;
		short x13;
		short y13;
		short unknown0;
		short unknown1;
	}

	[DllImport("kernel32.dll", SetLastError = true)]
	private static extern IntPtr CreateFile(string lpFileName, uint dwDesiredAccess, uint dwShareMode, IntPtr lpSecurityAttributes, uint dwCreationDisposition, uint dwFlagsAndAttributes, IntPtr hTemplateFile);

	[DllImport("kernel32.dll")]
	private static extern void CloseHandle(IntPtr handle);

	[DllImport("kernel32.dll", SetLastError = true)]
	private static extern bool DeviceIoControl(IntPtr hDevice, uint dwIoControlCode, IntPtr lpInBuffer, uint nInBufferSize, ref AccelerometerData lpOutBuffer, uint nOutBufferSize, ref uint lpBytesReturned, IntPtr lpOverlapped);

	public Accelerometer()
	{
		handle = CreateFile(@"\\.\ShockMgr", GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, IntPtr.Zero, OPEN_EXISTING, 0, IntPtr.Zero);
		if(handle == INVALID_HANDLE_VALUE)
		{
			GC.SuppressFinalize(this);
			Marshal.ThrowExceptionForHR(HRESULT_FROM_WIN32(Marshal.GetLastWin32Error()));
		}
	}

	~Accelerometer()
	{
		CloseImpl();
	}

	private void CloseImpl()
	{
		IntPtr h = handle;
		if(h != INVALID_HANDLE_VALUE)
		{
			handle = INVALID_HANDLE_VALUE;
			CloseHandle(h);
		}
	}

	public void ReadSample()
	{
		uint dwRead = 0;
		if(!DeviceIoControl(handle, IOCTL_SHOCKMGR_READ_ACCELEROMETER_DATA, IntPtr.Zero, 0, ref sample, 0x24, ref dwRead, IntPtr.Zero))
		{
			Marshal.ThrowExceptionForHR(HRESULT_FROM_WIN32(Marshal.GetLastWin32Error()));
		}
	}

	public int Status
	{
		get
		{
			return sample.status;
		}
	}

	public int X
	{
		get
		{
			return sample.x0;
		}
	}

	public int Y
	{
		get
		{
			return sample.y0;
		}
	}

	public void Dispose()
	{
		CloseImpl();
		GC.SuppressFinalize(this);
	}
}

namespace Horizon
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.Timer timer1;
		private Accelerometer sensor = new Accelerometer();

		public Form1()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//

		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.timer1 = new System.Windows.Forms.Timer(this.components);
			// 
			// timer1
			// 
			this.timer1.Enabled = true;
			this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(292, 266);
			this.Name = "Form1";
			this.Text = "Form1";

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

		private void timer1_Tick(object sender, System.EventArgs e)
		{
			sensor.ReadSample();
			Invalidate();
		}

		protected override void OnPaint(PaintEventArgs e)
		{
			base.OnPaint(e);
			float horizontal = 640;
			float vertical = 800;
			float y = sensor.Y;
			float angle = 90 * (y - horizontal) / (vertical - horizontal);
			e.Graphics.DrawString(angle.ToString(), Font, Brushes.Black, 0, 0);
			e.Graphics.TranslateTransform(ClientRectangle.Width / 2, ClientRectangle.Height / 2);
			e.Graphics.RotateTransform(- angle);
			e.Graphics.DrawLine(Pens.Black, - ClientRectangle.Width / 2, 0, ClientRectangle.Width / 2, 0);
		}
	}
}

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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-12 22:01 [WISHLIST] IBM HD Shock detection in Linux Niel Lambrechts
@ 2004-12-12 22:06 ` Jan Engelhardt
  2004-12-12 22:11   ` Niel Lambrechts
  2004-12-12 22:59 ` Bernd Eckenfels
  1 sibling, 1 reply; 22+ messages in thread
From: Jan Engelhardt @ 2004-12-12 22:06 UTC (permalink / raw)
  To: Niel Lambrechts; +Cc: Linux Kernel ML

>I picked this up from somewhere on the net, pity that it is not c
>code...

- there is "c" in "c#".
- the code looks really ugly (is this always the case with something that's 
written under windows?); make a silent rewrite if license allows :)

>The code apparently can display the horizon, but cannot prevent
>shocks :(

How can something prevent a shock if it does not know before? What I mean is 
that if I smack a harddrive, it can hardly evade it... nor can it prevent me 
from smacking it.



Jan Engelhardt
-- 
ENOSPC

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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-12 22:06 ` Jan Engelhardt
@ 2004-12-12 22:11   ` Niel Lambrechts
  2004-12-12 22:15     ` Jan Engelhardt
  2004-12-13  9:10     ` Sander
  0 siblings, 2 replies; 22+ messages in thread
From: Niel Lambrechts @ 2004-12-12 22:11 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Linux Kernel ML

On Sun, 2004-12-12 at 23:06 +0100, Jan Engelhardt wrote:
> >I picked this up from somewhere on the net, pity that it is not c
> >code...
> 
> - there is "c" in "c#".
> - the code looks really ugly (is this always the case with something that's 
> written under windows?); make a silent rewrite if license allows :)
> 
> >The code apparently can display the horizon, but cannot prevent
> >shocks :(
> 
> How can something prevent a shock if it does not know before? What I mean is 
> that if I smack a harddrive, it can hardly evade it... nor can it prevent me 
> from smacking it.

It can only prevent shocks when it detects tilts... like when the laptop
shakes in a moving vehicle for example..


Niel



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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-12 22:11   ` Niel Lambrechts
@ 2004-12-12 22:15     ` Jan Engelhardt
  2004-12-12 22:48       ` Jesper Juhl
  2004-12-13  8:05       ` [WISHLIST] IBM HD Shock detection in Linux Manu Abraham
  2004-12-13  9:10     ` Sander
  1 sibling, 2 replies; 22+ messages in thread
From: Jan Engelhardt @ 2004-12-12 22:15 UTC (permalink / raw)
  Cc: Linux Kernel ML

>> >The code apparently can display the horizon, but cannot prevent
>> >shocks :(
>> 
>> How can something prevent a shock if it does not know before? What I mean is 
>> that if I smack a harddrive, it can hardly evade it... nor can it prevent me 
>> from smacking it.
>
>It can only prevent shocks when it detects tilts... like when the laptop
>shakes in a moving vehicle for example..

Ah that's reasonable, like I'm dropping it (will probably tilt due to physics) 
and then hit the ground.
But what will it do to prevent against the schock, now that it knows it is 
tilted?



Jan Engelhardt
-- 
ENOSPC

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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-12 22:48       ` Jesper Juhl
@ 2004-12-12 22:41         ` Jan Engelhardt
  2004-12-14  0:41           ` Kevin Puetz
  2004-12-14  3:22         ` [OT] IBM Active Protection System (Re: [WISHLIST] IBM HD Shock detection in Linux) YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 1 reply; 22+ messages in thread
From: Jan Engelhardt @ 2004-12-12 22:41 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: Linux Kernel ML

>that it stops the harddrive. How effective that is I don't know - I have 
>no further knowledge or experience with this.

stop is a good operation, but I doubt the heads won't scratch the cyls when 
the disk is falling from a desk's height.



Jan Engelhardt
-- 
ENOSPC

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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-12 22:15     ` Jan Engelhardt
@ 2004-12-12 22:48       ` Jesper Juhl
  2004-12-12 22:41         ` Jan Engelhardt
  2004-12-14  3:22         ` [OT] IBM Active Protection System (Re: [WISHLIST] IBM HD Shock detection in Linux) YOSHIFUJI Hideaki / 吉藤英明
  2004-12-13  8:05       ` [WISHLIST] IBM HD Shock detection in Linux Manu Abraham
  1 sibling, 2 replies; 22+ messages in thread
From: Jesper Juhl @ 2004-12-12 22:48 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Linux Kernel ML

On Sun, 12 Dec 2004, Jan Engelhardt wrote:

> >> >The code apparently can display the horizon, but cannot prevent
> >> >shocks :(
> >> 
> >> How can something prevent a shock if it does not know before? What I mean is 
> >> that if I smack a harddrive, it can hardly evade it... nor can it prevent me 
> >> from smacking it.
> >
> >It can only prevent shocks when it detects tilts... like when the laptop
> >shakes in a moving vehicle for example..
> 
> Ah that's reasonable, like I'm dropping it (will probably tilt due to physics) 
> and then hit the ground.
> But what will it do to prevent against the schock, now that it knows it is 
> tilted?
> 
Knowing only what I could read here: 
http://www.pc.ibm.com/us/thinkpad/xseries/index.html#aps it would seem 
that it stops the harddrive. How effective that is I don't know - I have 
no further knowledge or experience with this.

-- 
Jesper Juhl



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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-12 22:01 [WISHLIST] IBM HD Shock detection in Linux Niel Lambrechts
  2004-12-12 22:06 ` Jan Engelhardt
@ 2004-12-12 22:59 ` Bernd Eckenfels
  1 sibling, 0 replies; 22+ messages in thread
From: Bernd Eckenfels @ 2004-12-12 22:59 UTC (permalink / raw)
  To: linux-kernel

In article <1102888882.15558.2.camel@ksyrium.local> you wrote:
> The code apparently can display the horizon, but cannot prevent
> shocks :(

This code is not helpfull since it uses a win32 ioctl. One would have to
know what this ioctl is doing with the disk. Personally I think it is either
using smart or its an april fools joke.

Greetings
Bernd

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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-12 22:15     ` Jan Engelhardt
  2004-12-12 22:48       ` Jesper Juhl
@ 2004-12-13  8:05       ` Manu Abraham
  1 sibling, 0 replies; 22+ messages in thread
From: Manu Abraham @ 2004-12-13  8:05 UTC (permalink / raw)
  To: linux-kernel

On Mon December 13 2004 2:15 am, Jan Engelhardt wrote:
> >> >The code apparently can display the horizon, but cannot prevent
> >> >shocks :(
> >>
> >> How can something prevent a shock if it does not know before? What I
> >> mean is that if I smack a harddrive, it can hardly evade it... nor can
> >> it prevent me from smacking it.
> >
> >It can only prevent shocks when it detects tilts... like when the laptop
> >shakes in a moving vehicle for example..
>
> Ah that's reasonable, like I'm dropping it (will probably tilt due to
> physics) and then hit the ground.
> But what will it do to prevent against the schock, now that it knows it is
> tilted?
When a tilt is detected, it would park the heads ? so that it would not 
affected from the larger shock ?

The platter/head is affected in a case where the arm swings away, even from 
the powerful magnet to crash against the platter. If the arm is locked, such 
that it does not move when a tilt is detected, (The tilt before the shock) 
the arm is parked and locked (more locking than the simple magnet) ?
 
Manu
>
>
>
> Jan Engelhardt

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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-12 22:11   ` Niel Lambrechts
  2004-12-12 22:15     ` Jan Engelhardt
@ 2004-12-13  9:10     ` Sander
  1 sibling, 0 replies; 22+ messages in thread
From: Sander @ 2004-12-13  9:10 UTC (permalink / raw)
  To: Niel Lambrechts; +Cc: Jan Engelhardt, Linux Kernel ML

Niel Lambrechts wrote (ao):
> On Sun, 2004-12-12 at 23:06 +0100, Jan Engelhardt wrote:
> > >The code apparently can display the horizon, but cannot prevent
> > >shocks :(
> > 
> > How can something prevent a shock if it does not know before? What I
> > mean is that if I smack a harddrive, it can hardly evade it... nor
> > can it prevent me from smacking it.
> 
> It can only prevent shocks when it detects tilts... like when the
> laptop shakes in a moving vehicle for example..

Of course it can't prevent shocks :-)

It can try to minimalize the impact of a shock though.

I am a happy owner of a X40. Just got it, so it still runs XP. The
software parks the heads of the disk if it detects movement. It is very
sensitive and quick so I believe it can protect the harddisk if the
notebook gets dropped during use.

In a car the software adapts to the usual bumps so the notebook is still
useful :-)

The windows software shows a picture of the notebook in 3D which tilts
if you tilt the actual notebook. Neat :-)

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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-12 22:41         ` Jan Engelhardt
@ 2004-12-14  0:41           ` Kevin Puetz
  0 siblings, 0 replies; 22+ messages in thread
From: Kevin Puetz @ 2004-12-14  0:41 UTC (permalink / raw)
  To: linux-kernel

Jan Engelhardt wrote:

>>that it stops the harddrive. How effective that is I don't know - I have
>>no further knowledge or experience with this.
> 
> stop is a good operation, but I doubt the heads won't scratch the cyls
> when the disk is falling from a desk's height.
 
It's not going to get the platter spun down, but it might survive if it
managed to get the head off the platter and into the cradle. If we figure
it's got a 20ms seek time (laptop drive, should be ~right) it should be
able to get the heads off to the side within about 4cm... clever :-)

> Jan Engelhardt



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

* [OT] IBM Active Protection System (Re: [WISHLIST] IBM HD Shock detection in Linux)
  2004-12-12 22:48       ` Jesper Juhl
  2004-12-12 22:41         ` Jan Engelhardt
@ 2004-12-14  3:22         ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 22+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-12-14  3:22 UTC (permalink / raw)
  To: juhl-lkml, jengelh, linux-kernel

In article <Pine.LNX.4.61.0412122345440.3369@dragon.hygekrogen.localhost> (at Sun, 12 Dec 2004 23:48:13 +0100 (CET)), Jesper Juhl <juhl-lkml@dif.dk> says:

> > But what will it do to prevent against the schock, now that it knows it is 
> > tilted?
> > 
> Knowing only what I could read here: 
> http://www.pc.ibm.com/us/thinkpad/xseries/index.html#aps it would seem 
> that it stops the harddrive. How effective that is I don't know - I have 
> no further knowledge or experience with this.

FYI: You can find their descriptions and stories in Japanese at:
  <http://www-6.ibm.com/jp/pc/design/haps.html>
  <http://www-6.ibm.com/jp/pc/interview/haps/>.

--yoshfuji

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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-10 20:17   ` Lee Revell
@ 2004-12-10 21:08     ` Alan Cox
  0 siblings, 0 replies; 22+ messages in thread
From: Alan Cox @ 2004-12-10 21:08 UTC (permalink / raw)
  To: Lee Revell; +Cc: Kay Sievers, Shawn Starr, Linux Kernel Mailing List

On Gwe, 2004-12-10 at 20:17, Lee Revell wrote:
> So in other words reverse engineer it.  Ugh.  I thought those days were
> behind us, at least with regards to "linux friendly" vendors like IBM.
> 
> Shawn, why don't you just ask IBM for the data sheet?

IBM are still really really bad about external data sheets and the like.
I spent over three years chasing IBM for docking station chip
information.

Alan


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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-10 20:03 ` Kay Sievers
@ 2004-12-10 20:17   ` Lee Revell
  2004-12-10 21:08     ` Alan Cox
  0 siblings, 1 reply; 22+ messages in thread
From: Lee Revell @ 2004-12-10 20:17 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Shawn Starr, linux-kernel

On Fri, 2004-12-10 at 21:03 +0100, Kay Sievers wrote:
> > Where can we find it on the motherboard or probe for it safely?
> 
> No idea. Look at shockprf.sys in the Windows driver:
> 

So in other words reverse engineer it.  Ugh.  I thought those days were
behind us, at least with regards to "linux friendly" vendors like IBM.

Shawn, why don't you just ask IBM for the data sheet?

Lee


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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-10  8:39 Shawn Starr
  2004-12-10 19:59 ` Lee Revell
@ 2004-12-10 20:03 ` Kay Sievers
  2004-12-10 20:17   ` Lee Revell
  1 sibling, 1 reply; 22+ messages in thread
From: Kay Sievers @ 2004-12-10 20:03 UTC (permalink / raw)
  To: Shawn Starr; +Cc: linux-kernel

On Fri, 2004-12-10 at 03:39 -0500, Shawn Starr wrote:
> > Lee Revell <rlrevell <at> joe-job.com> writes:
> > 
> > > 
> > > On Wed, 2004-12-01 at 13:31 -0500, Shawn Starr wrote:
> > > > While I have seen this feature in XP, It would be nice to have such 
> > > > functionality in Linux. Does anyone know if this is being worked on 
> > > > somewhere?
> > > 
> > > What is it?  What does it do?  How does it work?  Got a link?
> > 
> > It's a motion detector on the motherboard.
> > 
> > Here is an IBM whitepaper:
> >   ftp://ftp.software.ibm.com/pc/pccbbs/mobiles_pdf/aps2mst.pdf

> Where can we find it on the motherboard or probe for it safely?

No idea. Look at shockprf.sys in the Windows driver:

  Shockproof Disk Driver
  Copyright (C) IBM Corp. 2002, 2003
  Autonomic HDD Protection Manager
  IBM Hard Drive Active Protection System

You will find something like that:

  .text:00010409                 push    0Ah
  .text:0001040B                 push    3F6h
  .text:00010410                 call    ds:WRITE_PORT_UCHAR
  ...
  .text:00014661                 push    7
  .text:00014663                 push    2Eh
  .text:00014665                 call    esi ; WRITE_PORT_UCHAR
  ...
  .text:00014672                 push    7
  .text:00014674                 push    2Fh
  .text:00014676                 call    esi ; WRITE_PORT_UCHAR
  ...
  .text:0001467C                 push    60h
  .text:0001467E                 push    2Eh
  .text:00014680                 call    esi ; WRITE_PORT_UCHAR
  ...
  .text:0001482E                 push    1F0h
  .text:00014833                 call    ds:READ_PORT_USHORT

Good luck,
Kay


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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-10  8:39 Shawn Starr
@ 2004-12-10 19:59 ` Lee Revell
  2004-12-10 20:03 ` Kay Sievers
  1 sibling, 0 replies; 22+ messages in thread
From: Lee Revell @ 2004-12-10 19:59 UTC (permalink / raw)
  To: Shawn Starr; +Cc: linux-kernel, Kay Sievers

On Fri, 2004-12-10 at 03:39 -0500, Shawn Starr wrote:
> > Lee Revell <rlrevell <at> joe-job.com> writes:
> > 
> > > 
> > > On Wed, 2004-12-01 at 13:31 -0500, Shawn Starr wrote:
> > > > While I have seen this feature in XP, It would be nice to have such 
> > > > functionality in Linux. Does anyone know if this is being worked on 
> > > > somewhere?
> > > 
> > > What is it?  What does it do?  How does it work?  Got a link?
> > 
> > It's a motion detector on the motherboard.
> > 
> > Here is an IBM whitepaper:
> >   ftp://ftp.software.ibm.com/pc/pccbbs/mobiles_pdf/aps2mst.pdf
> > 
> > Kay
> 
> Where can we find it on the motherboard or probe for it safely?
> 

Exactly.  All the IBM people on this list and not one remotely useful
post.  I can contact marketing@ibm.com or something if I want a bunch of
fluff.  That whitepaper is just a user level guide for the Windows
driver ferchrissake.

Obviously it's a motion detector on the motherboard.  How do we freaking
TALK to it?  As in, what bits to we write to what registers to do what.

Anyway, Linux support doesn't look good, if IBM isn't going to help.

Lee


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

* Re: [WISHLIST] IBM HD Shock detection in Linux
@ 2004-12-10  8:39 Shawn Starr
  2004-12-10 19:59 ` Lee Revell
  2004-12-10 20:03 ` Kay Sievers
  0 siblings, 2 replies; 22+ messages in thread
From: Shawn Starr @ 2004-12-10  8:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: Kay Sievers

> Lee Revell <rlrevell <at> joe-job.com> writes:
> 
> > 
> > On Wed, 2004-12-01 at 13:31 -0500, Shawn Starr wrote:
> > > While I have seen this feature in XP, It would be nice to have such 
> > > functionality in Linux. Does anyone know if this is being worked on 
> > > somewhere?
> > 
> > What is it?  What does it do?  How does it work?  Got a link?
> 
> It's a motion detector on the motherboard.
> 
> Here is an IBM whitepaper:
>   ftp://ftp.software.ibm.com/pc/pccbbs/mobiles_pdf/aps2mst.pdf
> 
> Kay

Where can we find it on the motherboard or probe for it safely?

Shawn.

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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-01 18:57   ` Robert Love
@ 2004-12-02 13:21     ` Ian Soboroff
  0 siblings, 0 replies; 22+ messages in thread
From: Ian Soboroff @ 2004-12-02 13:21 UTC (permalink / raw)
  To: linux-kernel

Robert Love <rml@novell.com> writes:

> On Wed, 2004-12-01 at 13:42 -0500, Lee Revell wrote:
>
>> What is it?  What does it do?  How does it work?  Got a link?
>
> Modern ThinkPads have accelerometers in their hard drives that detect
> sudden movement and spin down the drive or otherwise protect it.
>
> The device is pretty basic, though, and you can just read it directly to
> watch the movement of your laptop.  E.g., pick your laptop up and a
> little icon in your GNOME panel can show an up arrow.  Pretty neat.

This needs to be added to the input layer!

Till Harbaum wired up an accelerometer inside his Palm Pilot, then
wrote a marble rolling game that you could play by tilting the palm to
move the marble.  http://www.harbaum.org/till/palm/adxl202/index.html

Ian



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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-01 18:42 ` Lee Revell
  2004-12-01 18:57   ` Robert Love
@ 2004-12-01 20:51   ` Kay Sievers
  1 sibling, 0 replies; 22+ messages in thread
From: Kay Sievers @ 2004-12-01 20:51 UTC (permalink / raw)
  To: linux-kernel

Lee Revell <rlrevell <at> joe-job.com> writes:

> 
> On Wed, 2004-12-01 at 13:31 -0500, Shawn Starr wrote:
> > While I have seen this feature in XP, It would be nice to have such 
> > functionality in Linux. Does anyone know if this is being worked on 
> > somewhere?
> 
> What is it?  What does it do?  How does it work?  Got a link?

It's a motion detector on the motherboard.

Here is an IBM whitepaper:
  ftp://ftp.software.ibm.com/pc/pccbbs/mobiles_pdf/aps2mst.pdf

Kay


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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-01 18:31 Shawn Starr
  2004-12-01 18:42 ` Lee Revell
@ 2004-12-01 20:13 ` Joseph Pingenot
  1 sibling, 0 replies; 22+ messages in thread
From: Joseph Pingenot @ 2004-12-01 20:13 UTC (permalink / raw)
  To: Shawn Starr; +Cc: linux-kernel

>From Shawn Starr on Wednesday, 01 December, 2004:
>While I have seen this feature in XP, It would be nice to have such 
>functionality in Linux. Does anyone know if this is being worked on 
>somewhere?

How is this different from the g-forces information checked by smartd?

-Joseph

-- 
trelane@digitasaru.net--------------------------------------------------
"Not many political contributions are available from the poor children
  of Texas, but then one always has Microsoft."  --Tom Adelstein
                            http://linuxjournal.com/article.php?sid=7750

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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-01 18:42 ` Lee Revell
@ 2004-12-01 18:57   ` Robert Love
  2004-12-02 13:21     ` Ian Soboroff
  2004-12-01 20:51   ` Kay Sievers
  1 sibling, 1 reply; 22+ messages in thread
From: Robert Love @ 2004-12-01 18:57 UTC (permalink / raw)
  To: Lee Revell; +Cc: Shawn Starr, linux-kernel

On Wed, 2004-12-01 at 13:42 -0500, Lee Revell wrote:

> What is it?  What does it do?  How does it work?  Got a link?

Modern ThinkPads have accelerometers in their hard drives that detect
sudden movement and spin down the drive or otherwise protect it.

The device is pretty basic, though, and you can just read it directly to
watch the movement of your laptop.  E.g., pick your laptop up and a
little icon in your GNOME panel can show an up arrow.  Pretty neat.

I am sure Google has more information.

	Robert Love



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

* Re: [WISHLIST] IBM HD Shock detection in Linux
  2004-12-01 18:31 Shawn Starr
@ 2004-12-01 18:42 ` Lee Revell
  2004-12-01 18:57   ` Robert Love
  2004-12-01 20:51   ` Kay Sievers
  2004-12-01 20:13 ` Joseph Pingenot
  1 sibling, 2 replies; 22+ messages in thread
From: Lee Revell @ 2004-12-01 18:42 UTC (permalink / raw)
  To: Shawn Starr; +Cc: linux-kernel

On Wed, 2004-12-01 at 13:31 -0500, Shawn Starr wrote:
> While I have seen this feature in XP, It would be nice to have such 
> functionality in Linux. Does anyone know if this is being worked on 
> somewhere?

What is it?  What does it do?  How does it work?  Got a link?

Lee


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

* [WISHLIST] IBM HD Shock detection in Linux
@ 2004-12-01 18:31 Shawn Starr
  2004-12-01 18:42 ` Lee Revell
  2004-12-01 20:13 ` Joseph Pingenot
  0 siblings, 2 replies; 22+ messages in thread
From: Shawn Starr @ 2004-12-01 18:31 UTC (permalink / raw)
  To: linux-kernel


While I have seen this feature in XP, It would be nice to have such 
functionality in Linux. Does anyone know if this is being worked on 
somewhere?

Shawn.

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

end of thread, other threads:[~2004-12-14  3:21 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-12 22:01 [WISHLIST] IBM HD Shock detection in Linux Niel Lambrechts
2004-12-12 22:06 ` Jan Engelhardt
2004-12-12 22:11   ` Niel Lambrechts
2004-12-12 22:15     ` Jan Engelhardt
2004-12-12 22:48       ` Jesper Juhl
2004-12-12 22:41         ` Jan Engelhardt
2004-12-14  0:41           ` Kevin Puetz
2004-12-14  3:22         ` [OT] IBM Active Protection System (Re: [WISHLIST] IBM HD Shock detection in Linux) YOSHIFUJI Hideaki / 吉藤英明
2004-12-13  8:05       ` [WISHLIST] IBM HD Shock detection in Linux Manu Abraham
2004-12-13  9:10     ` Sander
2004-12-12 22:59 ` Bernd Eckenfels
  -- strict thread matches above, loose matches on Subject: below --
2004-12-10  8:39 Shawn Starr
2004-12-10 19:59 ` Lee Revell
2004-12-10 20:03 ` Kay Sievers
2004-12-10 20:17   ` Lee Revell
2004-12-10 21:08     ` Alan Cox
2004-12-01 18:31 Shawn Starr
2004-12-01 18:42 ` Lee Revell
2004-12-01 18:57   ` Robert Love
2004-12-02 13:21     ` Ian Soboroff
2004-12-01 20:51   ` Kay Sievers
2004-12-01 20:13 ` Joseph Pingenot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).