You are not logged in.
Hi all,
I've been on Arch for about a week now and am having a fun time coding on it. I finally got an LCD stand that allows me to swivel my screen to portrait orientation so I suddenly have some great vertical real estate.
My current setup is Arch Linux -> SLIM -> XFCE4 with X11 configured to run on Intel drivers rather than the standard VESA one. XFCE allows me to rotate my desktop from a simple GUI application. After doing some research, it seems that this is being accomplished by using xrandr - a utility that ships with X.org, which means this rotation is only happening with the benefit of being in an X environment.
Before X boots up, the Linux terminal is outputting everything to the screen in regular landscape mode. I want to be able to work in portrait mode outside of an X environment (e.g. virtual terminals). I did some Googling and came across this:
http://www.mjmwired.net/kernel/Document … /fbcon.txt
It seems that fbcon (frame buffer console) can run a console with the benefit of VGA-driven frame buffer -- which would include screen rotation. Is this something that can be easily configured (e.g. pop open VIM, add a few lines and reboot) or is it far more complex than I think (e.g. rebuilding the Kernel).
I also noticed SLIM starts up in landscape mode as well. I believe SLIM runs in X environment (correct me if I'm mistaken). It doesn't seem to be an option in SLIM to rotate, so I imagine I could have X start already rotated, in effect causing everything (SLIM, XFCE) to inherit the rotation property. I tried configuring things by creating a "10-monitor.conf" file in /etc/X11/xorg.conf.d/ according to this page:
https://wiki.archlinux.org/index.php/Xo … r_settings
...with the addition of these changes:
Section "Screen"
...
+Option "RandRRotation" "on"
+Option "Rotate" "CCW"
EndSection
Section "Device"
...
Option "DRI" "false"
Option "RandRRotation"
Option "Rotate" "CCW"
EndSection
(ref: http://forums.linuxmint.com/viewtopic.php?f=49&t=26747)
This did not do the trick for me and I'm still logging in by craning my neck... (just kidding; I swivel it back around).
I'm somewhat new to Linux so if I miss any details please let me know.
Any help is greatly appreciated.
Thanks
P.S. -- Extra info for my X configuration (to get SLIM rotated):
/etc/X11/xorg.conf.d/10-monitor.conf file:
Section "Monitor"
Identifier "Monitor"
EndSection
Section "Device"
Identifier "Device"
Driver "intel"
Option "DRI" "false"
Option "RandRRotation" "on"
Option "Rotate" "CCW"
EndSection
Section "Screen"
Identifier "Screen"
Device "Device"
Monitor "Monitor"
DefaultDepth 16
Option "RandRRotation" "on"
Option "Rotate" "CCW"
EndSection
Full output of Xorg.0.log in Codepad: http://codepad.org/6aM0gTvM
Last edited by yodafingers (2011-01-13 00:17:15)
Offline
Hrmm, after doing a bit more research, I found uvesafb and did some googling based on that. I was able to found this post:
http://forums.gentoo.org/viewtopic-t-776630.html
Seems very promising. I'll install uvesafb and try this and see how it goes...
Offline
UPDATE: Only solved one of my problems so far (getting virtual terminals to be in portrait mode) by modifying my grub bootlist:
/boot/grub/menu.lst:
title Arch Linux (portrait)
root (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/991f0c73-38a8-444e-b1a4-41105c7d609c ro fbcon=rotate:3,scrollback=2048k
initrd /kernel26.img
I made a mistake in the previous post: uvesafb allows you to run the console in full resolution, fbcon rotation seems to be a separate matter.
Still no luck yet getting SLIM into portrait mode. I tried various things, but it seems that the X Option for "Rotate" is unsupported by the Intel video driver. I chopped out the Device/Monitor/Screen sections from the xorg.conf that is created when you run "Xorg -configure" and tossed that into /etc/X11/xorg.conf.d/10-monitor.conf to no avail...
/etc/X11/xorg.conf.d/10-monitor.conf:
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "AccelMethod" # [<str>]
#Option "DRI" # [<bool>]
#Option "ColorKey" # <i>
#Option "VideoKey" # <i>
#Option "FallbackDebug" # [<bool>]
#Option "Tiling" # [<bool>]
#Option "Shadow" # [<bool>]
#Option "SwapbuffersWait" # [<bool>]
#Option "XvMC" # [<bool>]
#Option "XvPreferOverlay" # [<bool>]
#Option "DebugFlushBatches" # [<bool>]
#Option "DebugFlushCaches" # [<bool>]
#Option "DebugWait" # [<bool>]
Identifier "Card0"
Driver "intel"
BusID "PCI:0:2:0"
# Tack on some rotation options
Option "RandRRotation" "on"
Option "Rotate" "CCW"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Xorg.0.log full version: http://codepad.org/mrsVi4QW
Xorg.0.log excerpt:
[ 14.511] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 14.511] (==) intel(0): DPMS enabled
[ 14.511] (==) intel(0): Intel XvMC decoder disabled
[ 14.511] (II) intel(0): Set up textured video
[ 14.511] (II) intel(0): Set up overlay video
[ 14.512] (II) intel(0): direct rendering: DRI2 Enabled
[ 14.512] (WW) intel(0): Option "RandRRotation" is not used
[ 14.512] (WW) intel(0): Option "Rotate" is not used
[ 14.512] (--) RandR disabled
...
[ 14.512] (II) Initializing built-in extension RANDR
As you can see, the Intel chipset doesn't like those options so it seems I cannot set them statically using xorg.conf files.
However, dynamically applying the rotation using xrandr seems to work. For example, I can open up a terminal right now and type `xrandr -o [orientation]` and rotate my screen on the fly. I tried this approach too, seeing if I could sneak in a call to xrandr before SLIM starts up. I was not able to get anywhere with this... I tried calling xrandr in:
/root/.xinitrc (I believe this runs when X logs into root)
/etc/X11/Xsession.d/ (scripts in this directory are supposed to be executed upon X startup)
None of this did the trick, SLIM still starts up in normal orientation. Has anyone here successfully rotated SLIM, or any login manager for that matter? I'm considering switching over to GDM to see if I have better luck (I believe GDM provides some form of pre-start configuration scripting), but would like to avoid moving to GDM if I can do this with SLIM.
Any help with this would be hugely appreciated. Thanks
Last edited by yodafingers (2011-01-13 05:53:09)
Offline
I think emulating XStartup as per GDM/KDM might do the trick for SLIM, as suggested by this:
http://developer.berlios.de/bugs/?func= … up_id=2663
I guess I'll have to checkout the SVN trunk for SLIM, apply this change, recompile it and hope that does the trick.
Offline
Or use a script in Autokey to fire up screen rotation [easier said than done but an option]
Mr Green
Offline
wow, you sure are talking to yourself in this thread --(EDIT : no longer)
I have never used a login manager and I used to rotate screens using xrandr commands bound to a key. Have you tried adding the xrandr rotate commands in your .xinitrc. That could just do the trick.
Last edited by Inxsible (2011-01-13 16:45:32)
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Or use a script in Autokey to fire up screen rotation [easier said than done but an option]
I believe AutoKey can only run if I'm in my desktop? My desktop is already rotated, it's my login manager that won't rotate. Most desktop environments seem to include some xrandr options as part of the desktop settings now. In XFCE, I've already set the desktop to rotate using the display settings.
EDIT: Assuming AutoKey is pretty much like AutoHotKey in Windows...
wow, you sure are talking to yourself in this thread wink --(EDIT : no longer)
I have never used a login manager and I used to rotate screens using xrandr commands bound to a key. Have you tried adding the xrandr rotate commands in your .xinitrc. That could just do the trick.
Haha, yeah I got carried away there with the research. Just wanted to share my progress, didn't mean to spam the board.
I believe I tried xrandr -o left in my /root/.xinitrc file before without any luck. Is that supposed to run before login manager kicks in? If I place an "echo" in there, will it make it into the Xorg.0.log? If so, I will experiment with that some more when I get home.
Thanks for the suggestions guys
Last edited by yodafingers (2011-01-13 16:52:07)
Offline
why not hack the daemon for slim? in /etc/rc.d rotate prior to starting slim?
Rereading your post it seems slim is started before X so maybe above not going to make any difference
Last edited by Mr Green (2011-01-13 16:55:39)
Mr Green
Offline
Instead of modifying the root .xinitrc, create your personal one in your /home/user.
login managers run at init level 5, so yeah I do think that your .xinitrc will be executed before your login manager. (Correct me if I am wrong here)
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
why not hack the daemon for slim? in /etc/rc.d rotate prior to starting slim?
Interesting. I'm not sure how to do that, to be honest. Also, I run SLIM from inittab, rather than Daemon:
/etc/inittab
id:5:initdefault:
# ..blah...
x:5:respawn:/usr/bin/slim >& /dev/null
Perhaps wrap /usr/bin/slim in a bash script and call that instead of slim?
Instead of modifying the root .xinitrc, create your personal one in your /home/user.
login managers run at init level 5, so yeah I do think that your .xinitrc will be executed before your login manager. (Correct me if I am wrong here)
Yes, SLIM runs at init level 5 (as per the inittab excerpts I pasted above). If what you say is true, this may be the most natural solution to this. However, I was under the impression that SLIM runs the .xinitrc after a successful login to determine which desktop environment to load. Typically, they ask that you populate the .xinitrc with the appropriate desktop start command:
http://svn.berlios.de/wsvn/slim/trunk/xinitrc.sample
All of these suggestions are great. I will definitely experiment with these when I get home. Thanks again
Last edited by yodafingers (2011-01-13 17:05:05)
Offline
Just tried slim as daemon and it does start what is in $/HOME/.xinitrc so script would need to start from there
Mr Green
Offline
Just tried slim as daemon and it does start what is in $/HOME/.xinitrc so script would need to start from there
Wait, but .xinitrc is used for starting my XFCE session, correct? If that's the case, it sounds like it runs after I've logged in and it's decided to look at my user's preferences for X. I need xrandr to rotate the login manager, not my desktop. My desktop environment is rotated correctly already upon login.
Correct me if I'm confused.
Thanks
Offline
Yes you need to rotate prior to slim, default_xserver in config options shows /usr/bin/X maybe you could call a script before X starts [or just after?]
Mr Green
Offline