I hear you from someone who've been dealing with lighting problems since I've bought my truck. Switch worked initially, but strange behaviors pop up after putting it back to factory. But I know my problem is more functional than anything else. I had it working properly until I switched the in-line fuse to positive side (factory) from negative side.
What I would do from easiest to hardest:
1. Check battery.
2. Check alternator.
3. Using a DMM (digital multimeter) check continuity across last two fuses in fuse block in drivers side. Should be 10A each. Then check continuity from switch to lower end of fuse and check switch to top end of fuse.
4. Check voltages across low beams. On drivers side its red/yellow and red/blue wire. On passengers side its red/yellow and red/brown.
5. Turn engine on and check how much voltage drops.
6. Check voltage across high beams.
7. Check all grounds.
8. Check in-line fuse to battery.
If voltages are okay, I would replace bulbs first. If not, then:
9. Replace lighting relay above fuse block (black).
10. Combo switch. The lighting switch is located on the drivers side on the back of the combo switch. There are 4 (or 5?) copper strips which makes various contacts depending on if switch is in hi/low/pass. Do NOT take it off. Mine had built up grime between contacts. Take contact cleaner and spray and spray it again.
11. Check continuity between lighting switch and the gauge cluster (high beam indicator lamp). Make sure cluster has no broken contacts.
If problems still exist, you probably have a short somewhere. Clean all contacts with appropriate cleaner, check parking lights or all lights that comes on when beams are engaged and lastly check wire/wire bundle integrity.