maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Automatic screen rotate for N810 (https://talk.maemo.org/showthread.php?t=19447)

emjayes 2008-04-22 21:09

Automatic screen rotate for N810
 
Update:
version 0.0.25diablo now has automatic installation of required packages.

Please ignore the most of this post, as I do not intend to keep it up to date.

If you're running Diablo, click this: http://mikie.dy.fi/maemo/sliderotate-diablo.install
If you're running Chinook, click this: http://mikie.dy.fi/maemo/rotate.install

Go to last page of this thread to see whats going on.


DO NOT QUOTE INSTALL INSTRUCTIONS BELOW THIS LINE IF YOU REPLY TO THIS THREAD!
THEY ARE OUTDATED, AND KEPT ONLY FOR HISTORICAL REFERENCE!
Most of the information after this line is outdated.
--------------------------------------------------------------------------------------

Diablo is now supported in version 0.0.20.diablo
From now on only the version for Diablo will be updated.

Update: 0.0.21.diablo now has configurable portrait orientation.

Now available in http://sliderotate.garage.maemo.org
EDIT: I really should rewrite this post, since so much has changed, but sadly don't have the time now.
You do want to read this thread, the answers are here.
Please always use this thread for questions, do not start a new one to ask something, since I have a hard time following the few ones I am subscribed to.
Minimal instructions: install this (Chinook). or this (Diablo) then follow the information that you get when installing.
Which is: open xterm, and then:
Code:

sudo gainroot
./install-xrandr-kernel

and reboot.




EDIT: ignore my blog entry, everything you need to know is/will be in this thread
Also, this works as well on a N800 (with OS2008) sans automatic rotation, because of the lack of sliding keyboard.

See my blog entry here:
http://mymaemo.blogspot.com/2008/04/...-for-n810.html


Automatic screen rotate for N810

After testing the taskbar applet to rotate the screen in my N810, I thought it would be much easier to use the power key to initiate rotation.

Also when opening the keyboard, I wanted the screen to automatically rotate to landscape to be able to see what I was writing and return to portrait mode when the keyboard is closed.

Now it can be done:

This package provides the following functions:
-screen is rotated to portrait / landscape mode by
a) pressing the power key
b) pressing and holding the Application switch key for more than one second.

If the keyboard is opened when the screen is rotated to portrait mode, it will be rotated to landscape mode.

When the keyboard is closed, the screen is rotated back to portrait mode, if it was already in portrait mode when the keyboard was opened.

You will need to install the xserver-xomap with RandR support, as well as flash the kernel with RrandR support before this package will do anything. Since the updated components can't be a dependecy, you are required to do it yourself.


This one-click-install will provide you with an updateable xserver-xomap if you are not already using it.

After the package installation is complete, update the xserver-xomap by either the application manager or apt-get.

Then flash your N810 with this kernel and reboot to complete the installation

If you do not know how to flash the kernel or update the xserver-xomap, you are advised not to install this package at all, as you may brick your device while experimenting.

The RandR supporting kernel and xserver-xomap are provided by http://sse2.net/rotate/

If you don't like to have the power menu appear when using the power key to initiate rotation,
edit /etc/mce/mce.ini:

PowerKeyShortAction=disabled
PowerKeyLongAction=menu
PowerKeyDoubleAction=menu

Then you can rotate the screen with a short press, but still can access the menu with long press, or double-clicking it.

nilchak 2008-04-22 21:15

Re: Automatic screen rotate for N810
 
I do seriously hope that this goes into Diablo ....

and particularly for not so brave souls (like myself), where the new Nokia Diablo kernel comes with these fixes and R&R support.

But thanks nevertheless to you for this easy fix, once the kernel hack is applied.

emjayes 2008-04-25 13:02

Re: Automatic screen rotate for N810
 
Update:
the one-click install now provides the tools necessary for flashing the kernel in device.
You don't need a desktop PC to flash the kernel anymore (thank fanoush for the tools http://fanoush.wz.cz/maemo/ ).
Install the package, exit Application manager, run xterm:
sudo gainroot
/root/install-xrandr-kernel

this will install the RandR enabled kernel and xserver , as well as modify mce.ini to disable PowerKeyShortAction to only rotate the screen, instead of giving the power menu.

answer y or yes to couple of questions an voilá, rotating N8X0.

Use power key to rotate the screen (N800/N810)
Open the keyboard (N810) to rotate back to landscape, close it to return to the
previous orientation.

As always: REMEMBER TO TAKE A BACKUP FIRST!!!!!!!!!!!
It has worked flawlessly for more than 10 test installations on both N800 and N810, but you never know.

Benson 2008-04-25 13:40

Re: Automatic screen rotate for N810
 
Nice work; having it wrapped up will make a lot more people use portrait mode, and hopefully that will result in more apps handling portrait well..

For my part, I'm already using powerlaunch, so I won't be using it, but if I had an N810, I'd rip the keyboard bit!

munky261 2008-04-25 17:07

Re: Automatic screen rotate for N810
 
can the statusbar applet still be installed and used with this?

Benson 2008-04-25 17:15

Re: Automatic screen rotate for N810
 
Why wouldn't it work? Just try it.

Cruelkix 2008-04-25 17:37

Re: Automatic screen rotate for N810
 
I did everything the post said and i don't think it worked.....

The install went smoothly, and after a lot of "ok" presses i went into x term and installed the kernal provided. It seemed to go smoothly as well. Restarted but when i short hit the power nothing happens.

If i double tap I get the Menu. And obvously if i hold it down it turns off. Single tap ... nothing.

Bundyo 2008-04-25 18:57

Re: Automatic screen rotate for N810
 
Since i'm using powerlaunch - is it possible to make double click rotation?

emjayes 2008-04-25 19:45

Re: Automatic screen rotate for N810
 
For those useing powerlaunch,install the rotate applet and use that to rotate to portrait.
I will make changes to enable the long-home-keypress again.
I will notify you when it's done. Most likely monday.

Double click rotation and longpress is troublesome, because you will still get the powermenu. This can be prevented with short press.
That's why I chose short press for rotation.

Bear in mind this is a work in progress, so there will be changes and updates.

to rotate the screen from command line run: xrandr -o left
then play with the slide.

qwerty12 2008-04-25 19:50

Re: Automatic screen rotate for N810
 
Thanks but powerlaunch doesn't use systemui. All config files are in /etc/powerlaunch

Bit complicated but extremely customizable.

emjayes 2008-04-25 20:02

Re: Automatic screen rotate for N810
 
Ok, just made an update.
update to 0.0.12 it now responds to long-home-press too.

for update install-xrandr-kernel is not necessary, only for first time installers.

josiahg777 2008-04-25 20:08

Re: Automatic screen rotate for N810
 
Awesome! Just finished installing :) The whole process went very smoothly, and now I'm lovin the rotation :) thanks emjays and fanoush!

alslayer 2008-04-25 20:16

Re: Automatic screen rotate for N810
 
I would love to see some pics of the rotated view. Could someone provide them please.
:)

Benson 2008-04-25 20:27

Re: Automatic screen rotate for N810
 
Quote:

Originally Posted by Bundyo (Post 174708)
Since i'm using powerlaunch - is it possible to make double click rotation?

Yes, it's possible; have a short power press trigger a timer; and if another power press occurs within that timer, run a script that checks current rotation and toggles to the other. (I've got a crude script for rotating + and - 90 degrees, etc., over in the initial thread on OS2008 xrandr; that should be a useful example.)

munky261 2008-04-25 20:30

Re: Automatic screen rotate for N810
 
is there anyway to keep the last statusbar icon on the left from laying over the word "home" ? is there anyway to just remove the word from the theme?

Benson 2008-04-25 20:34

Re: Automatic screen rotate for N810
 
The pictures won't look any different, really; it doesn't matter how you rotate the screen. :rolleyes:
(And there's plenty around already...)
But I'll post one anyway. Meet me in the screenshot thread in 5 minutes.

Oberon85 2008-04-25 21:14

Re: Automatic screen rotate for N810
 
Just installed this, and it rocks!! Now I have to figure out how to get my desktop layout to change positioning when rotated... My RSS feed disappears off the right side of my screen when rotated...

thanks for the work!!
Oberon85

emjayes 2008-04-25 22:31

Re: Automatic screen rotate for N810
 
Just put the most needed applets to the left when in landspace mode
the ones on right will be off screen when rotated to portrait mode.

grog 2008-04-26 15:31

Re: Automatic screen rotate for N810
 
Thanks for this. Works great on my N800. Just one thing. Is there a way to reverse the settings so that a single-click activates the power menu & a double-click rotates?

emjayes 2008-04-26 15:59

Re: Automatic screen rotate for N810
 
That will require some extra code, I will study some more and see if it can be implemented.
For now use the home key (long press) to avoid conflict with powerlaunch.

grog 2008-04-26 16:35

Re: Automatic screen rotate for N810
 
Quote:

Originally Posted by emjayes (Post 174984)
That will require some extra code, I will study some more and see if it can be implemented.
For now use the home key (long press) to avoid conflict with powerlaunch.

That's cool. Actually the home key works just fine for me. If it were possible & easier, is there a way just disable the power button for rotation entirely & just use the home key?
TX again.

emjayes 2008-04-26 18:15

Re: Automatic screen rotate for N810
 
New version: 0.0.13
If powerlaunch is installed, only home key initiates rotation.

If not, both power and home key work.

munky261 2008-04-26 18:52

Re: Automatic screen rotate for N810
 
any idea on what i asked a page back , about removeing the word "Home" from the top bar , so the statusbar applets dont over lap and make it look like crap

edit: another question , would it be possible to have a menu entry to initiate the rotation... kinda like the bluetooth on and off?

sachin007 2008-04-26 19:22

Re: Automatic screen rotate for N810
 
Okay guys can some one help me?

I just have the boot from sd card ..... so now how do i go about installing potrait mode first and then how to get this??

Thanks

emjayes 2008-04-26 19:27

Re: Automatic screen rotate for N810
 
It should work as it is.

I myself have ~800Mb of internal memory for OS and the rest for storage, and booting from it instead of flash.

sachin007 2008-04-26 20:18

Re: Automatic screen rotate for N810
 
I installed and did the /root/install thing.

It asked me to reboot and i did.... but nothing happens after i press the power button??

emjayes 2008-04-26 22:23

Re: Automatic screen rotate for N810
 
Did you stop the Application manager first?
The install-xrandr-kernel script is VERY crude.
No error checking etc. yet, so if you have Application manager running, it is unable to install the needed packages with apt-get.

To test if you have all the necessary bits, run this in xterm:

xrandr -o left

if the screen goes portrait, then you have the correct packages installed,
but if you get an error, run the install-xrandr-kernel again and see there are no errrors.

grog 2008-04-26 22:51

Re: Automatic screen rotate for N810
 
Quote:

Originally Posted by emjayes (Post 175034)
New version: 0.0.13
If powerlaunch is installed, only home key initiates rotation.

If not, both power and home key work.

Works wonderfully. Thank you very very much. I had never heard of powerlaunch before this. I like that too :)!

munky261 2008-04-26 23:49

Re: Automatic screen rotate for N810
 
which version of powerlaunch is newer...8-2 is listed over 8-3?

jhford 2008-04-26 23:56

Re: Automatic screen rotate for N810
 
I'm a Linux newbie. I downloaded Fanoush's kernel_flasher.tgz. Can someone list the commands to flash the kernel including the tar parameters?
Thanks

munky261 2008-04-27 00:40

Re: Automatic screen rotate for N810
 
i just installed powerlaunch , and now rotation ist working , how can i fix this?

wizink 2008-04-27 00:53

Re: Automatic screen rotate for N810
 
Wow, canola2 is pretty awesome in portrait mode; the menus look pretty iTouch-esque, but the now playing menu is all messed up, though nevertheless awesome!

geoffstewart 2008-04-27 01:14

Re: Automatic screen rotate for N810
 
this is awesome!!! thanks for your efforts. i find this especially good for iphone sites that make the text narrow since i use the iphone user agemt in microb...

munky261 2008-04-27 02:27

Re: Automatic screen rotate for N810
 
i installed the status bar plugin and it rotates again , but it will not rotate by either button for me with powerlaunch installed. i knew the power key wouldnt work , but it wont rotate with the home key now either

Bundyo 2008-04-27 08:36

Re: Automatic screen rotate for N810
 
Yes, because powerlaunch disables mce. Try reinstalling sliderotate, but i would advise against that - you won't like it.

emjayes 2008-04-27 08:58

Re: Automatic screen rotate for N810
 
I will install powerlaunch again tomorrow and find a way to have these two play nice.
I did try it once, but had issues with keyboard ligths, so I uninstalled powerlaunch, since I did not have the time to see into the problem.

qwerty12 2008-04-27 09:07

Re: Automatic screen rotate for N810
 
For powerlaunch, at least your original method of rotating the screen could be implemented in a slightly different way.

common.conf

Quote:

# the following power key handlers are designed to be overriden if desired
key_press_power = call key_power
key_release_power = if $powerkey_short common.ui.show powerkey_long_release
powerkey_long = softpoweroff
powerkey_long_release = softpoweroff
You could change powerkey_long= softpoweroff to something like exec "xrandr -o left"

Of course other changes would be needed but it's a start.

munky261 2008-04-27 12:39

Re: Automatic screen rotate for N810
 
i uninstalled sliderotate and reinstalled and dont see anything wrong , but it still wouldnt rotate by the home key... im uninstalling powerlaunch anyway since i have no keyboard lights or LED lights now.

P.S. still waiting on someone to answer if the know how to take the word "Home" off the top of the screen

brontide 2008-04-27 13:30

Re: Automatic screen rotate for N810
 
Quote:

Originally Posted by munky261 (Post 175225)
P.S. still waiting on someone to answer if the know how to take the word "Home" off the top of the screen

I know it won't happen, but I would love the statusbar icons to move the the unused area on the lower left when portrait mode is enabled, that would solve the problem too and be quite a bit cleaner.

Oberon85 2008-04-27 13:41

Re: Automatic screen rotate for N810
 
I agree with brontide...
I saw a portrait post in show off your screenshots with the app icons on the top of the screen... asked how it was done, and was told to drag the bar to the top of the screen in portrait mode. Tried to do that, but nothing happened... Have to figure this out sometime.


Oberon85


All times are GMT. The time now is 09:59.

vBulletin® Version 3.8.8