CHICAGO — Lucas Giolito was erratic and inconsistent.
He was also a winner.
Giolito labored his way into the sixth inning, Matt Davidson hit a tiebreaking sacrifice fly and the Chicago White Sox salvaged the finale of their weekend series against the crosstown Cubs with a 5-3 win on Sunday.
"'Grind' is the key word. Obviously not really in sync," Giolito said. "But just trying to make pitches to the best I can."
The 23-year-old right-hander matched a career high with seven walks, tossed three wild pitches and hit a batter, but pitched two-hit ball for 5 2/3 innings in his first victory since April 26. He allowed three runs and struck out three while lowering his ERA to 6.91 for the year.
It was the continuation of a season-long struggle for Giolito (2-4), who came over in the December 2016 trade that sent Adam Eaton to Washington. Only this time, he found a way to keep the White Sox in the game after a shaky start.
"That does show you a quality of an individual, knowing that they don't have their best stuff, but they're able to grind through and get hitters and do what they need to in order to get through a particular ballgame," manager Rick Renteria said.
The White Sox (10-27) stopped a seven-game slide and became the last major league team to reach 10 wins. Davidson also homered in the second, and Bruce Rondon finished a nearly perfect relief performance for his first save.
Javier Baez drove in two more runs for the Cubs (21-16), who had won five in a row. Kyle Hendricks (3-3) surrendered four runs, three earned, and six hits in six innings on a cool day at Wrigley Field.
"It was better than my last start. My fastball command was better and a good changeup ," Hendricks said. "A couple of bad pitches today and they got hit."
Willson Contreras' throwing error on the catcher's 26th birthday set up Yolmer Sanchez's tying RBI single in the third, but the Cubs regained the lead on Ian Happ's RBI double off the wall in right-center in the fourth.
Happ's hit put runners on second and third with no outs, but Addison Russell was caught off third on Hendricks' bouncer to third and Ben Zobrist grounded into an inning-ending double play.
"It was a bad read," Russell said. "I was over-aggressive. I just wanted to score."
That blown opportunity proved costly when the White Sox rallied for two in the sixth. Jose Abreu singled with one out and scampered home on Nicky Delmonico's triple to right-center. Davidson drove Hendricks' next pitch to the warning track in center , providing plenty of time for Delmonico to tag up for a 4-3 lead.
The South Siders added an insurance run on Leury Garcia's RBI single in the seventh, and the Cubs were unable to rally after scoring 19 times in the first two games of the series. Jace Fry, Nate Jones and Joakim Soria and Rondon combined to retire 10 of the last 11 batters.
Pinch-hitter Tommy La Stella singled with two out in the ninth, but Zobrist flied out to center to end the game.