New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpi-config: Relocated "start_x=1" in config.txt #678
Conversation
Can one of the admins verify this patch? |
@@ -115,8 +115,7 @@ do_deploy() { | |||
|
|||
# Video camera support | |||
if [ "${VIDEO_CAMERA}" = "1" ]; then | |||
echo "# Enable video camera" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | |||
echo "start_x=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | |||
sed -i '/#start_x=/ c\start_x=1' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any explanation for this? How is the config in Raspbian?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it needs gpu memory >= 128M to be reserved, I am fine with enabling this but perhaps it should be a knob like ENABLE_UART and perhaps kept off by default, and clearly documented how to enable camera with meta-raspberrypi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agherzan, I have no explanations on this. Doing some test, I noticed that with my raspberry pi 4b and with my SD card, if I put the "start_x=1" after the ~643 line, I have no access to the camera when the system boots up.
The config.txt of the raspbian image I have, has only ~70 lines. This makes me think that there could be a restriction in the config file size.
@kraj There is already a knob for this: VIDEO_CAMERA = "1" and is documented in docs/extra-build-config.md. What I did is instead of adding "start_x=1" at the end of the file (line ~1187), replace the already commented "#start_x=0" (line 469) with "start_x=1". I forgot to mention that I'm using "gpu_mem=512".
Would be nice if anyone can replicate what I'm seeing, it's a bit strange for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, it sounds like something else is going on here. Size could be a suspect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that this patch fixes the camera problem for me as well on RPi 4B (4GB)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gvkalra Have you managed to find more info on this? If not, Let's get this in (so we fix the issue at hand) but also add a TODO
comment to flag this issue in the recipe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I don't have more information on this ¯_(ツ)_/¯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Let's throw a comment in the recipe explaining the conundrum and proceed with the merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the TODO with a comment telling that the cause can be the file size, as I still belive it after doing some more tests.
I coudn't identify that the order of the variables in the file is creating this issue.
And working with the Raspbian config file, if I add an array of '#' caracteres of size 150x150 before the "start_x=1", the camera is not enabled. The resulting file looks like the following ("start_x=1" is at the end):
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
enable_uart=1
gpu_mem=512
[all]
#dtoverlay=vc4-fkms-v3d
############################### ... ########################################
...
... 150x150 of '#'
...
############################### ... ########################################
start_x=1
This array of '#' has 22.2 kB in size which is even less than the config file meta-raspberrypi is using.
I'll open a thread in the raspberrypi.org forum asking this, and I'll open a new pull request to remove the coment if I get an answer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change looks ok to merge @agherzan
@SCVready can you please add a TODO + rebase the pull request? Ref: #678 (comment) Thanks~ |
It seems like "start_x=1" needs to be earlier in the file to work properly on the Rapberry Pi 4 B. Fixes: agherzan#670 Signed-off-by: SCVready <alejandro.solozabal@outlook.com>
@agherzan-ci ok to test |
* in agherzan#678 this line was acidentally changed from "${BOOTFILES_DIR_NAME}" to "bcm2835-bootfiles", causing do_deploy to fail finding config.txt Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* in #678 this line was acidentally changed from "${BOOTFILES_DIR_NAME}" to "bcm2835-bootfiles", causing do_deploy to fail finding config.txt Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Updated the comment that indicates there is a possible file limitation in config.txt affecting certain variables, at least the "start_x" var. This issue was originally discussed and fixed in: agherzan#678 and this commit updates the comment added with the new info gathered from: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=298129 and from a similar issue: raspberrypi/firmware#1012 Signed-off-by: SCVready <alejandro.solozabal@outlook.com>
Updated the comment that indicates there is a possible file limitation in config.txt affecting certain variables, at least the "start_x" var. This issue was originally discussed and fixed in: #678 and this commit updates the comment added with the new info gathered from: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=298129 and from a similar issue: raspberrypi/firmware#1012 Signed-off-by: SCVready <alejandro.solozabal@outlook.com>
@NobuoTsukamoto figured out that It seems like "start_x=1" needs to be earlier in the file to work properly on the Rapberry Pi 4 B.
Fixes: #670