Lincecum suffered his first loss of the season, suffering a brief lapse while the Padres were scoring both their runs in the third inning.
Cashner (1-1) threw a wild pitch in the first that allowed Angel Pagan to score the Giants' only run and he then shut down San Francisco on five hits with five strikeouts over six innings.
The next three San Diego pitchers combined for two perfect innings and Huston Street managed to collect his fourth save despite putting two runners on with two away in the ninth.
The Padres delivered four singles in the third inning, with the RBI hits coming from Carlos Quentin and Yonder Alonso.
Lincecum (2-1) gave up six hits overall and struck out nine in a seven-inning performance.