element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Performance problem as 1920 pixels squashed into 1824
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 15 replies
  • Subscribers 676 subscribers
  • Views 1479 views
  • Users 0 members are here
  • raspberry_pi
Related

Performance problem as 1920 pixels squashed into 1824

morgaine
morgaine over 13 years ago

My Pi is currently suffering the same "picture frame" problem that many others have described, losing 96 pixels vertically and horizontally (48 from each edge) from the native resolution of a  good quality 27" Dell 2408 1920x1200 LCD monitor, feeding into its HDMI port.  The monitor data is being read fine, and includes:

 

Group CEA has 8 modes:

  (native) mode 16: 1920x1080 @ 60Hz, progressive

Group DMT has 11 modes:

               mode 68: 1920x1200 @ 60Hz, progressive

HDMI status:

               state 0x120016, 1920x1200 @ 60Hz, progressive

 

To match the monitor's expectations, I set up /boot/config.txt with:

 

hdmi_group=2

hdmi_mode=68

 

 

So far so good, but when I bring up X11, /var/log/Xorg.0.log shows:

 

(--) FBDEV(0): Virtual size is 1824x1104 (pitch 1824)

 

which is confirmed by /proc/cmdline:

 

dma.dmachans=0x3c bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=1104

bcm2708.boardrev=0x2 bcm2708.serial=0x25f2f590 smsc95xx.macaddr=B8:27:EB:F2:F5:90

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200

console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

 

This looks like a simple problem of overscan, but setting the four overscan_* parameters to 0 in /boot/config.txt does not change the situation.

 

So, although the display and HDMI are running at 1920x1200, only 1824x1104 is being used for visible data.  Now this is the same problem that others have reported and so it may get sorted out, but there is a 2nd problem that I haven't seen reported and which is causing me trouble which this post is about.

 

If I add "bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200" to /boot/cmdline.txt (as people have suggested), then sure enough the system makes the change and /var/log/Xorg.0.log shows that it's heading in the right direction:

 

(--) FBDEV(0): Virtual size is 1920x1200 (pitch 1920)

 

The trouble is, X11's 1920x1200 area is now mapped into the old 1824x1104 letterbox section of the screen, so instead of better it's actually worse.  Unsurprisingly the fonts look horrible and there is moire patterning as 1920 virtual screen pixels are squashed into 1824 real ones, and correspondingly 1200->1104 on the y axis.  And what's even worse is that in this configuration there is also a lot of USB data loss from both keyboard and mouse, possibly because the drivers are spending so much time converting the virtual screen resolution to the real one.  It's really quite bad.

 

This may be related to the rather ambivalent state of /proc/cmdline under these conditions, which shows both resolutions!

 

dma.dmachans=0x3c bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=1104

bcm2708 boardrev=0x2 bcm2708.serial=0x25f2f590 smsc95xx.macaddr=B8:27:EB:F2:F5:90

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200

console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200

 

I don't really know what it means when it displays both resolutions like that, but the end result is wrong.  A lot of threads have already been written in the RPF forums on this general topic, but I don't think I see a clear way forward.  Any suggestions?

 

Morgaine.

  • Sign in to reply
  • Cancel
  • Former Member
    Former Member over 13 years ago

    have you tried disable_overscan=1 in config.txt ?

     

    I had similar problems on a Dell 2001FP after one of the firmware updates enabled overscan by default, messed with the fbwidth stuff as you have with little success. disable_overscan=1 sorted it for me.

     

    Oh, and those double entries in /proc/cmdline are caused by the firmware blob supplying one set and cmdline.txt the others.  Only way to solve stuff added by the blob seems to be something in config.txt.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago

    Like this:

     

    root@raspberry-pi:~# cat /boot/cmdline.txt
    dwc_otg.dma_enable=1 dwc_otg.dma_burst_size=256 dwc_otg.lpm_enable=0 dwc_otg.dma_enable=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 loglevel=7 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait
    
    
    root@raspberry-pi:~# cat /boot/config.txt
    
    arm_freq=800
    enable_l2cache=1
    disable_overscan=1

     

    init_emmc_clock=50000000

     

    root@raspberry-pi:~# cat /proc/cmdline dma.dmachans=0x3c bcm2708_fb.fbwidth=1600 bcm2708_fb.fbheight=1200 bcm2708.boardrev=0x2 bcm2708.serial=0xc5116ef4 smsc95xx.macaddr=B8:27:EB:11:6E:F4 dwc_otg.dma_enable=1 dwc_otg.dma_burst_size=256 dwc_otg.lpm_enable=0 dwc_otg.dma_enable=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 loglevel=7 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 13 years ago in reply to Former Member

    Hooray, disable_overscan=1 did the trick, thanks selsinork! image

     

    Dunno how I missed that one, it must have been in the forums all over the place. :-(

     

    I'm not seeing mouse or keyboard input loss anymore either.  That was really horrible.  And the pixels are as clean again as from my other machines now, no more moire patterning from the conversion.

     

    Thanks again!

     

    I'll try your speedups too now.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to morgaine

    It's so easy to miss stuff like that..  They seem particularly disorganised with documenting stuff. You have to trawl github commit logs, the wiki in case someone's added it there and then all the comments on the front page blog and every post in the forums.  I find it very frustrating, information is there, it's just almost impossible to find.

     

    My speedups ?   Not sure I've done anything like that...  That said, latest firmware and bootc's 3.2.21 kernel are definately worth a try!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 13 years ago in reply to Former Member

    I just meant the arm_freq=800 and enable_l2cache=1 that you listed as "speedups".  The freq's gone up. image

     

    I ran out of space on this little 2GB card so I hooked the Pi up to my NFS server, works fine.  About to test video now.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to morgaine

    Ah.. I think the l2cache is enabled by default now and the arm_freq setting was part of the Arch image that I started with.  I'm not really to sort of person who goes in for overclocking, but this seems to work fine.

    Don't know if you saw one of the videos from Maker faire where Eben strongly suggested that everyone in the foundation were running overclocked and overvolted image

     

    Do let us know how running over NFS works out. I've done it without problems, but have read about others having problems or crashes, possibly due to USB, or dodgy PSU..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 13 years ago in reply to Former Member

    NFS is working fine, I'm playing ogg albums over it, no audio glitches yet.  I put the same files on the SD card and on the NFS server, and they both play identically and use the same amount of CPU during playback:  27-29% for the current track.

     

    However, I am seeing occasional pauses on xterm sessions while the audio is playing remotely.  That's not good at all, Linux hasn't suffered that kind of thing since the earliest days when schedulers were still ropey.  It could be the allegedly very poor USB driver going into hard spins I guess.  I hope not.

     

    Morgaine.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 13 years ago in reply to Former Member

    I don't like single-core machines for running *nix.  They're not "slippy" inside, every little bit of rescheduling latency is always felt in user space rather than frequently hidden by another core already being ready to go and slithering over.

     

    I think I might buy fewer Pi boards than I had planned (only use them for graphic interfaces, preferably Model A) and spend my money on dual and quad Cortex-A cores instead.  They'll always be more responsive even without considering their extra speed.

     

    Morgaine.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 13 years ago in reply to morgaine

    It's definitely happening, loss of mouse events during audio playback over NFS.  (Never any audio glitch though.)

     

    The way I'm testing it is simply by putting two xterm windows side by side and left-clicking them alternately while the music is playing, and counting the clicks.  If a click is missed then the window doesn't gain focus and that's immediately visible.  So far I always get a missed click before reaching a count of 30.  That's not good.

     

    Addendum:  And the keyboard sometimes goes into autorepeat on pressing a character, which suggests a deschedule between press and release that gets interpretted as a long press, and hence activates autorepeat.  Not good either.  NFS is still playing great without a single glitch, so I guess it must be prioritized over interactive traffic, which is unexpected unless the kernel has been compiled for server operation.

     

    Mouse clicks should never be lost regardless of the type of scheduling for which the kernel was compiled though.  That's clearly a fault on Pi.  When I get a moment I'll install Debian on the BeagleBone and replicate the same tests with audio played from an NFS server.  That should be very interesting.

     

    Morgaine.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to morgaine

    You've read the stuff about the USB port essentially having part of what really ought to be in hardware implemented in software ?  The 8000 interrupts per second and 20% cpu lost to doing it ?  From what I've read, you need to be able to catch all of those interrupts or you start losing key events (or worse). The repeating key thing is probably due to seeing the keydown event, but missing the keyup one.

     

    I know there was some investigation being done into using some fancy interrupt thing, FIQ ?, to deal with a lot of the 8000 without dragging them all into the usb stack, but haven't heard anything about it for a while.

     

    The whole usb thing, if not fixed fairly quickly, could become a messy problem.  I'm half inclined to go for Model A and an enc424j600 ethernet on spi because of it. I need ethernet for the things I'd like to do, but don't necessarily need it to be all that fast, hence considering it..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube