For the MiG-23, it was manual.
[The] MiG-23 had a completely manual wing sweep control. But there was no gauge to indicate optimum wing position for the surrounding conditions. "You had to manually put the wings into position to safely fly the airplane," (...) "They had a very nice gauge that showed where the wings were commanded to, where the wings actually were if they were still in motion, and what the Mach limit was associated with that wingsweep position."
— Red Eagles: America’s Secret MiGs p.176
From Wikipedia we learn the sweep steps were 16°, 45°, and 72° – for one of the variants at least – which makes it easy to find that gauge. Here it is magnified below with the limiting Mach number (M2.35) and Velocity (1400 km/h indicated; 756 KIAS) for the current selected max sweep of 72°.
It started as a two-position wing, then it was upgraded1 so that the wing can stop anywhere between 30° and 63°. This improved the flight range.
Below, КРЫЛО means wing. And ОТКЛ means off, or deactivate (ОТКЛЮЧИТЬ). This leads me to conclude it too was manual despite the advanced avionics the Su-17 family carried.
(primeportal.net) The wing control switch and position indicator are on the left glareshield.