2

Once a day or so my whole desktop freezes (only the mouse can move) and after about 30-60 seconds all the screens reset themselves back to normal.

I have a standard 22.04 installation with the following hardware:

  • Core i7-12700K
  • 32GB RAM
  • nvidia GK208B (GT 710) graphic card with the latest 470 proprietary driver installed.
  • 3 monitors hooked up to the nvidia card with the on-cpu graphics disabled.

I suspect it is the graphics card.

How can I troubleshoot it further or fix this.

2
  • Did you check syslog for any related messages during this period?
    – FedKad
    Commented May 18, 2023 at 9:10
  • @FedKad I truncated the syslog and will check when it happens again. Commented May 19, 2023 at 6:19

2 Answers 2

1

I was getting hanging in Ubuntu 22.04, but only in Firefox and Chromium. If I did nothing the web browsers went back to normal by themselves in about five minutes. My desktop and other apps were not affected, so I could logout and login to make the web browser(s) stop hanging immediately. This seemed to indicate that logging out and logging back in was clearing a cache of some kind.

Here is how I fixed the hanging permanently in Ubuntu 22.04.

Ubuntu uses inotify by default to monitor directories for changes. In Ubuntu the system limit on the number of files you can monitor is set low by default, so that Ubuntu's performance will be snappy on computers with low specs. You can get your current inotify file watch limit by running:

cat /proc/sys/fs/inotify/max_user_watches

When this limit is not enough to monitor all files inside a directory, the limit must be increased. You can set a new limit temporarily with:

sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p

To make your modified limit permanent run:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

You may also need to pay attention to the values of max_user_instances.

echo fs.inotify.max_user_instances=8192 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
3
  • Thanks, this is quite possible as I normally have VSCode open when this happens. Commented May 22, 2023 at 11:51
  • @J.Reynolds If this answered your question, you can mark this answer as accepted by clicking the gray check mark beside the answer to change its color from gray to green.
    – karel
    Commented May 22, 2023 at 12:23
  • Thanks, but I will probably have to use my PC for a while to see if it did make a difference. Commented May 22, 2023 at 15:39
0

The problem persisted after implementing karel's answer. After a lot of searching I eventually found the solution.

  1. Disable Wayland.
  2. Open the Nvidia configuration manager and enable force full composition pipeline. Copy created x.org config file sections.
  3. Create a default x.org config file and paste the copied sections into it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .