Chicago had lost three out of four heading into the all-star break, but came up with 12 hits to maintain its 1 1/2-game lead over Minnesota in the American League Central.
After suffering through a big inning at the start of the game, the Royals clawed back within 7-4 in the sixth on a three-run homer by Billy Butler.
The White Sox, however, regained some breathing room with two runs in the bottom of the inning when Nick Swisher drew a bases-loaded walk and Joe Crede came through with a sacrifice fly.
Mark Buehrle (7-8) gave up three runs on four hits through seven innings to get the victory. He had lost his two previous decisions.
The loss went to Zack Greinke (7-6), who was removed after three innings after being roughed up for seven runs on 11 hits.
Chicago put its first eight batters on base in the first inning. In addition to Dye's two-run single, the Sox got RBI singles from Jim Thome, Paul Konerko, Swisher and Crede in the first.