Sound gone

Hardware: Mac Pro 2012. My OS is High Sierra 12.6. I use KM version 8.2.4.

I ran a macro that contained "Set System Output Volume to 17%" After that, I lost all sound. Changing Sound preferences didn't help. Switching to Internal Speakers did not help. Using Applescript and the System Events application to change volume didn't help. A Shut Down and boot up didn't help. A Shut Down with reset PRAM didn't help. I booted from my clone drive, and THAT didn't fix the problem. I booted from an older drive with El Capitan, and that didn't help, though I did get the normal startup chime. I booted from a recovery drive, but got no sound. I reset the system management controller, and (not surprisingly) that didn't help. I booted into my normal startup disk. Now, internal speaker sounds worked, but line out did not. I used TinkerTool System and removed operating system caches and the driver cache. I still cannot get line out sound.

I've used Macs for 35 years, and I have never encountered such a bizarre problem. Sound works (partly) while running. The startup chime worked once. Therefore, the sound hardware works. The problem can't be system software, because other systems have the same sound problem. The problem most likely is due to some piece of software kept in the machine. Any ideas on how to fix it?

Hi, sorry to hear about your problem.

This is just a thought: is it possible that the macro you ran is being triggered continuously, so that it is constantly setting your volume very low? If it were me, I would completely disable the macro in question just to see if that's it.

Apologies in advance if my suggestion doesn't help. Good luck!

Yay! I learned a troubleshooting lesson: if hardware is involved, never assume it's OK even if it was working a minute ago.

The macro was incomplete. I triggered it manually. I tried another 'repair' attempt. I unplugged my line out cord, shut down, started up, and plugged in the cord. The line out now works. I didn't see any corrosion, so I assume there was some dust in the jack. (I blew it out in case some remained.) Could a problem with the line out connection screw up internal speaker sound? It doesn't seem likely. Still, it appears that this sound problem was a coincidence of a line out hardware problem occurring just after the use of the macro. Keystroke Maestro gets no blame.

That’s a lesson for us all!

Thanks for posting the solution.
I hope you don't mind, I did a minor edit of your post to put the solution at the top, so it will so up in the "solved" quote in your OP.