Bug 101727 - Wayland Server Logger does NOT exist [lookalike Xorg server logger, integrated into server itself]!
Summary: Wayland Server Logger does NOT exist [lookalike Xorg server logger, integrate...
Status: RESOLVED NOTOURBUG
Alias: None
Product: Wayland
Classification: Unclassified
Component: wayland (show other bugs)
Version: 1.5.0
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-09 09:37 UTC by _nobody_
Modified: 2017-07-11 08:44 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
log captured with the command: journalctl --user -ab (52.08 KB, text/plain)
2017-07-10 12:35 UTC, _nobody_
Details

Description _nobody_ 2017-07-09 09:37:11 UTC
Let me start from Xorg as an architecture.

We see that in Xorg server space we have two processes working independently. We have Xorg server as one process (which also does logging built-in services), and we have aside second independent process which is Xorg compositor itself.

These two processes Xorg server and its compositor) communicate (probably) via D-bus, my best guess?!
_______

Let me now change the topic. Let me talk about Wayland clients, and Wayland server. Here, we have completely different situation, as my best understanding is. Talking about Wayland server architecture.

We have Wayland compositor integrated inside Wayland (let me pick Weston, as compositor). So, single process after all. And, we do NOT have logger, as we have it in Xorg server.

Major/critical question: why we don't have logging services/logger in Wayland server?

[1] Because the execution timing is tight?
[2] Real Time is compromised?
[3] You, Wayland developers, name it for me/us all?! 

In other words I am advocating for the logger (similar to one in Xorg server) to be created/designed and built-in inside Wayland server. 

Thank you,
_nobody_
Comment 1 Pekka Paalanen 2017-07-09 17:42:40 UTC
What do you mean by a "logger"?

What exactly in Xorg you call a "logger"? Where do you see it?
Comment 2 _nobody_ 2017-07-10 05:46:06 UTC
> What exactly in Xorg you call a "logger"? Where do you see it?

Here (excerpts from some previous discussions at fedoraforum.org):
https://cgit.freedesktop.org/xorg/xserver/tree/os/log.c
https://lists.x.org/archives/xorg-devel/2016-January/048398.html

Looking through the Makefile.am files it would appear that log.c is built into libos, which is statically included into Xorg. Hence, the X server simply uses its built in logging to write to the log file (the best guess).

Thank you,
_nobody_
Comment 3 Pekka Paalanen 2017-07-10 07:23:01 UTC
Ok, you mean just the normal log file writing. I do not understand why you explained (half incorrectly) about multiple processes and communication then.

Wayland is not code you could run, therefore it does not write logs.

libwayland has a log capture API: wl_log_set_handler_client() for clients and wl_log_set_handler_server() for servers.

Every display server has its own way of storing its log output.

Weston by default writes its log output to stderr, but you can use --log command line option to direct it to a file, if you do not want to use shell output redirection. See 'man weston'.

So, what exactly is missing that Xorg has?
Comment 4 _nobody_ 2017-07-10 10:28:17 UTC
> Ok, you mean just the normal log file writing. I do not understand why you
> explained (half incorrectly) about multiple processes and communication
> then.

What is the correct story? This is EXACTLY why I explained the story. To hear you to complain about me having here and there no clue. ;-)

> Wayland is not code you could run, therefore it does not write logs.

If you say so, you do know much better that me.

> libwayland has a log capture API: wl_log_set_handler_client() for clients
> and wl_log_set_handler_server() for servers.

This is ALL COOL. But I am one very average clueless user, and do not know how, as user of Fedora FC26 (for example) to switch these logs on?!

Do you know how to switch them on (that is the question)???

> Every display server has its own way of storing its log output.

Agree. 

> Weston by default writes its log output to stderr, but you can use --log
> command line option to direct it to a file, if you do not want to use
> shell output redirection. See 'man weston'.

I even did not know that Weston is running on its own (context). And I always thought that Weston is automatically invoked by Wayland. I even thought that Weston is somehow integrated/built-in in Wayland, which now I see, it is not. It is still separate process (if I correctly understood you), but for me invisible.

> So, what exactly is missing that Xorg has?

I guess, I was clear about where my ignorance is, wasn't I?!

_nobody_
Comment 5 Daniel Stone 2017-07-10 10:57:41 UTC
(In reply to _nobody_ from comment #4)
> > libwayland has a log capture API: wl_log_set_handler_client() for clients
> > and wl_log_set_handler_server() for servers.
> 
> This is ALL COOL. But I am one very average clueless user, and do not know
> how, as user of Fedora FC26 (for example) to switch these logs on?!
> 
> Do you know how to switch them on (that is the question)???

Assuming you're talking about the GNOME Wayland session, in Fedora 26 they are stored in the journal. Try 'journalctl --user -ab'.
Comment 6 Pekka Paalanen 2017-07-10 11:55:28 UTC
It sounds like your underlying issue is that you didn't find the display server logs. Had you asked "Where do I find the GNOME Wayland logs on Fedora 26?", it would have been much easier to answer.

I still wonder if even that is not your original problem, since you have not mentioned what you would expect to see in the logs. Every display server logs different things, in their own ways. You are welcome to continue that discussion elsewhere.

Anyway, it seems there is nothing to do here, so I'm closing this report.

Every distribution sets up the display server logging in its own way, be that display server Xorg, gnome-shell, kwin, weston, or something else. It could be a dedicated file, it could be in the systemd journal, it could be in the centralized system logs, or somewhere else.

Just like the HTTP specification is not responsible for where Apache or nginx write their logs, Wayland is not responsible for how Wayland-based display servers write their logs. The X11 specification does not dictate where Xorg writes its logs either.

It is not even libwayland's job to write log files, because every display server has its own way.
Comment 7 _nobody_ 2017-07-10 12:35:59 UTC
Created attachment 132583 [details]
log captured with the command: journalctl --user -ab

log created with the command: journalctl --user -ab using GNOME on Wayland
Comment 8 _nobody_ 2017-07-10 12:37:05 UTC
Hello Pekka,

Let us try to be little bit All Cool, should we?! I do not like to jump to conclusions too prematurely. And... We need to have here discussion/dialog, not mono-log, and after that one way conclusion. :-(

YES, I am using GNOME on Wayland (FC26) for the purpose of this bugzilla.

Here is what I did, as per what you wrote (a bit more):

[user@localhost ~]$ loginctl
   SESSION        UID USER             SEAT             TTY             
         4       1000 user             seat0            /dev/tty7       
        c1         42 gdm              seat0            /dev/tty1       
         2          0 root             seat0            tty6            

3 sessions listed.
[user@localhost ~]$ loginctl show-session 4 -p Type
Type=wayland
[user@localhost ~]$ loginctl show-session c1 -p Type
Type=wayland
[user@localhost ~]$ loginctl show-session 2 -p Type
Type=tty
[user@localhost ~]$ env | grep X
XDG_MENU_PREFIX=gnome-
XDG_VTNR=7
XDG_SESSION_ID=4
XDG_SESSION_TYPE=wayland
XDG_DATA_DIRS=/home/user/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/
XDG_SESSION_DESKTOP=gnome
XMODIFIERS=@im=ibus
XDG_CURRENT_DESKTOP=GNOME
XDG_SEAT=seat0
XDG_RUNTIME_DIR=/run/user/1000
[user@localhost ~]$ journalctl --user -ab

And the journalctl --user -ab output is attached. For me, this log is very unclear... Yes, it is GFX log, but in the format I do not understand! :-(

And to me, really, Xorg.0.log does mean much more (I can read these Xorg logs, believe me).

The question remains: Where do I find the GNOME Wayland logs on Fedora 26? Do not tell to me that this is: journalctl --user -ab ?!

Thank you,
_nobody_
Comment 9 Daniel Stone 2017-07-10 12:44:39 UTC
(In reply to _nobody_ from comment #8)
> The question remains: Where do I find the GNOME Wayland logs on Fedora 26?
> Do not tell to me that this is: journalctl --user -ab ?!

Really, it is. There is some more information here on how to run GNOME Shell (and its engine called Mutter) with more debugging information:
https://developer.gnome.org/meta/stable/running-mutter.html

Each implementation is free to log however it likes, and this is the implementation GNOME has chosen. If you'd like to discuss it with GNOME developers - we have no influence over them - I would recommend you contact them directly.
Comment 10 _nobody_ 2017-07-10 12:52:08 UTC
> Each implementation is free to log however it likes, and this is the
> implementation GNOME has chosen. If you'd like to discuss it with GNOME
> developers - we have no influence over them - I would recommend you contact
> them directly.

Hello Daniel,

I will object/reject your answer, on the very simple architectural use case. In other words, GNOME has nothing to do with this Bugzilla. Wayland Server has to do everything! ;-)

On the basis of 1+1=2, the following is true: GNOME on Xorg produces very nice Xorg.0.log files, which solely has 100% to do with Xorg server, 0% to do with GNOME.

Do you agree? 

_nobody_
Comment 11 Daniel Stone 2017-07-10 13:04:54 UTC
(In reply to _nobody_ from comment #10)
> I will object/reject your answer, on the very simple architectural use case.
> In other words, GNOME has nothing to do with this Bugzilla. Wayland Server
> has to do everything! ;-)
> 
> On the basis of 1+1=2, the following is true: GNOME on Xorg produces very
> nice Xorg.0.log files, which solely has 100% to do with Xorg server, 0% to
> do with GNOME.
> 
> Do you agree? 

GNOME on X11 uses the existing X11 server (usually 'Xorg'). Logging in this case is performed by the X server.

When you say 'Wayland server', this does not exist. There is no /usr/bin/wayland (like /usr/bin/Xorg) that is shared between everyone; instead, each user implements their own.

GNOME on Wayland uses its own Wayland server implementation, called 'Mutter'. Logging is completely up to Mutter. It is not possible to produce the same kind of logs 'from Wayland', because Wayland and Xorg are entirely different.

Please understand that I am not lying to you.
Comment 12 Pekka Paalanen 2017-07-10 13:21:49 UTC
(In reply to _nobody_ from comment #10)
> I will object/reject your answer, on the very simple architectural use case.
> In other words, GNOME has nothing to do with this Bugzilla. Wayland Server
> has to do everything! ;-)

You are correct in one thing: your issue has nothing to with this Bugzilla, and your issue has nothing to do with Wayland.

Wayland servers are *not* under the Wayland component in this Bugzilla. Each Wayland server is a project of its own, and dealt with in the respective bug tracker.

> On the basis of 1+1=2, the following is true: GNOME on Xorg produces very
> nice Xorg.0.log files, which solely has 100% to do with Xorg server, 0% to
> do with GNOME.
> 
> Do you agree? 

Yes.

You are choosing to run Mutter (gnome-shell) instead of Xorg as your display server when you choose to run the GNOME Wayland session. The two display servers happen to be different by design. Neither is discussed under the Wayland product in this Bugzilla.

As said, there is no "the Wayland server", it does not exist. There is not even a de facto Wayland server, like Xorg is the de facto X11 server. There are many different Wayland server projects, each major DE has their own.
Comment 13 _nobody_ 2017-07-10 13:23:50 UTC
> Please understand that I am not lying to you.

I do get this. Please, do understand that I am ignorant and learning and that there is no architectural documentations explaining what I am asking, anywhere, as such! :-(

> GNOME on Wayland uses its own Wayland server implementation, called
> 'Mutter'. Logging is completely up to Mutter. It is not possible to
> produce the same kind of logs 'from Wayland', because Wayland and Xorg are
> entirely different.

Questions:

[1] Who is responsible for Mutter (so I can open new Bugzilla there, to have logs produced by Mutter)?
[2] Does FC26 GNOME (as I have presented in https://bugs.freedesktop.org/show_bug.cgi?id=101727#c8) has Mutter implemented as part of Wayland? How I can find if Mutter is actual part of GNOME on Wayland (or Mutter is ALWAYS a part)?
[3] How I can find if Mutter is part of Wayland on other desktops (KDE, XFCE...), or there are not yet other desktops on Wayland?

Thank you,
_nobody_
Comment 14 _nobody_ 2017-07-10 14:38:21 UTC
> There are many different Wayland server projects, each major DE has their
> own.

OK. I got it. Now, here we have the new Bugzilla, right here! :-)

Question is simplistic: How we can discover which server (Mutter, Weston, U name it) runs under Wayland?

It is your responsibility, we should have easy method to extract this info from Wayland. Don't you agree?

Thank you,
_nobody_
Comment 15 Daniel Stone 2017-07-11 08:44:27 UTC
-> #101741


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.