Magnets do no work. You can't get energy out of them for free. Same for gravity. It's gravitational potential - as you reduce your potential energy above the Earth, your kinetic increases at the same rate - you're not gaining any energy in a gravitational field.
Solar power isn't 'free' energy in the physical sense - sure, you don't have to pay for it, but the Sun is still doing the work to produce it. 'Free energy' in the physical sense is getting energy from nothing, like 'vacuum energy' or something - getting energy out of a system but not using up materials in the process.
Solar energy is not perpetual - the Sun is burning hydrogen to make it, and it won't last forever, just another 5 billion years or so. There are no magnet-powered perpetual motion machines that work, nor gravity powered.
If you want to demonstrate your magnet/gravity powered machines, go ahead - but check up on 'perpetual' motion machines first; there are hundreds of varieties people have tried to make on the same ideas. Bottom line - you can't get energy out of a gravitational field, or a magnetic one.
But build one and see for yourself. If it works, take it to a local university and ask a physicist to look at it for you.
physics grad student