I have always used C-g (ie keyboard-quit) to break out of commands like M-x and C-x C-f.
At some point not too long ago this stopped working.
All that happens is that Quit flashes in the minibuffer but I still have the previous command waiting for input there.
I now have to do Esc Esc Esc (keyboard-escape-quit) or C-] (abort-recursive-edit) to break out of these minibuffer command.
Has the way keyboard-quit works changed?
Or was C-g bound to a different function in past versions?
It happens even when I start with emacs -Q so it should not be a problem of my configuration.
I am using graphical emacs-25.1.1 on Ubuntu-MATE 17.04.
update
I have found that C-g still works as expected when running emacs in the console, ie emacs -nw using the same emacs-25.1.1 executable as below that does not work in graphical mode.
Furthermore C-h k C-g brings up help for keyboard-quit in the console but causes a Quit message to appear in the minibuffer (without breaking out of the C-h kcommand) in graphical mode. However, C-h f keyboard-quit brings up the the help page which does say that it is bound to C-g