Giter VIP home page Giter VIP logo

set_overscan's Introduction

  • Doesn't work on the Raspberry Pi 4 and actually isn't required for the Pi 4 *
  • was written in the wheezy/jessie era so probably does nasty things now so not *
  • recommended for use any more especially as I haven't used it in years and have no interest *
  • in it now *

set-overscan

Set Raspberry Pi overscan on the fly.

Although I do most of my Raspberry Pi messing around on a headless Raspberry Pi via ssh my "gaming" Raspberry Pi is not always connected to the same monitor it was yesterday or will be tomorrow and because all my monitors are different makes and models I often found myself squinting at the monitor to count pixels so I could change the overscan values in /boot/config.txt and then rebooting to find that i'd miscounted and needed to make more changes to the overscan settings and repeating that until I got it just right.

As this was beginning to get annoying I asked the Raspberry Pi kernel guru Dom Cobley if he had an example of how to twiddle the overscan settings after booting and he sent me the code to do that. I've taken his program mailbox.c & made a few little changes to create overscan.c and have wrapped that in a simple bash shell script to make changes to the Raspberry Pi's overscan setting on the fly easy.

Because I need to use mknod to create a special file the script must be run by root or using sudo.

Use the included Makefile to build overscan and then run the set-overscan script. You currently use the arrow/cursor keys to change each setting in turn & the q key to move to the next overscan value to change. The script writes the final values to /boot/config.txt

Russell "ukscone" Davis 2013-03-10

set_overscan's People

Contributors

felleg avatar orthographic-pedant avatar ukscone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

set_overscan's Issues

On the fly rotation of the screen

Hey,
Is it possible to implement the same to get a rotation on the fly? I made a 2 in 1 computer and I would like to be able to do so.
Thanks

Difficult to use with rotated screen

If the screen is rotated using display_rotate, this won't quite work the way it should... left and right and up and down are in reference to the actual hardware on the screen, but this application still moves and rotates relative to the way the screen is rotated in software.

RPI 3 with 2019-09-26-raspbian-buster

I am VNC ing in to the PI which has a composite display attached.

But I get this message on the screen and using arrow keys does not seem to change anything.

TOP=32, LEFT=32, BOTTOM=32, RIGHT=32   
set_overscan.sh: 170: set_overscan.sh: GPU_OVERSCAN_TOP--: not found
-ne 

Do you have any advice?
Thank you very much.

Setting overscan this way freezes GPU applications / system lock-up

Using this code to set overscan settings is not compatible with applications using the GPU. For example Minecraft.
One thing is that those applications draw outside of the black areas, it is not a big problem.
The bigger problem is that those apps lock-up the system after some time. Sometimes it's one minute, sometimes it's 20 minutes.
Also, if a total system lock-up doesn't happen then the cursor might get frozen in 5 second intervals.

This behaviour is the same in the old and the new version.

changing overscan without reboot doesn't affect graphical (dispmanx) apps?

I'm using a RasPi to emulate old games, and I've stumbled onto a dilemma that this program appears to be the closest thing to a solution for:

  1. When overscan_scale is turned off, dispmanx apps do not respect overscan settings and the edges of the menu GUI get cut off

  2. when overscan_scale is turned on, games run in emulators get nasty scaling artifacts

My hope is to be able to use this program to turn off overscan compensation completely when an emulator is launched, ensuring as close to pixel-perfect display as is possible, and to set it back to a sensible value when returning to the menu GUI.

Unfortunately, it seems like while the text console obeys new overscan settings, dispmanx-using apps including both emulators and the menu program continue to use whatever was set at bootup. Is there anything that this program could do about that? Or could it possibly even toggle the overscan_scale setting during runtime in a way that would affect newly-launched dispmanx programs?

function not found

I know this is dated and maybe no longer works, but I though I'd give it a shot. I'm getting:
set_overscan.sh: 42: set_overscan.sh: function: not found
when I try to run this. Am I doing something wrong? Does this no longer work? Is there a better way now?

Raspberry Pi 4 now has overscan support

raspberrypi/linux#3090

So this script should work now right?
When trying to adjust the overscan the junk area corners of the screen don't move/update.
Manually adjusting the fields work just fine.
(I know how this script runs, I had it running on my Pi 3 just fine).

Cleared my config.txt

The script erased everything in my config.txt.

Didn't work either (it couldn't find the "arrows" command).

setting `disable_overscan` has no effect on my system

This program was really helpful - thanks for putting it together. I had trouble in that no matter how I set disable_overscan in /boot/config.txt and rebooted, I would get the same error message :

"Overscan is currently disabled. Please add the line disable_overscan to the bottom of the config.txt"

I tried:

  • disable_overscan=0
  • disable_overscan=1
  • disable_overscan
  • #disable_overscan=0
  • #disable_overscan=1
  • #disable_overscan

When I ran vcgencmd get_config int, I would see disable_overscan=1 regardless of the settings I had in /boot/config.txt.

Anyway, commenting out the block of code in set_overscan.sh that tests for overscan (if [ vcgencmd get_config disable_overscan | awk -F '=' '{print $2}' -eq "1") allowed the program to run perfectly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.