LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 02-11-2021, 03:12 PM   #1
Beaverfriend
Member
 
Registered: Feb 2010
Posts: 30

Rep: Reputation: 0
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!
 
Old 02-11-2021, 07:08 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,330
Blog Entries: 28

Rep: Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144
This is an excellent tutorial on journalctl: https://www.digitalocean.com/communi...e-systemd-logs
 
Old 02-11-2021, 07:19 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,731

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
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...
 
Old 02-11-2021, 08:35 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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.
 
Old 02-13-2021, 04:47 AM   #5
Beaverfriend
Member
 
Registered: Feb 2010
Posts: 30

Original Poster
Rep: Reputation: 0
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.
 
Old 02-13-2021, 05:27 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Beaverfriend View Post
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
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".
 
Old 02-13-2021, 09:50 AM   #7
Beaverfriend
Member
 
Registered: Feb 2010
Posts: 30

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ondoho View Post
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.
 
Old 02-13-2021, 10:03 AM   #8
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,231

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Try to ssh in next time it happens.
 
Old 02-13-2021, 10:28 AM   #9
lvm_
Member
 
Registered: Jul 2020
Posts: 935

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Can you access console via ctrl-alt-Fn when it happens? Does network access work? Alt-SysReq?
 
Old 02-13-2021, 03:39 PM   #10
Beaverfriend
Member
 
Registered: Feb 2010
Posts: 30

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by dugan View Post
Try to ssh in next time it happens.
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_ View Post
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.
 
Old 02-13-2021, 05:41 PM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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.
 
Old 02-14-2021, 12:31 AM   #12
lvm_
Member
 
Registered: Jul 2020
Posts: 935

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Quote:
Originally Posted by Beaverfriend View Post
as I wrote in another post I've found out that an external screen connected does
Sorry, missed that. Did you check .xsession-errors? Contrary to what is said above, journal does not contain everything.
 
Old 02-14-2021, 12:57 AM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Indeed - things I don't care about, I don't care about. I shall attempt to be more inclusive in future.
 
Old 02-14-2021, 04:15 AM   #14
Beaverfriend
Member
 
Registered: Feb 2010
Posts: 30

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by lvm_ View Post
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.

Will post more info as soon as I have it.

Wish you all a beautiful day!
 
Old 02-14-2021, 10:21 AM   #15
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Beaverfriend View Post
Code:
journalctl --boot -1 -S 16:12
(...)
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.
 
  


Reply

Tags
crash, logs, systemd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen goes black when browser is goes into full screen in KDE Plasma 5.20.0 ShnorpSinkledonk Linux - Desktop 3 12-16-2020 04:21 PM
LXer: How to analyze Linux systemd logs using journalctl advanced filtering options LXer Syndicated Linux News 0 12-09-2019 07:10 AM
Monitoring login and su messages using journalctl fanoflq Linux - Newbie 2 02-17-2017 08:01 PM
Debian Jessie black screen after grub only just started happening edged Linux - Newbie 10 04-22-2016 10:58 PM
screen saver goes off and screen goes black Doug.Gentry SUSE / openSUSE 2 03-26-2005 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration