8

When I start up Ubuntu 16.04 some applications take too long to run the first time I open them, including Chrome and any PDF viewer. Others, like nautilus, start up immediately.

The first time I try to use a PDF viewer like okular, it takes too long to open. After it opens a PDF file for the first time, other files open quickly. Even if I close all and open some after a long time, it happens quickly.

How can I speed up these programs opening on the first run?

1
  • Using an SSD would for sure speed things up - as reading data from disk is faster.
    – dufte
    Jun 17, 2016 at 9:01

3 Answers 3

10

I got the same problem out of the blue on my new notebook. After that I did a new ubuntu installation on a desktop machine, and the problem didn't happened there.

After some research, I found the solution here on the Arch Linux Forums

Close all your apps (like Chrome) and try running the following command on a terminal:

gnome-keyring-daemon &

After that, open Chrome again. It might ask for your account password again once. For me this solves the delay problem. Chrome and gnome-terminal are opening very fast now (< 1 sec delay instead 30 sec delay).

For you knowledge, Chrome was throwing the following error before this fix:

Gkr-Message: secret service operation failed: Did not receive a reply.
Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

I logged Chrome startup with strace, and this message alone took 25 seconds to appear. I guess this is a system message, not only for Chrome, because I was having the same issue with gnome-terminal starting up as well, and this fix solve that issue too.

3
  • 1
    I have been fighting with this thing for a while and good job! That is what it took. Many thanks! +1
    – Terrance
    Mar 28, 2017 at 4:49
  • The problem is with gnome-keyring-daemon for sure, but this answer didn't help me because there were gnome-keyring-daemon already running. This answer helped askubuntu.com/a/911755/61218
    – Anwar
    May 22, 2017 at 14:05
  • This command only works once. This happens every time with startup. Before shooting me elsewhere, could you update your post to explain what you've learned and what gnome-keyring-daemon & is and does? Thank you Aug 29, 2017 at 20:07
0

You could install preload and ureadahead and see if that helps. Both can work together as far as i know - so they shouldnt conflict with each other.

preload

About

preload is an adaptive readahead daemon that prefetches files mapped by applications from the disk to reduce application startup time.

See its man page for more.

Installation

You could install preload via

sudo apt install preload

ureadahead

About

ureadahead (über-readahead) is used during boot to read files in advance of when they are needed such that they are already in the page cache, improving boot performance.

Installation

Install it via

sudo apt install ureadahead

While ureadahead is most likely installed already anyways.

1
  • How is it going to solve the problem actually? Can you explain?
    – Anwar
    May 22, 2017 at 13:47
0

I seems that the bug is caused by the dbus-user-session package (see https://bugs.launchpad.net/bugs/1689825), which prevent gnome-keyring-daemon from starting.

Uninstalling dbus-user-session can fix the problem.

sudo apt-get purge dbus-user-session
1
  • Wow! That wanted to remove a large pile of wanted applications.
    – Paul
    May 30, 2022 at 16:22

You must log in to answer this question.

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