[HowTo] Find error logs

Difficulty: ★☆☆☆☆

The first step for troubleshooting an issue is to find an error log: a trace produced by an application when failing/crashing, and providing the first trail a user/developer can follow to fix it.

1. Reach a usable system

Obviously, it will be impossible to acquire those logs if you can’t have access to a usable system.
See: [HowTo] Reach a minimal system

2. Find the faulty application

If you don’t know which application failed – this is usually the case on a system or graphical failure – a good place to search the culprit is in the system journal.
Supposing the failure occurred in the previous boot:

journalctl --boot=-1 --priority=3 --catalog --no-pager

3. Find error traces

Depending on the faulty application, there are several means to obtain an error log:

- Launch the application from a terminal
Most applications will write messages and errors in the terminal or TTY they are launched from.
If you don’t know what command to use, one should be available in its launcher properties.

- Open user log files
Some applications, when launched by a user, trace logs in a dedicated file within ~/.local/share/.

- Open system log files
Some applications, when launched by the system or as a service, trace logs in a dedicate file within /var/log/.

- Search the system journal
Service traces are usually logged into the system journal.
Supposing the failure occurred in the previous boot:

journalctl --boot=-1 --unit=<service_name> --no-pager

- Search the kernel ring buffer
Low level failures can prevent journals from logging the associated errors. In that case, those logs may nonetheless be present in the ring buffer used by the kernel.

sudo dmesg

4. Share the logs with us

Now that you found the error message, you can use it to diagnose and fix your issue.
But if you can’t make heads and tails of it, you can ask for support in the forum.

:star: For tips on extracting and sharing results from the terminal, see: [HowTo] Use the terminal / TTY

:star2: You can retrieve and upload graphically some of those logs through the manjaro-log-helper utility.

:warning: When posting those logs in the forum, it is recommended to format them to make them more readable.

:warning: It is recommended, in order to allow as many people as possible to help you, to provide logs in English. If your system uses another language, and the application thus produces non-English messages, you can run it in English with:

LANG=C <command>

More details available in the following guides:

16 Likes

Hello, nice tutorial.

Just wanted to say that in my case only if I press the left side Ctrl + Alt + … F2 trough F6 work for TTY. Why ??.. it beats me :man_shrugging:
Its a regular QWERTY 105 key, us layout keyboard.

So if someone presses the right side and it doesn’t work, the left will surely work :smiley:

Cheers…

1 Like

Two things come to mind:

  • The right Alt key is replaced by AltGr on many keyboards. The layout for generic 105-key layout may have that replacement too.
  • One may need a compose key in order to input a character absent from the keyboard (usually diacritics).
    That key can be configured to use the right Alt or Ctrl key, in which case it cannot be used for key combinations.

2 posts were split to a new topic: How to access logs without booting the system?

@maycne.sonahoz @Stefano has a handy GUI in the repos you might want to mention here somewhere:

3 Likes