It's a known bug that affects UBoats and Fleetboats and patch v15, for me it happens when I pause and Alt-Tab out of the game for an extended period of time.
Some say you can just click the CO2 notification which surfaces you and it fixes it, that doesn't work for me and others tho. I usually crash dive, save the same submerged, exit to the main menu, and reload that save, and when I surface the CO2 goes away like it should.
http://www.subsim.com/radioroom/showthread.php?t=133307
earlier thread:
http://www.subsim.com/radioroom/showthread.php?t=132471