Acer 5830g no sound on speaker but headphones works.

Its important that you unplug the headphone before you try to use the speaker. It does not matter if the headphone is plugged in when you run the script. But it does matter if the headphone is plugged in when you try to use the speaker. openSUSE is designed to automatically mute the speaker when the headphone is plugged in.

Please confirm that when you were testing to see if your speakers worked that you did not have your headphones plugged in. If you did have your headphones plugged in at the same time you were trying to get your speakers to work, that would have invalidated every test I tried to have you run.

I assume you should be able to do that with the program alsamixer. It should be a setting on one of the alsamixer controls. I do not have your laptop hence I can’t give you precise detail on that.
.