SAN FRANCISCO — San Franciscans surprised by the honest-to-goodness summer weather that showed up this weekend finally had a chance to zip up their hoodies on the second night of the Outside Lands Music & Arts Festival. But headliner Dave Matthews gave the crowd plenty of reasons to wiggle the chills away during his two-and-a-half-hour set.

Matthews and his eponymous band played with the precision that comes from knowing how their bandmates work, which produced some impressive jams and awe-inspiring solos. Matthews provided a dose of early-millennial nostalgia with a set that focused heavily on favorites like "Jimi Thing" and "Ants Marching." Along the way, Fergie and Apl.de.Ap from the Black Eyed Peas showed up to inspire Matthews to take his goofy dancing to another level. Then, pedal-steel specialist Robert Randolph slipped in during the encore to end the set with two covers Matthews always keeps in his back pocket: Bob Dylan's "All Along the Watchtower" and Sly and the Family Stone's "Thank You (Falettinme Be Mice Elf Agin)," the latter of which featured singing and beat-boxing by Randolph.

But back at the top of the afternoon, on the Twin Peaks stage at the opposite end of the festival grounds, Street Sweeper Social Club brought an entirely different brand of grooviness and some of the weekend's few true aggro moments. Conceived by Rage Against the Machine guitarist Tom Morello and fronted by the Coup's Boots Riley (who continuously reminded the crowd that Street Sweeper Social Club is "more than a band, we're a social club"), the group played songs from its self-titled debut plus well-received covers of M.I.A.'s "Paper Planes" and LL Cool J's "Mama Said Knock You Out," both of which kept the pit churning.

On the way back to the main stage, the Barbary — which took place inside a tent filled with oak-framed mirrors and stained glass — offered some mid-afternoon comedy from past and present locals Sherry Sirof, Brent Weinbach and Kevin Camia, all of whom managed to offend all of the people some of the time and some of the people all of the time with tales of anatomy, sexual preference and 99-cent stores.

Raphael Saadiq didn't drop any comedy into his funky set, though he did go into a long monologue about growing up in nearby Oakland and listening to Al Green for inspiration. Saadiq and his band wore matching black suits as though they were going to hit the blackjack tables immediately following the show, and he treated the afternoon like a hot '60s R&B revue. Working the stage like a deranged bandleader, Saadiq called upon the early afternoon crowd to sway and bounce along with his old-school soul jams.

It wasn't all about the love, though, as he detoured into a cover of the Stooges "Search and Destroy," lending Iggy Pop's snarl a bit of gospel heft. He closed out the show by bringing on his first-ever choir director, who inspired him to sing as a child. With a scratchy, bluesy delivery, he backed up what Tom Jones had established on Friday night: Sometimes a little experience goes a long way.

As the middle player on Saturday's main stage, Jason Mraz was reminiscent of Jimmy Buffett as he took his hour-long set right down the middle, playing laid-back pop, reggae, disco-funk and everything else that makes sense on a warm afternoon in the park. It certainly didn't have much in common with the otherworldly weirdness going on at the nearby Sutro Stage, where the re-formed Os Mutantes played to a noticeably sparse audience. Apparently the Brazilian psych-rock pioneers — who got back together a few years ago after splitting in the late '70s — didn't get the memo about what the Hacky Sack crowd would be interested in hearing. But like many of the weekend's stalwarts, Os Mutantes stuck to their guns and played their hearts out, which paid off in the end, when leader Sérgio Dias blurted out, "That was amazing!" at his own band's performance.

Sporting a beard that complements the music he's making these days, Conor Oberst and his Mystic Valley Band closed down the Sutro Stage with songs that are more down-home than downtrodden. One highlight of the set was when he brought out Jenny Lewis to perform Rilo Kiley's "Portions for Foxes," though Oberst outdid himself in the end with a beautiful rendition of the sparse and gorgeous "Milk Thistle."

Back on the main stage, the Black Eyed Peas provided the day's first real communal moment with their truckload of radio hits, and calling San Francisco their "home away from home" earned the band even more points with the local crowd (though Fergie should know better than to call it "Frisco"). The world didn't become a better place during the hour-long show, though it came closer than usual. There's something about "I Gotta Feeling" that makes the promise that "Tonight's gonna be a good night" easy to believe, and the band wisely closed their set with it. That gave way for Matthews, giving the 50,000 strong in Golden Gate Park a jubilant one-two punch that sent them home euphoric.