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 - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-22-2016, 04:05 PM   #1
ForumBot
LQ Newbie
 
Registered: Jul 2016
Posts: 25

Rep: Reputation: Disabled
Firefox updating display very slowly when running as normal user


Firefox runs quickly for me when I am root, but not when I am a normal user. When I am a normal user, pages are downloaded reasonably quickly, but the display is updated very slowly. For example, when I press a key while the cursor is in the search box, it takes approximately three seconds before the character is displayed, and when I open a new tab, it takes approximately three seconds before the new tab is displayed. After I open a new tab but before it is displayed, the so-far not displayed search box still accepts input. For example, if I open a new tab, then press the keys t,e,s,t, and <return> before the display updates, it will show is has searched the Internet for "test" once the display updates.

I have an Intel Arch Linux laptop and use Ratpoison as my window manager. Generally no error messages are produced when running Firefox as a normal user. The contents of ~/.local/share/xorg/Xorg.0.log are here. The output of lspci -v is here.

To try to fix this, I updated my system and regenerated ~/.mozilla for a normal user. None of this helped.
 
Old 08-22-2016, 08:35 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,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
I have not experienced this, so I don't have an answer.

I have a couple of suggestions for troubleshooting, though.

Try running top in a a terminal as you browse and keeping an eye on what is using how much memory as you use Firefox (this article tells how to pipe top output to a file).
Start Firefox from the command line in a terminal and watch for error messages as you browse.
Look for Firefox errors in the logs (this forum post describes where Firefox logs stuff).

Let us know what you find.
 
Old 08-23-2016, 10:35 AM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
startup firefox with no addons enabled?
Can't speak to firefox as root, since I never run firefox as root.
 
Old 08-23-2016, 11:17 AM   #4
ForumBot
LQ Newbie
 
Registered: Jul 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
I have not experienced this, so I don't have an answer.

I have a couple of suggestions for troubleshooting, though.

Try running top in a a terminal as you browse and keeping an eye on what is using how much memory as you use Firefox (this article tells how to pipe top output to a file).
Start Firefox from the command line in a terminal and watch for error messages as you browse.
Look for Firefox errors in the logs (this forum post describes where Firefox logs stuff).

Let us know what you find.
When I run one version of Firefox as root and another as a normal user, the one run as a normal user doesn't display slowly and my settings for running it as root are used when running it as a normal user, even though this normaly isn't the case.

The output of top -n 1 -b when Firefox is running as a normal user and no instances of Firefox are running as root is here. Though it shows 0% CPU usage, I have noticed that when I run top without arguments, take an action to make Firefox update its display, and then look at top before Firefox does so, CPU usage is at roughly 13% for one of my cores and roughly 1% for the others.

When I previously ran it, there were no errors in the terminal, but when I ran it some more it started repeatedly logging "(firefox:1294): dconf-CRITICAL **: unable to create file '/run/user/1000/dconf/user: Permission denied. dconf will not work properly." I changed file permissions to eliminate the error. Though the error stopped being shown, Firefox's speed did not noticeably change.

journalctl -qb /usr/bin/firefox has no output while running Firefox as a normal user not running it as root.

Last edited by ForumBot; 08-23-2016 at 11:20 AM. Reason: Added more details
 
Old 08-23-2016, 11:20 AM   #5
ForumBot
LQ Newbie
 
Registered: Jul 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
startup firefox with no addons enabled?
Can't speak to firefox as root, since I never run firefox as root.
When a normal user, I run Firefox with no addons enabled.
 
Old 08-23-2016, 11:55 AM   #6
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Quote:
To try to fix this, I updated my system and regenerated ~/.mozilla for a normal user. None of this helped.
If you have ran firefox as root chances are... worms in java got into the fox belly. Tar to back up both /root/.mozilla and /home/$USER/.mozilla keep it safe for in case you will miss your bookmarks. Then
Code:
sudo rm -fr /root/.mozilla && rm -fr /home/YOU/.mozilla
If you have something worthy in the waste basket called /tmp back them up first then remove everything from /tmp.

Remove also firefox files inside /home/YOU/.cache.

Finally, run firefox as ordinary user.

Hope that heals. I have done it my self before. It worked.

m.m.
 
Old 08-24-2016, 09:50 AM   #7
ForumBot
LQ Newbie
 
Registered: Jul 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by malekmustaq View Post
If you have ran firefox as root chances are... worms in java got into the fox belly. Tar to back up both /root/.mozilla and /home/$USER/.mozilla keep it safe for in case you will miss your bookmarks. Then
Code:
sudo rm -fr /root/.mozilla && rm -fr /home/YOU/.mozilla
If you have something worthy in the waste basket called /tmp back them up first then remove everything from /tmp.

Remove also firefox files inside /home/YOU/.cache.

Finally, run firefox as ordinary user.

Hope that heals. I have done it my self before. It worked.

m.m.
I followed these directions but noticed no difference in the speed the display was updated. Also, I highly doubt the issue is a Java worm, as I don't have Java installed.

I also reinstalled Firefox completely, to no avail.
 
Old 08-24-2016, 10:50 AM   #8
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by ForumBot View Post
When I run one version of Firefox as root and another as a normal user, the one run as a normal user doesn't display slowly and my settings for running it as root are used when running it as a normal user, even though this normaly isn't the case.
This is very confusing. Normally, you shouldn't ever need to run Firefox as root. If you do, then things may get weird. The developers do not expect anyone to run Firefox as root, so any strange bugs caused by it are not ones the developers would have prepared for.

Note that Firefox does not play nicely with itself when trying to run it in multiple processes on the same screen. Instead of opening a second instance of Firefox, it will open a new window in the currently running instance of Firefox. It expects the running user to be the same, of course.

My guess is that it's getting confused because some files which should have been created and owned by the normal user were instead created and owned by root. I'd wipe clean various folders in your normal user home folder to try and deal with this. And remember to never run Firefox as root. Any bugs you encounter from running as root will not be ones the developers have anticipated or would be familiar with.

So, I'd try something like this:

Code:
cd ~userid
mkdir junkjunk
mv -vi .mozilla junkjunk/
mv -vi .cache/mozilla junkjunk/
I'm not sure if there are any other Firefox related files to worry about, but those will likely encapsulate anything causing your problems.

So basically:

step1) quit Firefox. Wait maybe 10 seconds to be sure it's totally quit (you can confirm with ps -A)

step2) Do the above steps in a terminal to get rid of any Firefox files with bad access issues

step3) Run firefox again to see how it goes. This should be like running it for the first time.

Remember, if you run firefox as root then you may cause weird things to happen again.
 
Old 08-25-2016, 10:53 AM   #9
ForumBot
LQ Newbie
 
Registered: Jul 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by IsaacKuo View Post
This is very confusing. Normally, you shouldn't ever need to run Firefox as root. If you do, then things may get weird. The developers do not expect anyone to run Firefox as root, so any strange bugs caused by it are not ones the developers would have prepared for.

Note that Firefox does not play nicely with itself when trying to run it in multiple processes on the same screen. Instead of opening a second instance of Firefox, it will open a new window in the currently running instance of Firefox. It expects the running user to be the same, of course.

My guess is that it's getting confused because some files which should have been created and owned by the normal user were instead created and owned by root. I'd wipe clean various folders in your normal user home folder to try and deal with this. And remember to never run Firefox as root. Any bugs you encounter from running as root will not be ones the developers have anticipated or would be familiar with.

So, I'd try something like this:

Code:
cd ~userid
mkdir junkjunk
mv -vi .mozilla junkjunk/
mv -vi .cache/mozilla junkjunk/
I'm not sure if there are any other Firefox related files to worry about, but those will likely encapsulate anything causing your problems.

So basically:

step1) quit Firefox. Wait maybe 10 seconds to be sure it's totally quit (you can confirm with ps -A)

step2) Do the above steps in a terminal to get rid of any Firefox files with bad access issues

step3) Run firefox again to see how it goes. This should be like running it for the first time.

Remember, if you run firefox as root then you may cause weird things to happen again.
I followed these directions to no avail.
 
Old 08-26-2016, 11:06 AM   #10
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 ForumBot View Post
I followed these directions to no avail.
that is honestly all you have to say after someone took the effort to write it all out for you with steps, commands and alternatives?
may your fingers rot off.
or wait, maybe you are a bot?
 
Old 08-26-2016, 12:02 PM   #11
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Is the user in the video group?

Did root run a gui web browser (*sigh*). If so you might have .xyz files in your ~/ of that user owned as root. So you can't write things like cache due to permission issues. Or something else is seriously b0rked. If there's nothing precious to be saved, rm-ing some .mozilla, .config/???, and .cache type things might be a good start. They should get re-created when the programs that use them start and can't find them.

(problems often solved with a fresh install in half the time)
 
Old 08-26-2016, 12:05 PM   #12
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Talking

Quote:
Originally Posted by ondoho View Post
that is honestly all you have to say after someone took the effort to write it all out for you with steps, commands and alternatives?
may your fingers rot off.
or wait, maybe you are a bot?
ondoho... let us be considerate to people who are not reared by parents to appreciate gratitude. Some appreciate our efforts, some don't even care feel nor express simple compliment for being grateful, it reflects the way how their parents trained when young.
 
1 members found this post helpful.
Old 08-26-2016, 01:14 PM   #13
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 malekmustaq View Post
ondoho... let us be considerate to people who are not reared by parents to appreciate gratitude. Some appreciate our efforts, some don't even care feel nor express simple compliment for being grateful, it reflects the way how their parents trained when young.
Quote:
I followed these directions to no avail, thank you.
nah, doesn't work either.

but on topic:
you can't just say it didn't work when there's commands and steps that must have created some sort of output.
looking closer i see that isaackuo formatted it in a way that you have to actually understand it and adjust to your situation. can't just copy-paste.
so simply copy-pasting the commands would have created a very distinct error message.
which would have needed to be posted here.
it just baffles the mind.
 
Old 08-26-2016, 02:29 PM   #14
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Okay, I still don't really understand the symptoms, but I think Shadow7 has the right hunch. Running Firefox (or even something else) as root has probably caused some weird files in the user's home directory to be owned by root.

Since it seems that removing only ~/.mozilla/* and ~/.cache/mozilla/* were not sufficient to clear things up, I'd look at moving ALL of the configuration files from the home folder.

I'd use the following steps:

1) Log out, so the GUI is on the login screen.

2) Use Ctrl-Alt-F1 to get to a text console login screen. (You will use something like Ctrl-Alt-F7 to get back to the GUI login - the exact F key required might vary.)

3) Log in as root at the text console login screen.

4) use something like this to move ALL of the user's config files:

Code:
cd /home/userid
mkdir junkjunk2
mv -vi .???* junkjunk2/
This should wipe out all of userid's config files (including any which are mistakenly owned by root).

5) Use something like Ctrl-Alt-F7 to get back to the GUI login, and log in as userid. See if Firefox works properly.

You can then selectively copy back various config files from junkjunk2 for stuff that you don't feel like setting up again. Note that if you COPY the files back as the regular user (NOT as root), the new copies will be owned by the regular user, not root.
 
Old 08-27-2016, 11:11 AM   #15
ForumBot
LQ Newbie
 
Registered: Jul 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by IsaacKuo View Post
Okay, I still don't really understand the symptoms, but I think Shadow7 has the right hunch. Running Firefox (or even something else) as root has probably caused some weird files in the user's home directory to be owned by root.

Since it seems that removing only ~/.mozilla/* and ~/.cache/mozilla/* were not sufficient to clear things up, I'd look at moving ALL of the configuration files from the home folder.

I'd use the following steps:

1) Log out, so the GUI is on the login screen.

2) Use Ctrl-Alt-F1 to get to a text console login screen. (You will use something like Ctrl-Alt-F7 to get back to the GUI login - the exact F key required might vary.)

3) Log in as root at the text console login screen.

4) use something like this to move ALL of the user's config files:

Code:
cd /home/userid
mkdir junkjunk2
mv -vi .???* junkjunk2/
This should wipe out all of userid's config files (including any which are mistakenly owned by root).

5) Use something like Ctrl-Alt-F7 to get back to the GUI login, and log in as userid. See if Firefox works properly.

You can then selectively copy back various config files from junkjunk2 for stuff that you don't feel like setting up again. Note that if you COPY the files back as the regular user (NOT as root), the new copies will be owned by the regular user, not root.
Thank you for the response. Following your directions resulted in no noticeable changes in speed. I was already in a terminal and Xorg wasn't running, so I didn't exit a GUI or log in as root and instead used su.

Code:
$ su
Password:
[root@aak3 documents]# cd /home/lithoria/
[root@aak3 lithoria]# mkdir junkjunk2
[root@aak3 lithoria]# mv -vi .* junkjunk2/
mv: overwrite 'junkjunk2/.'? n
mv: overwrite 'junkjunk2/..'? n
'.bash_history' -> 'junkjunk2/.bash_history'
'.bash_logout' -> 'junkjunk2/.bash_logout'
'.bash_profile' -> 'junkjunk2/.bash_profile'
'.bashrc' -> 'junkjunk2/.bashrc'
'.cache' -> 'junkjunk2/.cache'
'.config' -> 'junkjunk2/.config'
'.elinks' -> 'junkjunk2/.elinks'
'.gnupg' -> 'junkjunk2/.gnupg'
'.lesshst' -> 'junkjunk2/.lesshst'
'.links' -> 'junkjunk2/.links'
'.local' -> 'junkjunk2/.local'
'.lynxrc' -> 'junkjunk2/.lynxrc'
'.mozilla' -> 'junkjunk2/.mozilla'
'.muttrc' -> 'junkjunk2/.muttrc'
'.pki' -> 'junkjunk2/.pki'
'.python_history' -> 'junkjunk2/.python_history'
'.ratpoison_history' -> 'junkjunk2/.ratpoison_history'
'.ratpoisonrc' -> 'junkjunk2/.ratpoisonrc'
'.screenrc' -> 'junkjunk2/.screenrc'
'.swo' -> 'junkjunk2/.swo'
'.swp' -> 'junkjunk2/.swp'
'.terminfo' -> 'junkjunk2/.terminfo'
'.vim' -> 'junkjunk2/.vim'
'.viminfo' -> 'junkjunk2/.viminfo'
'.viminfo.tmp' -> 'junkjunk2/.viminfo.tmp'
'.vimrc' -> 'junkjunk2/.vimrc'
'.w3m' -> 'junkjunk2/.w3m'
'.wget-hsts' -> 'junkjunk2/.wget-hsts'
'.Xauthority' -> 'junkjunk2/.Xauthority'
'.xinitrc' -> 'junkjunk2/.xinitrc'
[root@aak3 lithoria]#
Edit: Improved formatting and I initially forgot to execute commands as root, so I redid them.

Last edited by ForumBot; 08-27-2016 at 11:31 AM.
 
  


Reply

Tags
firefox, optimization, slow, speed



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
windows move slowly (repaint/redraw) and firefox scrolls slowly with ATI driver netrek Debian 3 11-20-2009 01:18 PM
Running super user commands as normal user mickyg Linux - Security 5 10-14-2005 07:25 PM
Root can't open display, but normal user can? sw67 Slackware 6 06-05-2005 11:48 PM
cant open firefox as normal user silverstormboy Debian 2 01-09-2005 07:58 AM
Firefox not starting as a normal user fredgt Linux - Software 9 10-03-2004 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:00 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