How long might it take for officials to notice that something was wrong?
Several years. They would notice that the female to male ratio is going down and would wonder why, but for this to be noticeable it would need to affect at least 2-3% of population. Someone would start suspecting, and looking for, female infanticide. When this does not pan out, they'd start looking for some causes, investigating whether the phenomenon is local or not; there are chemical pollutants that mimic hormone activity and could be the cause of this.
But very soon someone would run a sperm check, the same kind of test that's done to increase the likelihood of male offspring. Or someone with the mutation might ask for female offspring - selecting gametes with X chromosome. And the technicians would scratch their heads and say "Sorry sir, you haven't any" and rush to publish their finding.
Under what circumstances would this be declared a problem by the government, such that it might act to stop further procreation?
Probably not for a long time. The government would declare it a problem, and surely screenings would be made available for those who wanted, but what would be the point of stopping procreation? Male children have traditionally been preferred in many countries, so this might not even be seen as a problem by many, and could be regarded as a blessing for some.
On the other hand, from some simplistic simulations I've run, without a working test and some degree of enforcing, either by social pressure or governmental fiat, the population appears to be doomed.
What cultural or sociological conditions would increase or decrease the likelihood of detection?
Possibly if the country already had a male/female imbalance due to a policy such as "only one child for family", combined with a traditional preference for male offspring that had resulted in the disappearing of female fetuses (or even newborns). Then, a mutation that has the same effect would be hidden for longer (one more generation - twenty years? Twenty-five?). But even there, there would be someone wanting females - for example, to join two families - and the truth would emerge.
For the same reason, any sort of detailed sperm check for whatever reason would reveal that some guy has no X spermatozoa. Further tests would immediately follow. So any advanced society where genetic screenings are performed (to, say, reduce the risk of conceiving children with genetic syndromes) would see the game discovered in a matter of days once an affected individual entered in the tested pool.
Mandatory genetic testing against genetic diseases for everyone would trigger discovery as soon as the first affected individual decided to have children - say some twenty to forty years after the mutation took place at his conception.
Is there any plausible scenario in which the result would be catastrophic population collapse in a region or worse?
Yes. At first, in absence of tests, the mutation will spread more or less linearly at each generation (assuming the generation size remains constant), and all scenarios lead to extinction:
48.10% F, 51.60% M, 0.30% X // Linear growth
48.37% F, 50.87% M, 0.76% X
47.78% F, 50.50% M, 1.72% X
48.28% F, 48.80% M, 2.92% X
45.81% F, 48.76% M, 5.43% X
42.63% F, 48.39% M, 8.98% X
42.25% F, 41.55% M, 16.20% X
36.71% F, 35.84% M, 27.45% X // Curve starts to flex
28.99% F, 27.42% M, 43.59% X
19.90% F, 20.39% M, 59.71% X
13.83% F, 13.33% M, 72.84% X
7.84% F, 9.13% M, 83.04% X
4.38% F, 4.97% M, 90.65% X
3.09% F, 2.13% M, 94.78% X
1.76% F, 1.27% M, 96.97% X
0.30% F, 0.30% M, 99.40% X
0.20% F, 0.20% M, 99.60% X
0.00% F, 0.00% M, 100.00% X
But if we introduce a testing when females are 10% of the population (pretty late if you ask me), which decreases the chances of a fertile "YY" mating to 10% of normal (this takes into account testing errors and people marrying knowing the consequences and having children nonetheless):
14.86% F, 14.78% M, 70.35% X
6.91% F, 8.33% M, 84.75% X : X < 10%, introducing tests
25.64% F, 23.78% M, 50.59% X // Ratio immediately drops
40.08% F, 41.41% M, 18.51% X
49.37% F, 45.63% M, 5.00% X
50.80% F, 48.31% M, 0.88% X // Decrease becomes 1:10
52.61% F, 47.31% M, 0.08% X
48.20% F, 51.80% M, 0.00% X
Mutation dies out
Other scenarios see a maximum of two children per couple, and since a viable couple needs one female, the population declines rapidly:
49.80% F, 50.10% M, 0.10% X, population 100%
48.80% F, 50.80% M, 0.40% X, population 99%
48.87% F, 50.31% M, 0.82% X, population 97%
52.00% F, 46.32% M, 1.68% X, population 95%
48.68% F, 47.17% M, 4.15% X, population 98%
49.38% F, 44.28% M, 6.34% X, population 96%
40.53% F, 44.63% M, 14.84% X, population 95%
37.27% F, 38.44% M, 24.29% X, population 77%
32.23% F, 28.05% M, 39.72% X, population 57%
24.32% F, 23.24% M, 52.43% X, population 37%
35.56% F, 40.56% M, 23.89% X, population 18%
49.22% F, 46.88% M, 3.91% X, population 12%
54.76% F, 45.24% M, 0.00% X, population 12%
Mutation dies out
If, in addition to tests, a third child is encouraged:
Introducing tests, maxc=3
42.69% F, 36.26% M, 21.05% X, population 17%
49.77% F, 44.75% M, 5.48% X, population 21%
49.85% F, 48.62% M, 1.53% X, population 32%
54.19% F, 45.81% M, 0.00% X, population 48%
Mutation dies out
With a testing of 50% efficacy and a policy of allowing a third child only when population is below threshold, 2 otherwise, the population stabilizes around a 6% of mutations, oscillating between 90% and 130% of threshold.
Of course, real world conditions - people ignoring the tests and/or shirking the children limitations and/or not having all the children they can - may shift these results considerably.