As next week’s midterm elections approach, Americans are in a dark mood. The latest Washington Post-ABC News poll, released Tuesday, reports that 68 percent of likely voters think that the country is “on the wrong track”; a CNN-ORC International poll that came out the same day says 68 percent are angry “about the way things are going in the country today.”

What, exactly, is the problem? In one sense, the public’s gloom is puzzling: Although the U.S. financial sector is far from healed and wages have been stagnant, the economy has been growing gradually for four years and is doing considerably better than Europe’s or Japan’s. The unemployment rate is 5.9 percent, down from a peak of 10 percent four years ago. Gas prices are at a four-year low. From the Islamic State to Ebola, the United States faces dangerous and difficult-to-manage threats to public safety, but this is nothing new, at least not since Sept. 11, 2001.

The roots of this election season’s discontent seem to lie not so much in the ebb and flow of events but instead in a spreading sense that national political institutions, beset with partisanship, no longer work well. In the Post-ABC poll, 60 percent said they do not trust Washington to do what is right. Some 53 percent say the federal government’s ability to deal with problems has gotten worse. In the CNN-ORC International poll, 74 percent of respondents said they were dissatisfied with the way the nation is being governed. These results, too, must be treated skeptically; voters blame politicians for gridlock but seldom acknowledge that elected representatives usually follow the wishes of their constituency.

For all that, more and more voters seem to be realizing that the country has a number of pent-up difficulties — from the inefficient tax system to the near-bankrupt U.S. Postal Service — that can’t be addressed without legislative compromise. An important Wall Street Journal-NBC News poll released Oct. 15 found that voters favor, by a margin of 50 percent to 42 percent, a hypothetical candidate who is willing to compromise over an opponent who sticks to positions at the expense of passing legislation. This represents a 31-point swing since 2010, the heyday of the Tea Party, when the same poll found voters disfavoring a pro-compromise candidate by 57 percent to 34 percent. Accordingly, candidates of both parties in this fall’s races are boasting of their willingness to work “across the aisle.”

We shall see.