1

Summary: sometimes launching Nautilus or taking a screenshot takes 20 seconds or more. The only solution seems to be rebooting. At every reboot I have 50% chance of this occurring again.


See updates at the bottom!


I have a Dell laptop with Ubuntu 16.04 (pre)installed. Some times (I'd say, every 2 sessions) I have my entire session affected by a problem with some applications hanging or not starting at all. This is usually solved by rebooting (which isn't ideal).

The most common way I realise that the current session is affected, is by trying to open a nautilus window (by clicking on the "Files" dock icon). The window will open, but only after ~20 seconds.

Also if I try to launch a File dialog from within other programs (e.g. when doing File > Open or Mail > Attach), the file picker will appear after 20 seconds, freezing the parent program in the meantime.

Another thing that happens is that if I launch gnome-screenshot from the dock (equivalent to gnome-screenshot -i), it doesn't hang but after I click Take Screenshot it takes ~20 seconds before actually taking the screenshot. In the meantime, I can't seem to launch other instances of gnome-screenshot.

The majority of other programs I use are unaffected by this.

Additional info:

  • I have a NVIDIA gpu, but this happens regardless of it being active or disabled through nvidia-prime
  • The problem doesn't happen at every boot, but once I notice it, it is reproduced 100% of the time within that session
  • The laptop hasn't been suspended when this problem appears. The problem, when it appears, seems to appear since booting.
  • I always make all the updates. This has always happened since I started using this laptop (8 months)

Updates 19 Aug (thanks Robert Riedl for making me look at peripherals and syslogs):


Looking at the /var/log/syslogs, I can notice these different behaviors:

  • gnome-screenshot: good session:
    Aug 19 08:13:01 quokka dbus[964]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
    Aug 19 08:13:01 quokka systemd[1]: Starting Hostname Service...
    Aug 19 08:13:01 quokka kernel: [  162.129006] talpa-vfshook: devpts is on the skip list, not patching
    Aug 19 08:13:01 quokka kernel: [  162.129031] talpa-vfshook: mqueue is on the skip list, not patching
    Aug 19 08:13:01 quokka kernel: [  162.129037] talpa-vfshook: Patching hugetlbfs
    Aug 19 08:13:01 quokka dbus[964]: [system] Successfully activated service 'org.freedesktop.hostname1'
    Aug 19 08:13:01 quokka systemd[1]: Started Hostname Service.
  • gnome-screenshot: bad session:

    Nothing on fire; then when eventually the screenshot is taken, only this line

      Aug 19 07:57:51 quokka dbus[1029]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
  • nautilus: good session:

    No relevant syslogs

  • nautilus: bad session:

    Nothing on fire; then when eventually the window is open, only this line

      Aug 19 08:01:31 quokka dbus[1029]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
12
  • How much RAM does the computer have?
    – Daniel M.
    Commented Aug 15, 2019 at 17:00
  • @DanielMassey 16GB (+ swap)
    – Nicola Sap
    Commented Aug 15, 2019 at 17:43
  • I think in situations like these, formatting the drives which have an operating system and doing a clean install is less effort than trying to find the cause of the problem. Commented Aug 16, 2019 at 7:06
  • @xubuntu not everybody can, at any moment, format and clean install. If there is a bug that affects multiple people on a maintained version of the OS, it's desirable to have a solution available on askubuntu for them to find in a hurry.
    – Nicola Sap
    Commented Aug 16, 2019 at 7:43
  • Once this happens, have you checked the log files /var/log/syslog and /var/log/messages? This could be some I/O or interrupt issue. Do you have any peripherals ? Commented Aug 16, 2019 at 11:32

2 Answers 2

1
+50

Update August 19, 2019


Sounds like this 2 year old bug:

the solution seems to be adding

dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY

to .xinitrc or .xsession.


Original Answer

This thread has techniques you can use to narrow down the problem:

The next time it happens, rather than starting Nautilus from the GUI desktop or menu open a terminal and type nautilus. Then you will hopefully see some error messages that tell you the exact problem.

In the link above the solution hinted at was to use:

cp /etc/X11/xinit/xinitrc ~/.xinitrc

Then edit the file ~/.xinitrc and add the dbus command. On my system the end result would look like this:

$ cat ~/.xinitrc

#!/bin/sh

# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)

# invoke global X session script
. /etc/X11/Xsession
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
9
  • Unfortunately this didn't help. I get the exact same five GLib-GIO, GLib-GObject and Gtk messages on both a good session and a bad session. Also, my behavior differs from the one in the thread as in mine not only the first launch is affected.
    – Nicola Sap
    Commented Aug 19, 2019 at 6:48
  • Note: I launch nautilus, the warnings appear immediately and I get my terminal back immediately, but the windows appears 20 seconds later without any new printout (but with Aug 19 08:01:31 quokka dbus[1029]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' in the syslogs)
    – Nicola Sap
    Commented Aug 19, 2019 at 7:02
  • @NicolaSap The error messages helped me update the answer with a possible solution. Commented Aug 19, 2019 at 10:51
  • That's seems like a very promising direction! However I don't understand exactly how to implement it. If a session is corrupted, running that dbus-update-activation-environment line (with or without sudo) won't fix the session. As for adding it to a init file, I don't have either ~/.xinitrc or ~/.xsession. I've tried creating the former with the suggested line, and it didn't solve the issue
    – Nicola Sap
    Commented Aug 19, 2019 at 15:26
  • Can you remove the bit about nautilus please ? Since this is clearly not the solution. And please link to the bug report instead of or at least in addition to the forum link. I know the archlinux userbase keeps their content very consistent, but still.. Commented Aug 21, 2019 at 12:33
0

Nicola,

In addition to looking at the logs recommend I highly recommend opening a terminal and watching a running "top" session before duplicating the problem.

Also you can run it from the F1 or other txt login sessions, or even remotely through ssh if the session hangs.

I have had various issues with nautilus and apps (mostly via vnc but sometimes at host), and this has sometimes lead to a resolution.

For instance you might be able to tell which process is taking up all the time, the app, nautilus or other.

Curt

You must log in to answer this question.

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