My screen goes black -- How can I find out what's happening using journalctl?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My screen goes black -- How can I find out what's happening using journalctl?
Since I updated to Ubuntu 9.3.0-17ubuntu1~20.04 I have a strange issue:
My screen turns black and the keyboard is unresponsive. This happens about once a day if I work a few hours on my computer, and I can't connect it to some particular thing I'm doing.
I've been starting to investigate using journalctl like so:
Code:
journalctl --boot -1
But I can't seem to find anything suspicious when I look at the last lines before I had to make a hardware shutdown
Would be great to get some tips on how to continue!
This is a complete WAG:
Perhaps the box is going into suspension/sleep/hibernation. Does it happen after a period of inactivity?
I’m not sure where that setting is for you, but I’d guess in power...
In a similar vein, maybe it's just the screen timing out. Check the simple things first.
If the system really is dieing and not leaving any kernel logs, you will be in a world of hurt trying to figure that out.
Thanks for the input, and sorry for being unclear: It does happen while working, could be just a few secs after writing something, so I don't think it's screensaver related. I've now also completely disabled display power management to see if that could happen to solve the problem.
What I was thinking about regarding journalctl was mainly if I'm looking in the wrong way? Which switches should I use too see everything that could be relevant?
Since this often happen when I'm by the screen I have a quite narrow time frame to search.
But I can't seem to find anything suspicious when I look at the last lines before I had to make a hardware shutdown
You need to look at the time stamps; when does the unresponsiveness occur?
That's what you need to find in the journal.
It won't necessarily be in "the last lines".
You need to look at the time stamps; when does the unresponsiveness occur?
That's what you need to find in the journal.
It won't necessarily be in "the last lines".
Thanks for writing! Yes, I use
Code:
journalctl --boot -1 -S 16:12
to get to the place where I know it happened.
It turns out the computer is not unresponsive, it's just the screen going out and not being able to come back up (I have a laptop). If I have a second screen connected, that screen will stay on as usual. I can also change the brightness of the laptop screen while it's out, and can see those brightness changes in the journal after I restarted.
I was more thinking about if there are some events that are filtered out in the journal when I look at it the way I do. Is there a way too see more events that has taken place, or do I already see all events as standard?
Last edited by Beaverfriend; 02-13-2021 at 09:58 AM.
Good idea, but I don't know if it would help me solve **what** has gone wrong if I still can't find anything in the logs.
Quote:
Originally Posted by lvm_
Can you access console via ctrl-alt-Fn when it happens? Does network access work? Alt-SysReq?
No, ctrl-alt-Fn doesn't work, but as I wrote in another post I've found out that an external screen connected does, so the computer is not unresponsive. I can open a terminal in that other screen etc. Could be something with the display drivers. I'll look into that a bit and post again if I can get more info on what's wrong.
Everything that is logged is in the journal - if it ain't logged ... well, you get the idea.
Typically you want to reduce the amount of logs you see - i.e. only the important ones. See priority in the link frankbell gave. But if the screen is simply going away as in a (incorrect) timeout, it isn't likely to log the event.
Sorry, missed that. Did you check .xsession-errors? Contrary to what is said above, journal does not contain everything.
That's also something to check. Good idea!
Thanks all for your suggestions and thoughts so far. I will delve deeper into the logs, but as for now it seems probably it's something with the display drivers.
(...) I was more thinking about if there are some events that are filtered out in the journal when I look at it the way I do. Is there a way too see more events that has taken place, or do I already see all events as standard?
"--boot -1" shows entries from the last uptime, i.e. before you rebooted.
Combining that with --since only makes sense if the start time was during or before that last uptime.
I believe the journal will include entries for the event of the problematic behaviour. Better to go a few seconds back in time though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.