How to edit config.txt using command line
-
To remove hiss or static or white noise when using the 3.5mm headphone jack:
Run at the command line: sudo nano /boot/config.txt and insert at the bottom of the file: disable_audio_dither=1.
turn up Retropie volume to 100% in the settings menu in the program.Umm? After I type the dither=1 stuff how do I exit and save that?
-
To save a file you can use CTRL+O.
To quit nano you can use CTRL+X. You will be prompted to save your file if it has changed and you can answer this prompt with either a Y or a N. If you’ve changed your mind at this point you can return the main edit screen using CTRL+C.
I tend to use winSCP instead but I seem to remember these shortcuts appear at the bottom of nano but I cant be 100% certain.
-
@rbaker thank you very I will give it a go tomorrow. It had ^X Exit at the bottom of the page but I couldn't get it to work. I will try as you suggested when I get a chance and repot back
-
-
If you have the Raspbian lxde desktop installed and prefer to use GUI text editors, you'll need to bear in mind that files open with read-only permissions if you open them via the file manager.
You can use the terminal to launch an editor with full superuser permissions so that you can easily edit, and most importantly save, them:
sudo leafpad
Or
sudo leafpad /path/to/filename
I cover using command line editors, such as nano, and GUI editors including leafpad and gedit in the following guide:
Multipurpose Raspberry Pi – Part 2: Adding a Menu to Access RetroPie, Kodi, and the Raspbian Desktop -
@rbaker dam can't seem to get the job done. I save it etc but still have white noise in emulationstation. I'm possibly not doing it correctly. Does anybody have a link to a video to show me how to do it correctly please?
-
@dazza I don't have a video but you should check that your modification to:
/boot/config.txt
is correctly typed. Here is the extract section containing the relevant bit from mine:
# uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan #disable_overscan=1 disable_audio_dither=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
To remove white noise, this is the only modification that I made. This removes the hiss when using the 3.5" jack. The next thing to try is to turn the volume down using option 4 in the retropie audio menu to about 70%. When the signal is then fed into your amp, it will be less noisy and the volume can then be controlled with the control on the amp. I actually have mine at 80% and there is no noise. The quality of the amp matters though. I returned a dedicated "arcade" amp costing £15. It was terrible. I just hacked apart a £10 usb powered speaker set and it's perfect.
The only other thing that I can think of is that it is not saving your change? You may not be editing it correctly:
sudo nano /boot/config.txt
make the necessary changes
Press Control-x
Press y
Press [enter]then.....
sudo reboot
Good Luck!
-
I haven't disabled audio dither in config.txt, but I am using a small in-line rotary volume control between the 3.5" jack and my amp; it's basically just a variable resistor, which effectively removes the hiss when turned down enough.
The only issue really is that media playback (desktop, Kofi Media Centre etc) is somewhat louder than audio from the RetroPie emulators, and eliminating the hiss is a bit of a balancing act.
-
@rbaker fantastic. I really appreciate your help. It worked a treat after the reboot. Thank you thank you thank you
-
Pls help how do I get to boot/configon retropie
-
In the terminal type
"cd /boot"
that will put in the boot directory, inside that directory is config.txt.
to open and edit it type
"sudo nano config.txt"or you could open it from anywhere by typing "sudo nano /boot/config.txt"
What i would like to know is how could you turn this into a shell script?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.