LCD7 Portrait mode in GDM

1,269 views
Skip to first unread message

Louis McCarthy

unread,
Sep 19, 2013, 5:48:45 PM9/19/13
to beagl...@googlegroups.com
I am trying to get the LCD7 from BeagleBoardToys to go into portrait mode under Gnome.

I'm running "Linux beaglebone 3.8.13 #1 SMP Tue Jun 18 02:11:09 EDT 2013 armv7l GNU/Linux" on a BBW, which is the stock Angstrom image.

I can get the console frame buffer to rotate by exiting out of the display manager and typing the following into the console:

echo 3 > /sys/class/graphics/fbcon/rotate

However, once I start up gdm again, it switches back to landscape mode.

Under gdm I have tried the following:
1) System -> Preferences -> Monitors -> Changed "Rotation" to anything but normal -> Display turns off/blanks for ~30 seconds, then returns to landscape mode.
2) Edited "Device" section of /etc/X11/xorg.conf to include 'Option "Rotate" "Left"', but it doesn't work. According to /var/log/Xorg.0.log, the modesetting driver does not recognize the rotate option.
3) Edited .config/monitors.xml to change resolutions and rotation, which didn't work either.
4) Various xrandr options:
xrandr -o left

cvt 480 800
xrandr
--newmode "480x800_60.00"   31.00  480 504 552 624  800 803 813 831 -hsync +vsync
xrandr
--addmode LVDS-0 480x800_60.00
xrandr
--output LVDS-0 --mode 480x800_60.00

The Xorg.0 log has the following entry for portrait mode:

cat /var/log/Xorg.0.log | tail

[940786.612] (II) modesetting(0)Modeline "800x480"x61.5   30.00  800 840 888 928  480 493 496 526 -hsync -vsync (32.3 kHz)
[940788.145] (II) modesetting(0)EDID for output LVDS-0
[940788.145] (II) modesetting(0)Printing probed modes for output LVDS-0
[940788.145] (II) modesetting(0)Modeline "800x480"x61.5   30.00  800 840 888 928  480 493 496 526 -hsync -vsync (32.3 kHz)
[940788.159] (II) modesetting(0)EDID for output LVDS-0
[940788.160] (II) modesetting(0)Printing probed modes for output LVDS-0
[940788.160] (II) modesetting(0)Modeline "800x480"x61.5   30.00  800 840 888 928  480 493 496 526 -hsync -vsync (32.3 kHz)
[940788.180] (II) modesetting(0)EDID for output LVDS-0
[940788.181] (II) modesetting(0)Printing probed modes for output LVDS-0
[940788.181] (II) modesetting(0)Modeline "800x480"x61.5   30.00  800 840 888 928  480 493 496 526 -hsync -vsync (32.3 kHz)

Running 'cat /var/log/Xorg.0.log | tail' again, after using the GUI rotation change method produces:

[942030.873] (II) modesetting(0)EDID for output LVDS-0
[942030.874] (II) modesetting(0)Printing probed modes for output LVDS-0
[942030.874] (II) modesetting(0)Modeline "800x480"x61.5   30.00  800 840 888 928  480 493 496 526 -hsync -vsync (32.3 kHz)
[942040.579] (II) modesetting(0)EDID for output LVDS-0
[942040.580] (II) modesetting(0)Printing probed modes for output LVDS-0
[942040.581] (II) modesetting(0)Modeline "800x480"x61.5   30.00  800 840 888 928  480 493 496 526 -hsync -vsync (32.3 kHz)
[942040.665] (II) modesetting(0)EDID for output LVDS-0
[942040.666] (II) modesetting(0)Printing probed modes for output LVDS-0
[942040.668] (II) modesetting(0)Modeline "800x480"x61.5   30.00  800 840 888 928  480 493 496 526 -hsync -vsync (32.3 kHz)
[942040.717] (II) modesetting(0)Allocate new frame buffer 480x800 stride


I also spent some time looking at journalctl, but didn't see anything interesting or blatantly obvious.

I'm not sure where to go from here. Do I try to get a valid mode for 480x800 working, or is there another log I can look at to get more info on the failure? 

Thanks,
Louis

garyamort

unread,
Sep 19, 2013, 7:35:10 PM9/19/13
to beagl...@googlegroups.com


On Thursday, September 19, 2013 5:48:45 PM UTC-4, Louis McCarthy wrote:
I am trying to get the LCD7 from BeagleBoardToys to go into portrait mode under Gnome.

I'm running "Linux beaglebone 3.8.13 #1 SMP Tue Jun 18 02:11:09 EDT 2013 armv7l GNU/Linux" on a BBW, which is the stock Angstrom image.

I can get the console frame buffer to rotate by exiting out of the display manager and typing the following into the console:

echo 3 > /sys/class/graphics/fbcon/rotate

However, once I start up gdm again, it switches back to landscape mode.


fbcon is the framebuffer for text/console mode only.  What framebuffer is being used by x11?

 

Louis McCarthy

unread,
Sep 20, 2013, 10:30:44 AM9/20/13
to beagl...@googlegroups.com
Thanks for your reply.....It appears that /sys/class/graphics/fb0 is the frame buffer for X11. When I 

echo 3 > /sys/class/graphics/fb0/rotate


The X11 session changes to a console view and displays a small cursor in the top left corner. The only way to get X11 back is to issue

systemctl restart gdm


Louis

garyamort

unread,
Sep 20, 2013, 9:09:03 PM9/20/13
to beagl...@googlegroups.com
Try running:
cat /var/log/Xorg.0.log | grep driver

From the a terminal window[make sure your windows environment has been loaded!]

This will give you a list of what drivers have been loaded.

garyamort

unread,
Sep 20, 2013, 9:13:24 PM9/20/13
to beagl...@googlegroups.com
As a followup, assuming your using fbdev AND you have an xorg.conf file then you can try following the instructions from http://www.x.org/archive/X11R6.8.0/doc/fbdev.4.html to rotate the screen.

See http://www.x.org/archive/X11R6.8.0/doc/xorg.conf.5.html for a list of possible locations of the file.

NOTE: I find XWindows configuration very frustrating because there are a LOT of changes between different versions of X AND customizations made by each linux distribution.  Xorg.conf does not always exist AND is often ignored if you manually create it!

Louis McCarthy

unread,
Sep 21, 2013, 12:43:22 AM9/21/13
to beagl...@googlegroups.com
Thanks for the suggestions and fresh direction. I will not have access to the hardware for a day or two, but I will update this thread once I follow your advice.

It's nice to know that I'm not the only one that finds this frustrating. I'm going to have to make a matrix for the distros, that I'm currently using, and what wireless configurators, system controllers, and X11 settings are used for each.

Louis

Louis McCarthy

unread,
Sep 23, 2013, 3:09:16 PM9/23/13
to beagl...@googlegroups.com
Well....It is not using the fbdev module.....it is using Kernel Mode Setting (KMS) driver.


Can I assume the frame buffer is working, because I can switch the console to portrait? So it must be related to X11's interface to the driver?

Is it because there is only one Modeline listed in the Xorg log? It only shows 800x480, do I need to add a 480x800 modeline for portrait mode? If so, how do I add a mode to the KMS driver?

I've tried passing these options to the Kernel at boot
video=480x800
or
omapfb.mode=lvds:480x800M
by modifying /media/BEAGLE_BONE/uEnv.txt. But nothing is different upon a reboot. 

I can confirm, by running
dmesg | grep 'command'
that the modes are being passed to the kernel.

Thanks,
Louis

garyamort

unread,
Sep 25, 2013, 1:23:28 PM9/25/13
to beagl...@googlegroups.com


On Monday, September 23, 2013 3:09:16 PM UTC-4, Louis McCarthy wrote:
Well....It is not using the fbdev module.....it is using Kernel Mode Setting (KMS) driver.

KMS is a TYPE of driver, but it is not the driver.  IE on my workstation I use the open source KMS radeon driver.  

I'd really like to see a copy of /var/log/Xorg.0.log and if you don't mind dumping dmesg to a text file and posting that as well I'd appreciate it.

Simplest way of getting ALL the data to go through.

Again, don't be too discouraged.  Video issues with non-standard/current hardware are usual with Linux.  I tend to use older hardware and run into problems with Radeon cards all the time.

Louis McCarthy

unread,
Sep 25, 2013, 3:21:14 PM9/25/13
to beagl...@googlegroups.com
Thanks for sticking with me. Knowing that KMS is a type helps me understand more about the video system.

I've included the logs from the boot to landscape mode, and then performed a diff on the Xorg and dmesg logs after an attempt to change to portrait mode.

The diff of the Xorg log:
diff /var/log/Xorg.0.log /var/log/Xorg.0.log_landscape.txt
produced the result in xorg_portrait_diff.txt.

The dmesg diff did not produce a result.

To complement the dmesg log, I've included the journal dump (after an attempt to switch to portrait mode, although I don't think it makes a difference).

Thanks,
Louis
dmesg_landscape.txt
Xorg.0.log_landscape.txt
xorg_portrait_diff.txt
journal_post.txt

garyamort

unread,
Sep 25, 2013, 7:39:14 PM9/25/13
to beagl...@googlegroups.com


On Wednesday, September 25, 2013 3:21:14 PM UTC-4, Louis McCarthy wrote:
Thanks for sticking with me. Knowing that KMS is a type helps me understand more about the video system.

Hmm, learn something new.  modesetting is a driver too!  I thought it just referred to the KMS type of driver, but it also refers to a fallback driver for X11.

And it only supports a couple of options, one of which is not rotate!


If your using some form of debian variant, you can try:
"sudo apt-get install xserver-xorg-video-fbdev"

Install the basic fbdev driver and give that a shot.

You can also try xserver-xorg-video-omap and xserver-xorg-video-omapfb
[the name may be slightly different, so you can also try "apt-cache search fbdev", omap and omapfb


Now the bad news: I /think/ none of the above will work because they will only be used by the HDMI display by default.  Checking the device tree source for BB-BONE-LCD7 I see lines such as:
/* Settings for ThreeFive S9700RTWV35TR / LCD7 cape: */
panel {
compatible = "tilcdc,panel";

My gut feeling is that this specifies the driver to use: ie use the tildc-panel driver.  You could try exiting x-windows and then running
"sudo modprobe -v panel-generic-dpi" [might need to do "sudo modprobe -v panel-generic-dpi.ko"]

If that succeeds, then reload x-windows and check the x11 logs to see if the driver has changed.


Louis McCarthy

unread,
Sep 26, 2013, 2:15:39 PM9/26/13
to beagl...@googlegroups.com
Success! 

I installed fbdev (2:0.4.2-r17.0.12):
opkg install xf86-video-fbdev

I then enabled fbdev in X11 by editing the "Device" section of /etc/X11/xorg.conf to:
Section "Device"
       
Identifier      "Builtin Default fbdev Device 0"
       
Driver  "fbdev"
       
Option "Rotate" "CCW"
EndSection

That rotated the screen, but the touchscreen needed to swap x and y, and invert x, so I added two Options to the "evdev touchscreen catchall" identifier of /usr/share/X11/xorg.conf.d/10-evdev.conf:
Section "InputClass"
       
Identifier "evdev touchscreen catchall"
       
MatchIsTouchscreen "on"
       
MatchDevicePath "/dev/input/event*"
       
Driver "evdev"
       
Option "SwapAxes" "true"
       
Option "InvertX" "true"
EndSection

Which worked for the base X server (clock face pointer and login screen), but as soon as the default user logged in, the touchscreen lost its swap axes option. I could run: 
xinput --set-prop "ti-tsc" "Evdev Axes Swap" 1
from an xterm window, to get it to work again, but I wanted it to be automatic. 

At first I tried adding it to the .xprofile file, but that didn't work. I then found that by modifying /etc/pointercal.xinput to the following:
xinput set-int-prop "ti-tsc" "Evdev Axis Calibration" 32 3733 367 79 3992; xinput set-int-prop "ti-tsc" "Evdev Axes Swap" 8 1;
everything worked on a reboot.

Thanks for your help, Gary. I wish it would have worked with modesetting and xrandr, but I will leave that as an exercise for another user :)

And for the HDMI vs LCD driver, as far as I know, the base (internal to the AM33xx) lcd controller is used for both. I looked at the source dts file for HDMI and it defines a similar fb section as the LCD7 dts file. But, at this point, I don't need to dig any deeper....

Louis

garyamort

unread,
Sep 26, 2013, 3:08:03 PM9/26/13
to beagl...@googlegroups.com


On Thursday, September 26, 2013 2:15:39 PM UTC-4, Louis McCarthy wrote:
Success! 

I installed fbdev (2:0.4.2-r17.0.12):
opkg install xf86-video-fbdev

I then enabled fbdev in X11....

Thanks for taking the time to troubleshoot all this Louis!  I took the liberty of emailing Gerald Coley directly via the e-mail link on CircuitCo's wiki [http://circuitco.com/support/index.php?title=BeagleBoneBlack] and asked him to add your config info to the wiki as screen rotation seems to be a recurring issue with the BBB, and at least having a good "how to" for one flavor of linux should point the way for others!

Gerald Coley

unread,
Sep 26, 2013, 3:09:11 PM9/26/13
to beagl...@googlegroups.com
That suggestion needs to go to the supplier of the cape.

Gerald


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Louis McCarthy

unread,
Sep 26, 2013, 3:20:40 PM9/26/13
to beagl...@googlegroups.com
This configuration was performed on the LCD7-00A4 cape by Beagleboardtoys. I'm not sure of the exact organization of CircuitCo, but aren't they one in the same (BBT and CC)? 

Louis

Gerald Coley

unread,
Sep 26, 2013, 3:24:20 PM9/26/13
to beagl...@googlegroups.com
Yes, Circuitco is the company. But the Wiki is not run by Circuitco. I am not Circuitco. 

Gerald


This is the official BeagleBone Black Wiki maintained and supported by BeagleBoard.org a non-profit 501(C) organization.
It is currently hosted by Circuitco, the manufacturer of the BeagleBone Black.

garyamort

unread,
Sep 26, 2013, 3:28:07 PM9/26/13
to beagl...@googlegroups.com
Thanks Gerald, I went ahead and sent that suggestion on the CircuitCo directly.

jimmy...@gmail.com

unread,
Apr 22, 2014, 6:31:13 AM4/22/14
to beagl...@googlegroups.com
Hi Sir ,

       I was able  to rotate the display by the below method display now works fine in portrait mode .
       But i having a new issue in System settings--> Display settings.
       It shows  "Could not screen information RANDR extension is not present".
       If you have any inputs on this issue please let me know. 


Regards ,
Jimmy

jimmy...@gmail.com

unread,
Apr 23, 2014, 7:40:29 AM4/23/14
to beagl...@googlegroups.com, jimmy...@gmail.com
Hi Sir ,

           On checking the RANDR status using  "grep -i -C 2 randr /var/log/Xorg.0.log".
           Its found that RANDR is disabled .
           It shows
            [    21.083] Initializing built-in extension XFIXES                             
            [    21.083] Initializing built-in extension RENDER                             
            [    21.083] Initializing built-in extension RANDR                              
            [    21.083] Initializing built-in extension COMPOSITE                          
            [    21.083] Initializing built-in extension DAMAGE                             
            --                                                                              
            [    21.209] (==) Depth 24 pixmap format is 32 bpp                              
            [    21.325] (II) FBDEV(0): display rotated; disabling DGA                      
            [    21.325] (II) FBDEV(0): using driver rotation; disabling XRandR             
            [    21.325] (==) FBDEV(0): Backing store disabled                              
            [    21.326] (==) FBDEV(0): DPMS enabled                                        
            [    21.326] (--) RandR disabled                                                
            [    21.443] (II) AIGLX: Screen 0 is not DRI2 capable                           
            [    21.443] (II) AIGLX: Screen 0 is not DRI capable 
       
            If you have any inputs on this issue please let me know

Regards ,
Jimmy

dmkn...@gmail.com

unread,
Sep 21, 2015, 6:00:23 PM9/21/15
to BeagleBoard
Hi Louis,

Your diligence with this issue is much appreciated --> and your modifications worked; I can now change the orientation of my desktop within Angstrom.  However, now my mouse pointer is confused.  up/down is now left/right and visa versa.  Any advice on how to fix this?

Thanks,
Dennis

Dennis Knippel

unread,
Sep 21, 2015, 8:17:53 PM9/21/15
to beagl...@googlegroups.com
whoops, my bad.  I entered the two options under the wrong input device.  everything is working now.  thanks again!

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/9-MMmO66HrU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

goritya...@gmail.com

unread,
Nov 3, 2018, 8:25:27 PM11/3/18
to BeagleBoard
hi please any one tell me how  to rotate -90 degrees  screen in debian beaglebone black 
please any can send solution as soon as possible, its very urgent for me 
Reply all
Reply to author
Forward
0 new messages