Score:2

Can I check log files in Wayland to fix my Ubuntu problem?

cn flag

I am able to log into Ubuntu Wayland (20.04) but I am having a problem with regular Ubuntu. I have been advised to "read log files like dmesg or syslog".

My question is, if I run these in Wayland, will that help figure out what's going on in regular Ubuntu or do I have to log into regular Ubuntu in recovery mode and then read the log files in there?

(For context: my original post).

guiverc avatar
cn flag
You can use `dmesg` or `journalctl` from terminal anywhere (text terminal, GUI be it Wayland, Xorg etc session); however if you reboot (into recovery mode), you'll only be reading the messages from the current session (ie. from boot) using `dmesg` as they do not survive shutdown/reboot.
cn flag
@guiverc thank you. Hmmm. So my problem occurs when I log in to "regular Ubuntu" (everything freezes). Does that mean that my log files in Wayland or recovery mode Ubuntu won't be of any use?
guiverc avatar
cn flag
Depends what you mean by *freezes*.. If the desktop is frozen; you should still be able to speak directly to the kernel via keyboard (sysrq keys etc) & I'd still expect you can switch to text terminal via Ctrl+Alt+F4 for example.. but systemd journals (`journalctl`) will survive reboot ... is freeze kernel level (ie. SysRq commands no longer work) or just GUI (ie. mouse/keyboard no longer seem to work as nothing changes on display; but keyboard commands to non-GUI will still work)
cn flag
@guiverc thank you. So I just checked. When logging into regular Ubuntu, I tried `Ctrl+Alt+F4` and that did NOT bring up a terminal (and it does when I am in Wayland). However, the keyboard must work somewhat because I can `Alt+SysRq+b` to reboot the machine.
cn flag
So I think from what you have said: because the SysRq keys do still work, this is only a GUI-level freeze (although I can't open a terminal either).
Matias N Goldberg avatar
vg flag
If you've got a spare computer, `sudo apt install openssh-server` to install an SSH server, then from your spare computer type `ssh [email protected] -o PreferredAuthentications=password` to login while you try to repro the crash on your server. You can check dmesg and other commands comfortably. From client you can also do `sshfs [email protected]:/ /mnt -o default_permissions,idmap=user` to mount your root in /mnt and from there check `/mnt/var/log/Xorg.0.log
Score:2
cn flag

The logfiles of your system record what has been going on with your system, irrespective of the way you happen to log in (on a TTY, over SSH, in Gnome Shell, in xfce... So yes, inspection of your log files from within another session is relevant.

System log files are being stored for a certain time. By default, they are archived every 7 days. By default up to four cycles of these archives are preserved. So you can look back into the system logs for about the past month.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.