And so... considering information that was mentioned by previous posters, I did some investigation. First of I do not use any DM, I'm also big antifan of various useless deamons like gconf and dconf, and even before posting here I disabled them. I also do not run IBus. So that basically left me with very little files. So I used inotify on /etc/default/keyboard, and lo and behold something reads it, with no reason. Though getting the process that does that was a bit more difficult as inotify does not provide such information. I found that I can do this with auditd, so I setup fs audit:
auditctl -w /etc/default/keyboard -p war -k culprit And after significant waiting [almost a day, I do not turn my machine off] (strangely moments before resets happened like once every 2-5 minutes, like 10 times in a row), I get keyboard reset, inotify reports file access, and here is what audit shows: # ausearch -f /etc/default/keyboard time->Thu Dec 4 09:16:47 2014 type=PATH msg=audit(1417677407.634:1120389): item=0 name="/etc/default/keyboard" inode=524629 dev=08:06 mode=0100664 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL type=CWD msg=audit(1417677407.634:1120389): cwd="/" type=SYSCALL msg=audit(1417677407.634:1120389): arch=c000003e syscall=2 success=yes exit=5 a0=7ffff3668ff0 a1=80000 a2=1b6 a3=0 items=1 ppid=9235 pid=8863 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="systemd-udevd" exe="/lib/systemd/systemd-udevd" key="culprit" Now all I can say is that I suspected that something like that will be responsible for this. For a very long time now I have very hard time saying anything positive about systemd, this does not make it better. Considering that this is /dev related I'm pretty sure I can not simply nuke it without some unpeasant consequences. In any case, we now know what is causing it (well at least process-wise). Anyone has any suggestions how to work around this? And if fix can be expected? -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to gnome-settings-daemon in Ubuntu. https://bugs.launchpad.net/bugs/1246272 Title: Keyboard layout changing randomly Status in gnome-settings-daemon package in Ubuntu: Confirmed Status in unity-settings-daemon package in Ubuntu: Confirmed Bug description: Just upgraded from 12.04 (raring) to 12.10 (saucy) and keyboard layout keeps changing from pt_br to what I think is en_us. It seems random so I don't know what trigger this, but sometimes just alt-tabbing is enough to mess with keyboard layout in one of the windows. I already removed the en_us from my keyboard sources, double checked the use of one source for all windows, and even removed accelerators to switch between layouts but none have worked. ProblemType: Bug DistroRelease: Ubuntu 13.10 Package: gnome-control-center 1:3.6.3-0ubuntu44 ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3 Uname: Linux 3.11.0-12-generic x86_64 ApportVersion: 2.12.5-0ubuntu2 Architecture: amd64 Date: Wed Oct 30 09:12:48 2013 ExecutablePath: /usr/bin/gnome-control-center InstallationDate: Installed on 2013-05-20 (163 days ago) InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424) MarkForUpload: True SourcePackage: gnome-control-center UpgradeStatus: Upgraded to saucy on 2013-10-22 (8 days ago) usr_lib_gnome-control-center: activity-log-manager 0.9.7-0ubuntu4 deja-dup 27.3.1-0ubuntu1 gnome-control-center-datetime 13.10.0+13.10.20131016.2-0ubuntu1 gnome-control-center-signon 0.1.7~+13.10.20130724.1-0ubuntu1 gnome-control-center-unity 1.3+13.10.20131004-0ubuntu1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1246272/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp