PDA

View Full Version : Idea for rotating screen in N900


djjaku
01-28-2010, 02:22 PM
Hi guys I have just come with a simple and probably very stupid idea. I looked on the Internet for any possible hacks to rotate our display and found the name - xrandr. Altough we dont have it in our n900's there is one in the Debian LXDE installation.

If you go to Debian chroot, and type xrandr -o left, it actually rotates your screen to portrait mode, however not very useable because of cut-off menu etc.
When I executed xrandr I noticed that we can switch our resolution from minimal 480x480 to maximal 800x800.
Unfortunately I am too lame to properly set a command for that as it requires adding a new video mode.

I think you wise guys tried this long time ago, but if not maybe it could be an idea how to get it working, eg. a script which checks the accelerometer, then switches the resolution to 480x800 and finally rotates the screen.

I apologise if this thread is a duplicate or in a wrong section but I couldnt find any similar ones.

Regards, Lukasz

http://img403.imageshack.us/img403/6884/screenshot2010012817591.th.png (http://img403.imageshack.us/i/screenshot2010012817591.png/) http://img714.imageshack.us/img714/6040/screenshot2010012817585.th.png (http://img714.imageshack.us/i/screenshot2010012817585.png/) http://img682.imageshack.us/img682/8938/screenshot2010012817584.th.png (http://img682.imageshack.us/i/screenshot2010012817584.png/) http://img194.imageshack.us/img194/605/screenshot2010012817583.th.png (http://img194.imageshack.us/i/screenshot2010012817583.png/) http://img714.imageshack.us/img714/605/screenshot2010012817583.th.png (http://img714.imageshack.us/i/screenshot2010012817583.png/)

djjaku
01-29-2010, 05:36 PM
Nobody wants to think about this?

waleed786
01-29-2010, 05:41 PM
i do but im too stupid to understand how any of this works. Just waiting for the developers to make responses....looks like a good idea though. But i think even after the resolution is fixed it still wouldnt work because none of the apps of widgets are designed for portrait. Even the status bar wont open when clicking on it in portrait mode

djjaku
01-29-2010, 06:00 PM
I think if we set the resolution fixed for 480x800 instead 800x480 it will squeeze the UI. I think like this:

grumps312
01-29-2010, 06:10 PM
seems like a neat idea, im sure there are people trying to develop something similar to this?

djjaku
01-29-2010, 06:23 PM
As far Im into linux stuff, N900's are running Maemo based on Debian right? So I think it shouldnt be a lot of difficulty to produce a workaround for that

I think this ->https://wiki.ubuntu.com/X/Config/Resolution can help , but like I've said before its like reading magic spells for me, I cant understend it yet.

raddg
01-29-2010, 07:35 PM
I just wanted to add to this suggestion if there could be a selection to auto-rotate-next desktop (?) after x seconds. I guess I have been enjoying leaving it ON when I am at my desk plugged in and its like a second assistant that you can glance at the live feeds/alerts sms/email/calls.etc.

djjaku
01-29-2010, 07:57 PM
Basically, to add a new mode, I need the following parameters:
clock MHz
hdisp
hsync-start
hsync-end
htotal
vdisp
vsync-start
vsync-end
vtotal
+Hsync
-Hsync
+Vsync
-Vsync

If someon has an idea where to get tem from, it could possibly move this forward a bit..

maluka
01-30-2010, 12:28 AM
The desktops should flip in a Compiz cube-like way

djjaku
01-30-2010, 06:08 AM
Managed to get two working commands:

xrandr -o left which rotates the screen, and
xrandr --fb 480x800 wchich sets the res. Its possible to set 480x480 and 800x800 as well. When I did the fb and after that -o it rotates the screen and fills it completely. Looks slighly better than the braek bug, but still the task switcher is fcuked up, and the desktops need working on.
Maybe if we could put it in hmmm xorg.conf (???) to do it automatically on startup, just before loading desktop?

geneven
03-05-2011, 02:38 AM
Managed to get two working commands:

xrandr -o left which rotates the screen, and
xrandr --fb 480x800

I'm following this issue, but unfortunately have no expertise.

I'm running a chess program called Scid in debian. It's primarily for storing and looking at chess games, not playing. On the N900, Scid can create a much larger chessboard if it is rotated -- I verified this with xrandr -o left.

The mouse cursor is pretty much out of control. Does anyone know how to enter the equivalent of commands like Alt-o ? I'm sure this has been discussed at great length somewhere, but I haven't looked for it yet.

yauchildchew
03-05-2011, 02:56 AM
i hope those who can help will help u.
too bad i am not coz i am just a user.
and i am not expecting some fancy effect like someone mentioned.
just a usable portrait mode is already thankful enough.

i have a question though.
when we go to the multitasking screen, portrait apps always get changed into landscape. i wonder is there a way to stop this?
Reason is to avoid processing for changing mode.

geneven
03-05-2011, 03:07 PM
FWIW, here is more xrandr info. I don't know how to use most of the parameters.

usage: xrandr [options]
where options are:
-display <display> or -d <display>
-help
-o <normal,inverted,left,right,0,1,2,3>
or --orientation <normal,inverted,left,right,0,1,2,3>
-q or --query
-s <size>/<width>x<height> or --size <size>/<width>x<height>
-r <rate> or --rate <rate> or --refresh <rate>
-v or --version
-x (reflect in x)
-y (reflect in y)
--screen <screen>
--verbose
--dryrun
--nograb
--prop or --properties
--fb <width>x<height>
--fbmm <width>x<height>
--dpi <dpi>/<output>
--output <output>
--auto
--mode <mode>
--preferred
--pos <x>x<y>
--rate <rate> or --refresh <rate>
--reflect normal,x,y,xy
--rotate normal,inverted,left,right
--left-of <output>
--right-of <output>
--above <output>
--below <output>
--same-as <output>
--set <property> <value>
--scale <x>x<y>
--transform <a>,<b>,<c>,<d>,<e>,<f>,<g>,<h>,<i>
--off
--crtc <crtc>
--panning <w>x<h>[+<x>+<y>[/<track:w>x<h>+<x>+<y>[/<border:l>/<t>/<r>/<b>]]]
--gamma <r>:<g>:<b>
--primary
--noprimary
--newmode <name> <clock MHz>
<hdisp> <hsync-start> <hsync-end> <htotal>
<vdisp> <vsync-start> <vsync-end> <vtotal>
[+HSync] [-HSync] [+VSync] [-VSync]
--rmmode <name>
--addmode <output> <name>
--delmode <output> <name>