Author Topic: Accelerometer / Screen Orientation / Screen Resolution  (Read 5661 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 290
  • -Receive: 56
  • Posts: 1886
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Accelerometer / Screen Orientation / Screen Resolution
« on: October 27, 2015, 09:25:41 pm »
Hi

This is just a topic of discussion, it is not mean to be an active development.

After the SNAP presentation at Warpstock I was talking with some of the people there about some personal opinions on why the request of screen resolution on the fly change was necessary.  There are latops like the Thinkpad Yoga that on Windows when you change it to Tablet mode and Tent mode, it recognize the position of the screen and Windows changes the orientation of the screen.

Of course, we discussed that it may not be a resolution change, since flipping the monitor does not mean that there is resolution change on the fly, it only inverts screen, but it also shows that another driver not related to video is required, that is the accelerometer of the laptop.  (Or maybe I'm wrong and it is not only the accelerometer driver the one that define the position of the laptop)

And other topic of conversation showed up, that the acceloremeter on Thinkpad Laptops is used to "pause" the HDD when it detects movement. (It is called Lenovo Airbag Protection now).

Here it is the Windows screenshot of that functionality.



But If my memory does not plays me a wrong trick, this is very familar and I think that I used to see the same utility on OS/2 for the Thinkpad 600, 770 and maybe other Thinkpads.

So I searched for the older Thinkpad Drivers / Utilities on some sites like:
http://tp.omgema.lt/download.lenovo.com/lenovo/content/ddfm/600.html

I'm trying (under my own risk) the "Configuration utility for OS/2 - ThinkPad General" , just to check if I was right or wrong if that utility existed on OS/2 on the past, but the installer detects this is not a Thinkpad of that model and do not allows me to install it.

Do anybody can think on any trick to to install "Configuration utility for OS/2 - ThinkPad General" just to check it out? I don't think I can find a TP 600 or 770 to try it out.

Regards


« Last Edit: October 27, 2015, 09:46:59 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 290
  • -Receive: 56
  • Posts: 1886
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #1 on: October 27, 2015, 09:55:11 pm »
Hi

I was also checking on the Thinkpad Yoga 14 which seems to be some kind of acceloremeter driver. I found this one (check pictures attached)

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 14
  • Posts: 359
    • View Profile
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #2 on: October 28, 2015, 01:08:19 pm »
For me GPIO is General Purpose Input Output which is a common term with Microprocessors. IMHO this does not mean any sort of accelerator by definition but only an Input in this case. Maybe as simple as a switch on a special port pin (maybe as simple as reading a port pin from the parallel port like we did in the past but who knows). Of course any much more advanced device like an accelerometer can be handle by GPIO pins too. Although not very common as they usually are connected via some serial connection like I²C, SM-Bus, Com.....

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 290
  • -Receive: 56
  • Posts: 1886
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #3 on: October 28, 2015, 04:41:14 pm »
Thanks Andi B.

Any other comment on how to tweak the installer of Thinkpad Configuration is welcome. 
http://tp.omgema.lt/download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/uttpfos2.exe

It does not allows me to install the tool on other machine (as it meant to be), so any comments to try out the binaries of it are welcome.

Regards

Martin Iturbide
OS2World NewsMaster
... just share the dream.

Andy Willis

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 9
  • Posts: 172
    • View Profile
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #4 on: October 28, 2015, 10:45:36 pm »
Basically it is a basedev driver and an executable... from my config.sys:
REM BASEDEV=AODBSMD.SYS
and from the program directory:
tp.exe (dos) and tpmain.exe (os2)
It worked with the T42 but has not worked for me with the newer systems but I don't recall what exactly.
You should be able to just add the basedev statement and run the executable without running the install.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 290
  • -Receive: 56
  • Posts: 1886
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #5 on: October 29, 2015, 02:44:25 pm »
Hi Andy.

Can you verify if tpmain.exe has the utility to see the pause the thinkpad HDD when detects movement? (Like the screenshot I posted before from Windows). I think it this tool was available on older TP software for OS/2, but I'm only relying in my memory, so I can be wrong.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Andy Willis

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 9
  • Posts: 172
    • View Profile
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #6 on: November 05, 2015, 01:18:54 am »
I miswrote the executable names... should have been ps2.exe and ps2main.exe rather than the tp.  Anyhow, I do not recall anything for stopping the HDD but I can't actually double check as the basedev isn't loaded.

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 14
  • Posts: 359
    • View Profile
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #7 on: November 05, 2015, 12:33:41 pm »
I think you're mixing two different 'systems' here in this thread.

1) The hard disk protection built f.e. into Thinkpads since many years uses accelerometer devices to detect the strength of acceleration. Not sure if the accelerometer is built into the hard disk or on the motherboard or anywhere else in the Notebook. Either hard disk firmware or BIOS immediately puts the heads onto parking position when strong accelerations are detected.

If BIOS or hard disk stores such events and where that information is saved for reading by the user (OS via driver) is unknown to me. But obviously some models do as you pictures show.

2) Screen orientation change can be made by a simple switch, an extra accelerometer chip or the same accelerometer chip which is used for disk protection. Which one to choice is up to the Notebook manufacturer and can vary between different devices. Guess it's usually not the same as the one used for protection but who knows. As usual PC manufacturers hardly give any information on which system the use and no information about where these switches/chips are connected. If you do not find information where these data can be read for your specific device you will have a hard time re-engineering from what other systems/drivers do.

Question - which of the two systems is really important for OS/2? IMHO it's pretty useless to read out if the BIOS/hard disk does currently detected a crash and prevent disk failures by moving heads. Maybe if there were stored a counter somewhere how often this protection mechanism was triggered could be of some interest, but....

Screen orientation might be interesting if you have such device and it is usable with OS/2 (I suspect no for real work). If you can find the information about the connection of the switch to the system, the address where the information of current state is stored and coding of the info I can write you a driver to read it. But that does not help you very much cause someone has to check how hard it is to rotate screen in SNAP or Panorama. This largely depends on the used graphic controller too as for performance reason you hardly want to rotate screen in software (although doable).

Andy Willis

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 9
  • Posts: 172
    • View Profile
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #8 on: November 05, 2015, 05:55:41 pm »
I think you're mixing two different 'systems' here in this thread.

1) The hard disk protection built f.e. into Thinkpads since many years uses accelerometer devices to detect the strength of acceleration. Not sure if the accelerometer is built into the hard disk or on the motherboard or anywhere else in the Notebook. Either hard disk firmware or BIOS immediately puts the heads onto parking position when strong accelerations are detected.

If BIOS or hard disk stores such events and where that information is saved for reading by the user (OS via driver) is unknown to me. But obviously some models do as you pictures show.
Are you certain?  From what I recall from looking into it years ago was that a driver for the OS was required to park the drives.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 290
  • -Receive: 56
  • Posts: 1886
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #9 on: November 05, 2015, 11:12:32 pm »
Hi

I only need a way to trick the installer so I can test the files.
http://tp.omgema.lt/download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/uttpfos2.exe

My issue is that the installer recognize that I'm not using that TP model and the files of the installer are like FUELOS2.EX_, Is there a trick to make that kind of files to work without the installer? maybe that is to basic but I don't know.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 102
  • Posts: 1401
    • View Profile
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #10 on: November 06, 2015, 01:30:08 am »
Use unpack,
Code: [Select]
R:\tmp\OS2\UTILITY\OS2UTILS>unpack FUELOS2.EX_
FUELOS2.EX_
- FUELOS2.EXE
       0 file(s) copied.
       1 file(s) unpacked.

Or unpack *_
Here I get an error popup "This program can not run on this system"
« Last Edit: November 06, 2015, 01:32:59 am by Dave Yeo »

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 20
  • Posts: 341
    • View Profile
    • Blonde Guy
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #11 on: November 06, 2015, 03:48:33 am »
I found an old copy of thinkpad utilities for OS/2. It doesn't run on my Thinkpad, of course, which is far too new.

I know it's supposed to load the driver, so maybe I'll try it.

All it would do is check BIOS level and maybe turn the light on and off.

With the device driver installed (or not, it makes no difference), this is the result

Command not completed for some reason.
Try again later.
If the problem persists, have the system serviced.
« Last Edit: November 06, 2015, 03:51:33 am by Neil Waldhauer »
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 20
  • Posts: 341
    • View Profile
    • Blonde Guy
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #12 on: November 06, 2015, 03:53:30 am »

I found an old copy of thinkpad utilities for OS/2. It doesn't run on my Thinkpad, of course, which is far too new.

I know it's supposed to load the driver, so maybe I'll try it.

All it would do is check BIOS level and maybe turn the light on and off.

With the device driver installed (or not, it makes no difference), this is the result

Command not completed for some reason.
Try again later.
If the problem persists, have the system serviced.

The readme is attached to this message.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 14
  • Posts: 359
    • View Profile
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #13 on: November 08, 2015, 05:54:54 pm »
Quote
Are you certain?  From what I recall from looking into it years ago was that a driver for the OS was required to park the drives.
I'm pretty sure that my R52 does it via BIOS or harddisk firmware. Otherwise the whole crash protection would be useless for any OS. The predominate OS on Notebooks these days is by far no real time OS and no driver can guarantee the required reaction time. Especially when the OS is booting or shut down. And at that times these feature is most important from a users POV.

At the times of R52 Thinkpads where even sold without Win installed. Although a DOS driver if available would work more reliable than a Win one it does not cover the times when the OS is not running. So yes, from a technical POV I can not imagine that for crash protection a driver is needed. Although I've to admit I did not dig in further. Do you have some special insight to this feature for Thinkpads or for other brands?

Andy Willis

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 9
  • Posts: 172
    • View Profile
Re: Accelerometer / Screen Orientation / Screen Resolution
« Reply #14 on: November 09, 2015, 05:39:12 pm »
Quote
Are you certain?  From what I recall from looking into it years ago was that a driver for the OS was required to park the drives.
I'm pretty sure that my R52 does it via BIOS or harddisk firmware. Otherwise the whole crash protection would be useless for any OS. The predominate OS on Notebooks these days is by far no real time OS and no driver can guarantee the required reaction time. Especially when the OS is booting or shut down. And at that times these feature is most important from a users POV.

At the times of R52 Thinkpads where even sold without Win installed. Although a DOS driver if available would work more reliable than a Win one it does not cover the times when the OS is not running. So yes, from a technical POV I can not imagine that for crash protection a driver is needed. Although I've to admit I did not dig in further. Do you have some special insight to this feature for Thinkpads or for other brands?
I had thought it was firmware or BIOS but from what I recall (it was many years ago now, so it is hazy at best) it seemed that a driver was required for the OS.  It is possible, that the firmware or BIOS is controlling it until ACPI kicks in or something but I don't remember now any specifics.  It is possible I misread what I was looking at back then but I don't remember enough to say anything more.