mholgatem / GPIOnext

The next evolution of GPioneer! Create virtual gamepads with your GPIO pins!
MIT License
134 stars 37 forks source link

SPI screen freezes right before starting Emulation Station on Retropie #66

Closed viniciusbrit closed 2 years ago

viniciusbrit commented 2 years ago

If I connect an hdmi screen, I can see the console output before emulation station starts up. The screen happens to crash right after Samba is started. After Samba, GPIOnext stops and starts up again, I think this is what makes it crash.

I've had it working just find for a while now, I did a 'gpionext set pins [all pins except pin 32 (PWM0 GPIO12)]" in order to get pwm audio to work, I followed a previously closed issue. EDIT: The gamepad input also stops working along with the screen

I tried 'gpionext set pins default' after it started crashing and it fixed it. GPIOnext doesn't stop and start after Samba now.

What should I do to get both my screen and PWM audio to work?

viniciusbrit commented 2 years ago

This is stupid, I have no idea what's going on. I set "gpionext set pins default" then redid the "gpionext set pins [ALL EXCEPT GPIO12]" and now it worked, but the pwm audio did not work anymore. So I gave up and redid my entire setup from zero. After a clean install, i noticed my SPI screen which doesn't depend on GPIOnext in the slightest, instead using juj's fbcp-ili9341 driver, did not work without GPIOnext AT ALL. So after that, I made sure the input and screen worked... And gave up with the audio.

I honestly think this pi zero is cursed, nobody seems to know what to do and nobody on the internet seems to have encountered this issue with Retropie. I give up.

mholgatem commented 2 years ago

Hey, sorry that it took me so long to get back to you. I've been sick the last couple of days 🤢. It could be that your pi zero is cursed, in which case I suspect burning sage is a good way to go. But if in fact it is not cursed, it might work to try and set the pins once more.

I'm still a bit sick, so forgive me if you mentioned this, but did you try setting the pins to exclude the spi pins along with the audio pin? You'll want to exclude the following (all of these may not be necessary, but I haven't messed with an spi screen for some time and I'm writing this from bed.) Exclude: 19, 21, 23, 32 (possibly also 24 + 26 depending on your setup) You may want to rerun the config after doing that, just to make sure everything is kosher.

Anyway, let me know how it goes!

viniciusbrit commented 2 years ago

Tried that and nothing. Guess it's just cursed after all, maybe a defect on the BCM chip? Not sure. I'll just consider my project done without the PWM audio, HDMI audio still works, and everything else also works as intended, just not PWM audio... Thanks for the reply anyhow, hope you get well soon.