nomeata / arbtt

arbtt, the automatic rule-based time-tracker
http://arbtt.nomeata.de/
GNU General Public License v2.0
318 stars 36 forks source link

arbtt-capture.desktop[PID]: Xlib: extension "MIT-SCREEN-SAVER" missing on display ":0". #153

Open Ileca opened 2 years ago

Ileca commented 2 years ago

My journal gets spammed with that entry every 30 secondes (time I set the sample rate). Kinda drive me crazy.

nomeata commented 2 years ago

I don’t have that. Are you using wayland? Or is anything possibly ~odd~ different about your setup? What’s your distribution and desktop system?

Ileca commented 2 years ago

Oh yeah, sorry, I forgot to add basic information.

Ubuntu 21.10 Gnome 40.4.0 Wayland arbtt 0.10.2-0.2build1.1 from APT

Yes, Wayland. Wayland tends to break a lot of things.

nomeata commented 2 years ago

Ok, thanks. I guess someone (you?) can try to find out if there is a way to probe extensions before using them that does not print the warning.

Ileca commented 2 years ago

Sorry, I am just a beggar with no programming skill other than web related stuff. I don't even understand what's a screensaver thing is doing here. I found an funny bit while searching, from what appears to be xscreensaver's manpage:

The MIT-SCREEN-SAVER extension is junk. Don't use it. [...] It sure would be nice if someone would implement the SGI SCREEN_SAVER extension in XFree86; it's dead simple, and works far better than the overengineered and broken MIT-SCREEN-SAVER extension.

nomeata commented 2 years ago

Heh, the author of xscreensaver tends to have very explicit opinions about many things (not necessarily a bad thing).

arbtt uses this interface to find out how long the user has been idle.

Guess we'll have to wait until someone is itched by this enough to scratch it.

As a work around you could wrap arbtt-capture in a shell script with | grep -v MIT-SCREEN-SAVER to filter out these messages.

Does it otherwise work fine with Wayland?

Ileca commented 2 years ago

No, the log keeps getting corrupted like in https://github.com/nomeata/arbtt/issues/148#issuecomment-1033001806. I get a ton of

Failed to read value at position 1461465: Unsupported TimeLogEntry version tag 0 CallStack (from HasCallStack): error, called at src/Data.hs:90:15 in main:Data

I have to use arbtt-recover for it to work again. I log my game times so I rarely check arbtt and let it runs in the background like it doesn't exist. I must have checked twice and it was corrupted. It's a minor hindrance in the end. No idea why it does that. I thought, maybe this is related to this MIT-SCREEN-SAVER thing.

nomeata commented 2 years ago

No, these corruptions occur if it couldn't finish writing the log, I believe, and are not related to Wayland (I think). Youthful sin of mine… but the recovery process should give you back almost all data just fine.

bukajsytlos commented 1 year ago

so on wayland arbtt cannot capture idle time?

nomeata commented 1 year ago

I have so far ignored wayland (and reading blog posts like https://anarc.at/software/desktop/wayland/ sounds like I better still wait for a few years until it is a seamless transition), so I am not sure. But maybe someone who knows wayland can contribute patches?

bukajsytlos commented 1 year ago

so far so good

15:19 - 3 min(s) - IDLE
15:22 - 6 min(s) - arbtt-capture.desktop[PID]: Xlib: extension "MIT-SCREEN-SAVER" missing on display ":0". · Issue #153 · nomeata/arbtt  Mozilla Firefox
15:28 - 35 min(s) - IDLE
anarcat commented 10 months ago

I have so far ignored wayland (and reading blog posts like https://anarc.at/software/desktop/wayland/ sounds like I better still wait for a few years until it is a seamless transition), so I am not sure

author here: kind of sorry my post comes out that way! switching to wayland is not only worth it, it's kind of become mandatory. i explain "why switch" at the top of the article, and i was hoping that would be sufficient to convert people over, but it seems like my convoluted setup scared the living hell out of anyone who reads that piece. :p

point is: i did it, it's done, and it works. before i migrated to wayland, xorg would just crash randomly, so it's a huge win for me, and i encourage you to give it a shot. :)

nomeata commented 10 months ago

Thanks and sorry for the misrepresentation!

nomeata commented 10 months ago

so far so good

15:19 - 3 min(s) - IDLE
15:22 - 6 min(s) - arbtt-capture.desktop[PID]: Xlib: extension "MIT-SCREEN-SAVER" missing on display ":0". · Issue #153 · nomeata/arbtt  Mozilla Firefox
15:28 - 35 min(s) - IDLE

Are you saying that arbtt works fine on Wayland out of the box?

anarcat commented 10 months ago

Thanks and sorry for the misrepresentation!

hey don't worry about it :) i'm quite rant-y on good day, so it's normal it transpires as "wayland is crap" :)

bukajsytlos commented 10 months ago

so far so good

15:19 - 3 min(s) - IDLE
15:22 - 6 min(s) - arbtt-capture.desktop[PID]: Xlib: extension "MIT-SCREEN-SAVER" missing on display ":0". · Issue #153 · nomeata/arbtt  Mozilla Firefox
15:28 - 35 min(s) - IDLE

Are you saying that arbtt works fine on Wayland out of the box?

for over half year, I am using wayland and no problems so far

maralorn commented 8 months ago

My impression is that the capturing only reports Xwayland windows. At least that is how it works on my system.

bukajsytlos commented 8 months ago

you are right :(

cloutierjo commented 6 months ago

As wayland become the default on many distribution, is their any plan to make it work? currently I see only specific desktop environment solution, and unfortunately none yet for KDE that I use

nomeata commented 6 months ago

No immediate plans yet. I'm not sure if we even have the necessary libraries for Haskell yet? Happy to help anyone who wants to tackle that task!

martinvonwittich commented 4 months ago

A possible workaround: https://github.com/tmiasko/arbtt-capture

This is a gnome shell extension that records which windows are open, which one has focus, and time since your last action. This information is by default stored in ~/.arbtt/capture.log using format compatible with automatic, rule-based time tracker - arbtt.

It supports both X11 and Wayland. In fact, the compatibility with Wayland is the only reason it exists. Otherwise it does not posses compelling advantages over the original arbtt-capture.

EDIT: just noticed it's been unmaintained for 5 years, and therefore of course isn't compatible to current GNOME shell versions :/