You need to call "dbSync();" every frame or else the screen won't get updated and it will seem as if your program is "Stalling" until it gets called again, thats why its good to place it always at the end of your gdk loop. (that may be your issue)
Also, try setting the frame rate to one value at the beginning of your program and leave it be for the duration (just my opinion on things)
If you say you switch off sync before your fade procedure and switch it back on after, everything that happens during the fade procedure wont get displayed on the screen, rather what ever was on the screen before you switched off the sync would stay there until the sync got switched back on.