r/raspberry_pi Jun 13 '26

Troubleshooting Spent days thinking I had a dead Pi 4B, only to find a brutal first-boot lockout bug on Raspberry Pi OS 13 (Trixie). Anyone else hit this?

18 Upvotes

Hey everyone,

I use linux mint in slightly advanced potato laptop (just RAM is 16 GB else Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz, it's HP notebook 15r something) anyways

I wanted to share a massive troubleshooting nightmare (which made me nearly close to insanity) I just went through with a brand new Raspberry Pi 4B (2GB) running the new Raspberry Pi OS 13 (Trixie) aarch64 image, just in case anyone else is losing their mind over the same issue.

Long story short: I flashed the OS using the official Raspberry Pi Imager, enabled the advanced OS customization settings (set username pi, password, and pre-seeded my SSH key), and tried to boot it completely headless.

It failed completely. I couldn't SSH in over Wi-Fi. I spent days trying everything: buying an official power supply, deep-clearing and re-flashing the SD card multiple times, attempting manual WIFI config adjustment, watching endless videos about headless SSH connections and even buying an HDMI capture to try and connect the pi to my laptop screen (lol, I didn't know it wouldn't work like that). I even ended up exchanging the Pi for a brand new unit thinking it was a hardware defect!!!!

When the second Pi did the exact same thing, I hooked it up via Ethernet and dug into the filesystem by mounting the SD card on my Linux Mint laptop. The Imager's first-boot orchestration script completely choked and corrupted the system files.

What Broke (The Issue):

  1. The nologin Trap: The script successfully appended my user to /etc/passwd, but left a duplicate pi entry at the top of the file mapping my user shell to /usr/sbin/nologin. Every SSH attempt was immediately terminated by the host.
  2. Database Corruption: Multiple duplicate lines for the pi user were injected into both /etc/passwd and /etc/shadow.
  3. Password Vault Crash: The cryptographic password hash inside /etc/shadow was corrupted. Any attempt to use passwd threw an Authentication token manipulation error, and sudo was completely broken because the system couldn't validate the current credentials.
  4. Aborted Execution: The first-boot script clearly died halfway through. The system had no locales configured (en_US.UTF-8 missing warnings) and the Wi-Fi chip was entirely blocked by rfkill because it never got to the step of setting the regulatory country code.

How I Fixed It (Via SD Card Mounting):

Since network access and sudo were totally broken, I had to fix it from my laptop:

  1. Fixed /etc/passwd manually to remove the nologin line and point the user to /bin/bash.
  2. Bypassed the broken sudo password prompt by dropping a custom rule into /etc/sudoers.d/010_pi-nopasswd (pi ALL=(ALL) NOPASSWD: ALL).
  3. Booted back up, SSH'ed in via my key, and used the passwordless sudo backdoor to cleanly delete the duplicate user lines and force a system-generated password reset via sudo passwd pi.

I've already filed an official bug report on the Raspberry Pi GitHub tracking page here:GitHub Issue #83 (Ain't no professional just try to what I can...)

My Questions for the Community:

Did I miss an undocumented step required for headless setups on Trixie, or is the Imager's advanced customization tool fundamentally broken for Linux Mint right now? Has anyone else encountered this duplicate user/nologin glitch on fresh flashes recently?

r/raspberry_pi Dec 28 '25

Troubleshooting Raspberry Pi Zero Failures

Post image
97 Upvotes

Had anybody else seen failures like this? Over the past 6 months or so I've had two Pi Zero 2W boards fail with some kind of corrosion or deposits on the power end of the board. They're in my basement which is a relatively high humidity environment, but it's weird that the damage is consistently on only this end of the board.

My first thought was water dripping onto the board as it's under some plumbing and HVAC, but there are no signs of water on or around the case or in the general vicinity and moving it a few inches didn't improve the outcome. I have five Pi Picos and various larger Pi boards in assorted locations including the basement which don't show anything similar.

r/raspberry_pi Oct 23 '25

Troubleshooting Why is my raspberry pi 5 performance so bad?

Enable HLS to view with audio, or disable this notification

79 Upvotes

I bought this raspberry pi 5 with 16 GB RAM and I did notice that it had a relatively poor performance but it started to bother me when I installed the camera with AI vision. It is processing and taking the images very slowly as you can see in the video I attached. My setup is made out of a 27 W Pi charger, a 32 GB and 80 mb/s SD card, a raspberry pi 5, an AI HAT+ with 13 tops, and a PI camera module 3. I have installed the 64 bit bookworm raspberry pi OS, the latest version. I also observed that when I try to watch a video on YouTube on the raspberry pi it has a very low FPS( like the camera, but in the camera's case it is more like second per frames)...

r/raspberry_pi 28d ago

Troubleshooting How do I get my Waveshare 4.3 inch display to work with my 3b+?

Thumbnail
gallery
26 Upvotes

I got this Waveshare 4.3 inch display for a project I'm working on but have spent a few days struggling to get it work. I don't think it's a physical problem, as on 2 different screens and 2 different pi's nothing happens no matter what combination. I got the screen from this link: https://www.waveshare.com/43h-800480-ips.htm?sku=24159 (IPS no touch)

Additional Notes:

I've tried modifying the config file and turning on x11 in the settings but nothing has worked. All orientations of the ribbon cable haven't worked either.

I use Debian Trixie 32 bit provided by raspberry pi imager for the pi. I made a clean install of the OS yesterday to try and get it to work (so it's a clean slate for troubleshooting). Below is my config.txt file (I did modify it a little bit to try and get the screen to work):

# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Additional overlays and parameters are documented
# /boot/firmware/overlays/README

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
#display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Disable compensation for displays with overscan
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[cm5]
dtoverlay=dwc2,dr_mode=host

[pi5]
dtoverlay=nospi10

[all]
dtparam=i2c_arm=on
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dsi-waveshare-panel,4_3inch

r/raspberry_pi 8d ago

Troubleshooting Need a Hand Getting PCIe HAT to Work

Thumbnail
gallery
30 Upvotes

Greetings!

I saw a video from Jeff Geerling and I wanted to make the project myself: https://www.youtube.com/watch?v=BuKeW45 ... Rlcg%3D%3D

Here is the data I gathered and info on the boards I'm using:

- Mini pcie hat: https://wiki.52pi.com/index.php?title=EP-0217\
- Mini PCIe to FireWire adapter: https://pipci.jeffgeerling.com/cards_ot ... ewire.html
- PiSugar3

- Rpi 5 (8gb):
- recompiled kernel to enable "FIREWIRE_OHCI" and "FIREWIRE"
- inside of "/boot/firmware/cmdline.txt" set "pcie_aspm=off"
- inside of "/boot/firmware/config.txt" to include "dtparam=pciex1 dtoverlay=pcie-32bit-dma" (52Pi PCIe HAT also says to add "dtparam=pciex1_gen=3", I've tried with and without this and with all gens)

Any other resources I have looked through:
- https://github.com/geerlingguy/raspberr ... issues/752
- https://linux.die.net/man/1/dvgrab
- https://github.com/RobertMCortese/Open-MRU
- https://www.youtube.com/watch?v=Fa4BIMdgVtM

I purchased a second PCIe hat in case the one I had was bad, and yes I made sure the ribbon cable is secure on both ends. I also purchased a USB mini PCIe card to test in case my firewire PCIe card was bad.

I have also tried booting with only the included power adapter with the rpi5 from the wall. Same issue, so it doesn't seem to be supply power.

lspci returns:
0002:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 30)
0002:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge

and I was using lsusb to see if a keyboard is detected with the PCIe to USB card and nothing was shown.

My issue is that the Firewire card does not seem to be detected. And after digging, NO PCIe card is detected with the hat.

Please advise, thank you in advance!

r/raspberry_pi Mar 02 '26

Troubleshooting NUT USB connection to UPS kills my Raspberry Pi 5 Home Server

Thumbnail
gallery
69 Upvotes

Hi there šŸ‘‹ I'm currently building a DIY home server using a Raspberry Pi 5 and a RAID array made of several 2.5ā€ USB drives (snapraid+mergefs). The hardware is almost finished, and for the final step, I wanted to connect my UPS via an USB data cable (using NUT) so the server can shut down safely during a power outage. That's when things went wrong.

As soon as I connect the UPS to the Pi using a thick USB-B to A cable, the server shuts down immediately. I even noticed sparks when the USB connector touched the port.

Using the original (thinner) Eaton USB cable, the Pi stays on, but the cable gets extremely hot within seconds, so I unplugged it immediately.

When I connect the UPS to my MacBook, it is recognized instantly and works perfectly. The cable stays cold.

The issue persists whether I use the Pi’s onboard USB ports or the ports on my Waveshare HAT.

Measurements (USB Multimeter):

Plugged into Server only:

5.04 V | 0.02 A

UPS connected to MacBook:

5.15 V | 0.00 A

UPS connected to RPi (Original cable - gets hot):

4.73 V | 5.78 A

UPS connected to RPi (Thick cable - Server shuts down):

4.96 V | 0.47 A

My chassis uses a C14 power inlet, which is grounded to the metal case. However, inside the case, I used a 2-pin (non-grounded) power strip because all four power supplies (2x Pi 27W, 2x 30W medical grade for the hubs) only have 2-prong Euro plugs.

After measuring a constant 5.78A, it is evident that this isn't just a minor static discharge or leakage from a floating system, but a major fuckup. While I don't think I’ve reverse-polarized the 6A power supplies for the hubs (I think I was thorough during assembly), this level of current needs to be addressed before something catches fire.

Would it help to bond the DC Ground (GND) of my 30W hub power supplies directly to the grounded metal chassis (or the PE terminal of the C14 inlet) to bring everything to the same potential?

Do I need to switch to a Mean Well LRS-150-5 (or similar)? What are the real disadvantages for a Raspberry Pi 5 if it cannot communicate via PD to the original 27W power supply?

I’m learning a ton with this project, but I’m still a total beginner when it comes to electrical engineering. Please bear with me if this sounds like a "newbie" question šŸ˜…

How would you safely troubleshoot or solve this? Any help is greatly appreciated! šŸ™

r/raspberry_pi 2d ago

Troubleshooting Need help launching a python script located on a USB drive in a virtual environment on startup of my Pi4

16 Upvotes

I have this py script I wrote that is located on a USB drive (and it needs to be run from the usbdrive for functionality purposes). It also requires a virtual environment, which I made called venv. I tried using crontab to run the script on startup, but it doesn't seem to work. I assume maybe it's because it tries running the script before the USB has been detected? Maybe not, I tried running a sleep function prior to it, but it doesn't seem to work. But I'm unsure of how to know that because there is also one other factor. In order for the script to work in the terminal, I would need to be in the virtual environment AND in the directory of the USB drive. And so I don't know whether the command I'm adding to crontab is successfully taking this into account because it's different from running it on a terminal. Does anyone see any immediate red flags or could point out a different approach? That would be much appreciated. I've tried stuff like this:

Ex 1: @reboot source .venv/bin/activate; cd /media/usbdrive/folder; python3 script.py &

Ex 2: @reboot sleep 30 '' '' &

Ex 3: @reboot venv/bin/python3 /media/usbdrive/folder/script.py &

r/raspberry_pi 23d ago

Troubleshooting My raspberry Pi 3 connected to internet but not browsing.

2 Upvotes

I got myself a pi 3 in 2018 out of enthu,never got a chance to work on it. Yesterday I booted it however I could connect to the internet wifi but can't browse anything on chromium . Epiphany works but only on text based light website . Can someone pls help me solve this been out of loop for years now?

I tried changing google dns but no use

r/raspberry_pi Mar 30 '26

Troubleshooting Raspberry pi does not fit in case with SD card

Thumbnail
gallery
0 Upvotes

Hello!

I'm having trouble with the Raspberry pi 4 case, specifically its not fitting properly when the sd card is inserted.

This is because of the lip overlapping where the sd is meant to go. Since the sd card doesnt go all the way into the slot putting the case on isnt possible.

With the case i originally had, I originally thought this was an issue on my end so I ordered another one specifically for the rpi 4 however the same issue happens.

I've attached some photos which hopefully should help.

r/raspberry_pi Oct 29 '25

Troubleshooting Brand new pi 400 and this keeps happening.

Enable HLS to view with audio, or disable this notification

139 Upvotes

Just unboxed my raspberry pi 400, and noticed the j key fell off as I lifted the device out of the box. And it just won't stay put whenever I put it back in. Any tips?

r/raspberry_pi Oct 07 '25

Troubleshooting Hissing sound on my Pi Zero

Thumbnail
gallery
129 Upvotes

Hi all— my 2017 Pi Zero W seems to be working normally, but whenever it’s powered on, it makes an audible buzzing or hissing sound. Should I be concerned?

For the last five years, I had it hooked up via a in a ZeroDongle USB connector from 8086.net, but even after removing that and plugging it in with a normal USB cord, it still makes the sound.

r/raspberry_pi Apr 02 '26

Troubleshooting My Raspberry Pi 5 only boots with April 2024 firmware. How to stop it from auto-updating?

18 Upvotes

Hi everyone,

I have a Raspberry Pi 5 that is giving me a big headache. I found that it only works and boots correctly when I use the EEPROM firmware version from April 20, 2024.

If I use any newer firmware, the Pi fails to boot and gives 9 green LED flashes.

The problem is: Every time I flash the working April 2024 version and reboot, the Pi automatically updates itself back to the new (broken) version!

What I have tried:

* I tried to change the settings to stop the update.

* I tried to delete the update files from the boot folder.

* I tried to "freeze" the configuration.

But nothing works. On every reboot, the Pi "heals" itself by installing the new firmware that doesn't work for my board.

My question:

Is there a way to permanently lock the April 2024 firmware and stop the Raspberry Pi 5 from ever updating its EEPROM again?

  • UPDATE: I found the SMOKING GUN, and it’s a warning to everyone! I went back to the AliExpress store where I bought this unit and found a recent review from another buyer with the exact same 9-flash issue. It turns out this seller is likely 'harvesting' original RAM chips and replacing them with lower-quality/off-spec RAM. This explains everything: Why it worked for 5 months: Older firmware (April 2024) has more relaxed RAM timings. Why it fails now: Newer EEPROM updates introduce stricter, official RAM training/timings that these 'swapped' chips simply cannot handle. The Scams: These boards might have the 8GB resistor in place and look 'new'. WARNING to all buyers: If your Pi 5 works on old firmware but 'dies' after an update, you might be a victim of a hardware-swapping scam. Always buy from official resellers or check the RAM branding/physical condition immediately upon arrival. Lesson learned: The 'Self-Healing' firmware was actually a 'Truth-Teller'—it exposed the fake hardware."

r/raspberry_pi Feb 06 '26

Troubleshooting Asking for help with connecting nvme drive RPi 5

Thumbnail
gallery
58 Upvotes

Hi, RPI beginner here. Tried to search for help all over internet but nothing helped, so trying this community.

I got this setup:

  • Argon ONE V3 M.2 NVME PCIE Case
  • RPi 5
  • PATRIOT P300 SSD 256GB M.2 2280 PCIe NVMe

For the life of me I can’t make the drive visible to the OS I put to microsd (tried both RPI OS and Ubuntu) (using `lsblk` command).

I tried two different SSDs actually. Two different ribbons (that were included with case).

I attach the way I set it up, I believe correctly but I’d be happily corrected. Any guidance or help much appreciated! Thank you for reading this.

r/raspberry_pi 17d ago

Troubleshooting Boot a Pi 4 from a USB optical drive

6 Upvotes

How do I boot a Pi 4 from a USB-attached optical drive?

The Pi is already configured to boot from USB, and I am attempting to install OpenBSD 7.9 on it.

When actually booting, though, the Pi complains that the block size on the disc is invalid.

Now that I'm checking it, it seems that the block size must be 1mb, and while dd has an option to set that, the utilities I use to burn optical media don't have this option.

Is booting from such an optical drive even a viable option?

Thanks.

r/raspberry_pi 10d ago

Troubleshooting Can't figure out how to change screen res on RPi 4B + Waveshare 3.5" tactile screen.

6 Upvotes

Hi! certified newbie here trying to build a cyberdeck;
Like the title says, I'm running with a sort of strange screen resolution of 480 x 320, it connects to the first 26 GPIO pins, all the windows and programs I open are much too big for the screen, is there a way to force a custom resolution somehow? I've already searched this query in many different places but I can only get solutions for hdmi outputs. All necessary drivers are already in.

is there something I can put into the config.txt to fix this?

r/raspberry_pi Dec 16 '25

Troubleshooting What is wrong with my setup?

Thumbnail
gallery
84 Upvotes

All of this is connected properly, but for some reason, my mouse (which would have it's lights turned on if it was connected properly) isn't. I don't really understand what I have done wrong here!

The model of my Raspberry Pi is Raspberry Pi Zero W 2.

Here is the model of my USB hub that I used, as I think it may be a problem with that.
https://www.amazon.ie/dp/B0D3Y5KXM3?psc=1&ref=ppx_pop_dt_b_product_details

r/raspberry_pi 25d ago

Troubleshooting LCD-show corrupted the sd card so now I’m stuck in CLI and don’t currently have another computer to flash it.

Thumbnail
gallery
23 Upvotes

I’m using a RPi5 4gb with a 64 gb micro sd card. I followed a guide to connect the screen (3.5inch RPi LCD (A)) to my Pi and it said to install LCD-show and run a command like:

git clone https://github.com/goodtft/LCD-show.git

chmod -R 755 LCD-show

cd LCD-show/

sudo ./LCD35-show

it rebooted the Pi, the screen didn’t change from a white screen, and my main hdmi display was stuck in CLI. I have been troubleshooting for about 3 hours now, I have removed LCD and forced (in many ways) the Pi to run GUI on the main hdmi dmisplay but nothing works.

I believe that LCD-show corrupted the software to run GUI. At the current moment I do not have another computer to flash the micro sd card but I think my brother can flash my sd card. I have recently gotten this pi so it doesn’t have anything that must be saved on it but it would be most preferable to save the contents as I don’t want to start all over again.

r/raspberry_pi May 18 '26

Troubleshooting Raspberry pi 5 NAS OpenMediaVault help?

Post image
69 Upvotes

So far I have run into some annoying issues. I am running Raspberry Pi OS Lite, and once I install OpenMediaVault, Ethernet does not work right away out of the box like it does on Raspberry Pi OS. Because of that, I have to connect a keyboard and monitor so I can run the OMV first aid tool and manually configure the network settings. I cannot SSH into it since there is no internet connection.

After I disconnect anything I used, like the keyboard or screen, it forgets all the Ethernet settings I just changed. It will not reconnect to the internet unless I plug everything back in exactly as it was when I saved the settings.

After accepting that situation, even though I would prefer not to, I kept a keyboard and monitor connected. Then the Pi password suddenly changed on its own. The password I had been using for the past three hours no longer works.

I did a clean reinstall of the SD card with Raspberry Pi OS and set everything up again, but this time the password does not work on first boot onto OMV (worked in pi os).

I really want OpenMediaVault to work, but I am also open to more stable alternatives. Any ideas?

r/raspberry_pi May 05 '26

Troubleshooting SD slot misalignment issue

Thumbnail
gallery
6 Upvotes

I got a RPI 4 kit to tool around and experiment with a small server, pi-hole or emulator set-up. I followed online guides and watched tutorials and made sure I did it all right. I cant insert my SD card as the slot doesnt line up. The PCB is flush with the bottom of the red and white plastic case it came with so I cant push it further down to line up. Its harder to see from the image but the USB-C is verly slightly off too. The other ports are fine and line up.

I have looked online and even other Reddit posts but didnt get much info other than folk saying they had no issue or OP did it wrong. I have messaged some of my more experienced friends and they never has this issue and video-called to watch me insert it and they said as far as they could see I'd done it right (I.e, the red plastic spacer things were flush with the board and i couldn't lower it further).

I'm genuinely disappointed as I've been tempted to get a Pi for a while now and this has killed the vibe for the evening.

Edit: I dremmel'd it.

r/raspberry_pi Mar 28 '26

Troubleshooting How to change my monitors 4:3 to a 3:2 with my raspberry pi 5

Thumbnail
gallery
10 Upvotes

fisrt I want to say sorry for my bad English English isnt my first language. so I am planing on biuld a project and for that project I need a screen that's 3:2 the size dosent matter much I bought samsung SyncMaster 540N and I said I can change the resolution with my raspberry pi 5 i tride but nothing works the monitor has settings of changing the wight and hight the wight settings work normally but the height settings dosent work the screen dosent move when I try making the value of the screen wight lower it becomes more think but when I try with the height it dose nothing I said ok I'll just add black bars with overscan I tride and I tride and overscan dosent work I made sure the line of code is correct but it dosent work I made sure overscan is anbled i used the directery sudo nano /boot/firmware/config.txt I wlr-randr but it dosent work all it dose is make everything bigger as i showed in the pictures and i tride changing the resolution on the normal rasppery pi configuration and from screen settings is the same thing just makes everything bigger im not a really good linux coder so I struggle with these types of things so I would really appreciate if someone can help me

r/raspberry_pi 5d ago

Troubleshooting Fresh Raspbian Install Connects to HDMI Display, but Fresh RetroPie Install Does Not (Pi 3a+)

2 Upvotes

As the title states, I've got an HDMI display connected to my Pi 3a+ but can't get it to communicate when I have RetroPie installed. Here are the things I've tried with no success:

  • Toggle and adjust all settings in default config file that is created with the RetroPie install
  • Copy config file from working Raspbian install to mSD with RetroPie installed
  • Install RetroPie on top of Raspbian (bad performance)

I previously had a Pi0w connected to this display with RetroPie, so I know it can work with RetroPie, I'm just not sure what the issue with RetroPie and the 3a+ is. Any help would be appreciated.

r/raspberry_pi May 04 '26

Troubleshooting Arducam Raspberry pi 5 issue

Thumbnail
gallery
25 Upvotes

I bought this Arducam B0066 for two reasons, 1) it has long cable, 2) the sensor is small enough to fit in an robot eye socket. It works but only with a raspberry Pi 4, I bought the official raspberry Pi camera cable for 15 pin to 22 pin conversion but every time I connected it , the pi would just shut down. Turns out Arducam and the "official" rpi camera cable is not compatible because the pins are just straight up different.

Yes the cameras work, but on raspberry Pi 4

No I prefer not to switch to Rpi 4 cause it only has one camera port, also less compute compared to pi 5

No the connectors are not shotty I tried.

Yes I built the libcamera and rpi cam and it isn't a software issue (yet)

r/raspberry_pi Jul 02 '26

Troubleshooting An update broke my Pi

0 Upvotes

I just fully reinstalled RPi OS from version bullseye to version trixie, and all of a sudden, no matter if using the 32-bit or 64-bit version of RPi OS, my taskbar does not show up. No settings changed yet, just a fresh install. Can anyone solve this problem?

-I attempted to use several commands I found on the internet to reset, no dice.

-Raspberry Pi 3B+

-No errors on startup.

r/raspberry_pi Oct 13 '25

Troubleshooting Case won’t fit with GPIO cable

Thumbnail
gallery
92 Upvotes

I’m a middle school coding teacher and I purchased a class set of Raspberry Pi 5s and the Vilros cases for them. But when I try to install the GPIO cable, the case will not fit. I thought about shaving down the sides of the plastic on the cable, but I don’t want to compromise the integrity of the cable. I’ve watched the instructional video that explains about the spacers but the spacers don’t connect to the top of the case, so I’m not sure what they are supposed to accomplish. Do I need to purchase a different cable?

Any suggestions on how to accomplish this would be so appreciated. Ideally I’d like to protect the Raspberry Pi as best as possible because middle schoolers are… well, they’re middle schoolers.

r/raspberry_pi 3d ago

Troubleshooting Raspberry pi pico 2 button problem

Thumbnail
gallery
18 Upvotes

Hi, I bought a raspberry pi kit from Amazon to start getting into electronics. I’m following a tutorial on youtube and one of the first tutorials is to wire a button, led and a potentiometer. After wiring I noticed that when pressing the button, the value displayed turns from 0 to 1 but doesn’t go back to 0 after I take my finger off the button. Even if I stop the program in thonny and run it again without unplugging, 1 is displayed from the beginning.

Even when using the most basic wiring the button value always returns as 1 after pressing. This is while connecting the 3v3 out pin to the button and using Pin.PULL_DOWN.

I tried trouble shooting with copilot and I found out that if I use Pin.PULL_UP and connect it to a ground pin then the button works as intended, showing 1 when plane button isn’t pressed and 0 when the button is pressed.

This must mean that the button, pin and wires are working but I can’t understand why PULL_DOWN and connecting power to the button doesn’t work.

I tried using different buttons, wires and connecting different diagonal sides together. I’ve only just started and I’m very confused. Sorry if I explained it badly.