# config.txt deleted by accident.

**URL:** <https://forums.balena.io/t/config-txt-deleted-by-accident/60760>\
**Category:** balenaOS\
**Created:** [February 3, 2020, 12:05am UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760 "2020-02-03T00:05:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 12:05am UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/1 "2020-02-03T00:05:51Z")

</div>

I have ssh locally to my Raspberry Pi 3 running latest BalenaOS 2.46.1+rev1 development version.  
I have deleted the config.txt file from /mnt/boot/ directory.

After rebbot I can see the config.txt file has been recreated in the same directory and the configuration looks ok and match the fleet wide settings applied using BalenaCloud Dashboard.  
The App looks running but the LCD now does not work properly ( before the accidental deletion of config.txt the LCD was perfectly working).

What can could have happened that messed up the LCD?

Thanks

---

<div class="post-metadata">

**Author:** ![gelbal](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/gelbal/32/1109_2.png) [@gelbal](https://forums.balena.io/u/gelbal)\
**Post date:** [February 3, 2020, 10:34am UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/2 "2020-02-03T10:34:34Z")

</div>

Hi @rlev, could you please clarify if you have done any edits to `/mnt/boot/config.txt` earlier? What about after it is recreated?

> I have ssh locally to my Raspberry Pi 3

Next, do you mean that you were running this RPi3 locally?

balena supervisor is going re-create `/mnt/boot/config.txt` and keep it in sync with the version in cloud as long as the device is connected to balenaCloud and not running in local mode. Here is our relevant doc about modifying `config,txt`: [Advanced boot settings - Balena Documentation](https://www.balena.io/docs/reference/OS/advanced/#configtxt)

I will suggest restarting the device to make sure that the device got the latest synced version of config.txt. It’d be good to check and compare its content with the default one in case you expect modifications here. As documented, we suggest to update the variables here via the dashboard interface.

If things are not running fine after restart, let’s take a further look. It’d be good if you could send us the device UUID (the dashboard link of device) and enable support access. So we could check the supervisor logs and see if there are any errors.

---

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 3:16pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/4 "2020-02-03T15:16:06Z")

</div>

Hi @gelbal,

I using 2 devices with BalenaOS development version.  
In one of them “lively-wildflower” was working ok but we noted the screen was setup via the initial config.txt to 640x480. We saw this setting using the balena cloud Dashboard. The device at this point was working ok, lcd working fine but with the mentioned resolution.  
We decided to modify the 640x480 to 800x600 which is the max. resolution supported by our device’s LCD.  
We used the device configuration menu in the balena cloud Dashboard.  
After the modifications were done the device LCD show correct booting splash screen but then goes black and show black screen with some random lines.  
The device still connect to balena cloud. using the Dashboard ssh terminal we can see in the Host that the /mnt/boot/config.txt is ok and match the parameters changed but the screen does not work properly anymore :(.

Dashboard link :  
[https://dashboard.balena-cloud.com/apps/1569330/devices](https://dashboard.balena-cloud.com/apps/1569330/devices)

“lively-wildflower” device UUID :  
382e982e7e6f16a1f1780c98413f3e0f

Thanks

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [February 3, 2020, 3:21pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/5 "2020-02-03T15:21:06Z")

</div>

Hello, can you please attach your config.txt file here ?

---

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 3:26pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/6 "2020-02-03T15:26:11Z")

</div>

Hi @zvin

This is the config.txt

```auto
# 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=800
#framebuffer_height=480

# 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=31
#lcd 1,31
#HDMI 2,82

# 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=1200

dtparam=i2c_arm=on
dtparam=spi=off

#display dpi24
ignore_lcd=1
lcd_rotate=2
dtoverlay=dpi24
overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
framebuffer_width=800
framebuffer_height=480
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87

dpi_output_format=0xfff007

dpi_timings=800 0 40 48 88 480 0 13 3 32 0 0 0 60 0 32000000 3

#I2C FOR TOUCH
#gpio=0,1=ip
gpio=28,29=a0
#DPI
gpio=0,1=a2		
gpio=4-27=a2
#UART1 FOR BT
gpio=40-41=a5
#SDIO FOR WIFI
gpio=34-39=a3
#UART0 FOR MCU
gpio=32-33=a3
gpio=30,31=op
#PWM FOR ADJ
#gpio=45=a0
#fix
gpio=45=ip
#Touch INT/RST
gpio=2,3=ip

# Uncomment some or all of these to enable the optional hardware interfaces
dtoverlay=midi-uart1
dtoverlay=uart1,txd1_pin=40
dtoverlay=uart1,rxd1_pin=41

dtoverlay=i2c0-bcm2708,pins_28_29
dtparam=i2c_vc=on
dtparam=uart0_arm=on
dtparam=uart1_arm=on
dtparam=sdio1_arm=on
dtparam=pwm1_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# 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

[all]
#dtoverlay=vc4-fkms-v3d

#scaling_kernel=8
start_x=0
gpu_mem=256
##disable_camera_led=1
enable_uart=1

```

---

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 3:28pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/7 "2020-02-03T15:28:19Z")

</div>

framebuffer\_width=800  
framebuffer\_height=480

were the lines changes using balena cloud Dashboard

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [February 3, 2020, 3:38pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/8 "2020-02-03T15:38:45Z")

</div>

Is the screen connected via hdmi ?  
According to [https://www.raspberrypi.org/documentation/configuration/config-txt/video.md](https://www.raspberrypi.org/documentation/configuration/config-txt/video.md) `hdmi_group` should be `2` and `hdmi_mode` should be `8`, `9`, `10`, `11`, `12` or `13` depending on the refresh rate for a `800x600` resolution.  
Your `config.txt` sets the screen for 1080p@50Hz  
`framebuffer_width` and `framebuffer_height` control the framebuffer size, not the screen resolution.

---

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 3:41pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/10 "2020-02-03T15:41:15Z")

</div>

The screen is a lcd 800x600 and is connected via RGB 50 pins ribbon cable

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [February 3, 2020, 3:43pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/11 "2020-02-03T15:43:09Z")

</div>

What is the screen model ?

---

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 3:46pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/12 "2020-02-03T15:46:59Z")

</div>

Yeebo YB-TG800480C50A-C-A0

---

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 3:54pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/13 "2020-02-03T15:54:27Z")

</div>

[yeebo\_lcd\_ds.pdf](https://forums.balena.io/uploads/short-url/7qyOB7rp3uvNJcaLvTJyOiL8jAv.pdf) (1.4 MB)

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [February 3, 2020, 3:59pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/14 "2020-02-03T15:59:25Z")

</div>

According to this pdf, this screen resolution is 800x480, not 800x600.

---

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 4:00pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/15 "2020-02-03T16:00:59Z")

</div>

Correct.

Was a typo. 800x480 is the right value and current setting in the device according to Dashboard

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [February 3, 2020, 4:11pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/16 "2020-02-03T16:11:20Z")

</div>

This page has an example of 800x480 dpi screen at the bottom, I don’t know if it will work for your screen: [https://www.raspberrypi.org/documentation/hardware/raspberrypi/dpi/README.md](https://www.raspberrypi.org/documentation/hardware/raspberrypi/dpi/README.md)

---

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 4:16pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/17 "2020-02-03T16:16:23Z")

</div>

I tried. Same problem ☹

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [February 3, 2020, 4:32pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/18 "2020-02-03T16:32:33Z")

</div>

For reference, this looks like your thread [https://www.raspberrypi.org/forums/viewtopic.php?t=263140](https://www.raspberrypi.org/forums/viewtopic.php?t=263140)  
Was the screen working as expected before settings `framebuffer_width` and `framebuffer_height` ?

---

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 4:35pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/19 "2020-02-03T16:35:20Z")

</div>

The screen was working ok.  
My guess is that somehow after we did the modification using the Dashboard the supervisor did something unexpected and we end up with a non working lcd although the config.txt in the device match the settings in the balena cloud Dashboard.

---

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 4:39pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/20 "2020-02-03T16:39:07Z")

</div>

We even tried to go back to original setting using again the Dashboard but the LCD problems remained there.

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [February 3, 2020, 4:40pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/21 "2020-02-03T16:40:17Z")

</div>

Can you try removing the env vars from the dashboard and switching back to the working `config.txt` ?

---

<div class="post-metadata">

**Author:** ![rlev](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rlev](https://forums.balena.io/u/rlev)\
**Post date:** [February 3, 2020, 4:41pm UTC](https://forums.balena.io/t/config-txt-deleted-by-accident/60760/22 "2020-02-03T16:41:57Z")

</div>

We tried that. Did not help.  
I guess the only solution would be to reflash the device with a new BalenaOS and assign a new device ID.  
But we were hoping there was a easier solution.

[Next page](https://forums.balena.io/t/config-txt-deleted-by-accident/60760.md?page=2)
