Dual Monitor Configuration changes to "Mirrored" automatically

I was having the very same problem, not just with 12.04 but with previous versions as well as mint, xubuntu and others.

I got so fed up I switched over to arch for the last 8 months or so, but when they switched over to systemd I had all sorts of problems and installed ubuntu again.

Problems started again. This time I noticed that if it was going to happen it would normally be soon after boot up. then I would reset it and it would be fine for the rest of the day.

Putting two and two together I had a look in cron.daily and ran each cron job separately. The apt job would crash X every time. There is also a apt-xapian-index job in cron.weekly that has the same effect.

So I just disabled the jobs (chmod -x) and the problems have stopped. Inside both of these scripts is a check to see if you are on ac power. If I run this X crashes, so I think the culprit is the on_ac_power command.

To see if you have the same problem open a shell and type on_ac_power. If you get a crash then you have the same problem as me.

Hopefully this will fix the issue for some people


I played a bit with xrandr, the monitors.xml and so on but i couldn't solve the problem. Now I've made a bash-script with xrandr commandscommands, that brings the recommended configuration back, and assigned it with a shortcut. So, i think, i can live with that issue. Thanks for your attention and greets from Austria!