Hi Frederic,

thanks for the report, and sorry for the long delay.

Some background on how Alt-Tab works in Cinnamon, because it explains what
could be going on. Unlike most window managers, the Cinnamon app switcher does
not use the window manager's own MRU (most recently used) list. It takes the
list of windows in stacking order and re-sorts it by each window's
_NET_WM_USER_TIME property (js/ui/appSwitcher/appSwitcher.js). That property is only partly under the window manager's control: applications set it themselves, and a client sending a bad timestamp can end up with a window that stays pinned at the top of the order for the rest of the session. That would match "the order
becomes random after a few hours of uptime".

Hyper-Threading, on the other hand, is unlikely to be the real variable here: the ordering is a plain single-threaded computation in Cinnamon, and it does not
depend on the number of logical CPUs. What changing that BIOS setting does
require is a reboot, and a reboot is what clears the accumulated timestamps.

Do you still see this, and would you be willing to help debug it? If so, these
three things would tell us what is going on:

1. Does the problem also go away if you just restart the session (log out and    log back in), or restart Cinnamon (Ctrl+Alt+Escape), without touching the
   BIOS setting? This is the key test to tell a reboot apart from Hyper-
   Threading.

2. The output of:

       grep "comparison timestamp" ~/.xsession-errors

   Lines like "last_user_time (...) is greater than comparison timestamp (...)"
   would confirm that some application is sending bad timestamps.

3. While the problem is happening, please open Looking Glass (Alt+F2, then type    "lg"), go to the "Evaluator" tab and run these two lines, then send us both
   outputs:

       global.get_window_actors().map(a => a.get_meta_window()).map(w => w.get_wm_class() + " | " + w.get_title() + " | " + w.get_user_time() + " | min=" + w.minimized).join("\n")

       global.display.get_tab_list(imports.gi.Meta.TabList.NORMAL, global.workspace_manager.get_active_workspace()).map(w => w.get_wm_class() + " | " + w.get_title()).join("\n")

   The first one is the order Alt-Tab uses, the second one is the window
   manager's real MRU order. If the second is correct and the first is not, the
   diagnosis above is confirmed.

One more thing worth knowing: there is no upstream report about this. The few
related upstream issues ask for the opposite behaviour, that is, a static
Alt-Tab order instead of the most-recently-used one ([1], [2], the latter closed
by a stale bot without a resolution). So a precise, reproducible description
from you is what it would take to get this looked at upstream.

Thanks,

[1] https://github.com/linuxmint/cinnamon/issues/8758
[2] https://github.com/linuxmint/cinnamon/issues/9410

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to