Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Xorg logs in journalctl
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
bender86
Guru
Guru


Joined: 18 Mar 2005
Posts: 484

PostPosted: Sun Jun 12, 2022 8:02 am    Post subject: Xorg logs in journalctl Reply with quote

Is there a way to make Xorg log to journalctl?

I am trying to debug some X/Wayland issue, and it would be quite useful to get all logs from a single source, and also to access logs from many different past boots.

Apparently some distributions do that*, so it should be possible, but I have not found any information about it.

* https://who-t.blogspot.com/2014/03/viewing-xorglog-with-journalctl.html
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Jun 12, 2022 10:39 am    Post subject: Reply with quote

Ok try
Code:

ls -l  /etc/systemd/system/display-manager.service

you will see a link to you DM.
In my case is lightdm
Then
Code:

systemctl edit --full lightdm.service

Then change
Code:

StandardOutput=syslog

to
Code:

StandardOutput=journal

Then see the messages
Code:

journalctl -b -u lightdm
or
journaltcl -u lightdm

plz see
Code:

StandardOutput=

Controls where file descriptor 1 (STDOUT) of the executed processes is connected to. Takes one of
inherit, null, tty, journal, syslog, kmsg, journal+console, syslog+console, kmsg+console or socket.

_________________
:)
Back to top
View user's profile Send private message
bender86
Guru
Guru


Joined: 18 Mar 2005
Posts: 484

PostPosted: Sun Jun 12, 2022 11:34 am    Post subject: Reply with quote

I use gdm, and I already get all gdm log messages in journalctl.

Xorg messages still go to
Code:
~/.local/share/xorg/Xorg.X.log
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Jun 12, 2022 11:55 am    Post subject: Reply with quote

Code:

~/.local/share/xorg/Xorg.X.log

Are you using Gentoo?
I have no such file.
I have instead
Code:

/var/log/Xorg.0.log

_________________
:)
Back to top
View user's profile Send private message
bender86
Guru
Guru


Joined: 18 Mar 2005
Posts: 484

PostPosted: Sun Jun 12, 2022 12:04 pm    Post subject: Reply with quote

alamahant wrote:
Are you using Gentoo?

Of course I am using Gentoo.
Why would I ask in this forum otherwise...?

alamahant wrote:
I have no such file.
I have instead
Code:

/var/log/Xorg.0.log

If you install x11-base/xorg-server without USE suid (which is indeed disabled by default), Xorg runs as a standard user and cannot write in /var/log, so it does in your home directory.

Or something like that. I am not very experienced with Xorg.
Perhaps this is the default behaviour only on systemd and you are using OpenRC?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Jun 12, 2022 12:50 pm    Post subject: Reply with quote

Your log location is mistaken.
It should be
Code:

~/.local/share/xorg/Xorg.0.log


In both systemd and openrc I get logs both in user home dir and /var/log(slightly different).
And i have USE="-suid" in xorg-server.
_________________
:)
Back to top
View user's profile Send private message
bender86
Guru
Guru


Joined: 18 Mar 2005
Posts: 484

PostPosted: Sun Jun 12, 2022 12:53 pm    Post subject: Reply with quote

alamahant wrote:
Your log location is mistaken.
It should be
Code:

~/.local/share/xorg/Xorg.0.log


That is the one I wrote. I do have a logfile there, but I do not want a log file at all. I want it in journald.


alamahant wrote:
In both systemd and openrc I get logs both in user home dir and /var/log(slightly different).
And i have USE="-suid" in xorg-server.

I have nothing in /var/log
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Jun 12, 2022 1:01 pm    Post subject: Reply with quote

bender86 wrote:
I use gdm, and I already get all gdm log messages in journalctl.

Xorg messages still go to
Code:
~/.local/share/xorg/Xorg.X.log

No you wrote something different.
Anyway apparently X logging location in systemd env is controlled by DM.This is according to all available info.
Maybe open a bug report for gdm.
They will be able to enlighten you better.
_________________
:)
Back to top
View user's profile Send private message
bender86
Guru
Guru


Joined: 18 Mar 2005
Posts: 484

PostPosted: Sun Jun 12, 2022 1:10 pm    Post subject: Reply with quote

alamahant wrote:
bender86 wrote:
I use gdm, and I already get all gdm log messages in journalctl.

Xorg messages still go to
Code:
~/.local/share/xorg/Xorg.X.log

No you wrote something different.

What did I write different? The X was a placeholder, there are multiple log files depending on the VT/Server number (or something else, I cannot remember exactly what field it is).

alamahant wrote:
Anyway apparently X logging location is controlled by DM.This is according to all available info.

Where did you find this information? Perhaps I can start from there to understand better.

alamahant wrote:
Maybe open a bug report for gdm.
They will be able to enlighten you better.

The original link I posted links an ancient issue on GDM issue tracker. As far as I understand, GDM already supports it and it does so by default on Fedora, but I cannot find any documentation on how to enable it on Gentoo.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Jun 12, 2022 1:32 pm    Post subject: Reply with quote

Plz see
[url]
https://github.com/NixOS/nixpkgs/issues/19236
[/url]
and
[url]
https://bugzilla.gnome.org/show_bug.cgi?id=722889
[/url]
and
https://github.com/sddm/sddm/issues/539
_________________
:)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum