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-27-2016, 11:34 AM   #16
ForumBot
LQ Newbie
 
Registered: Jul 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled

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?
I'm sorry.
 
Old 08-27-2016, 11:40 AM   #17
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.
Thank you for the response. It didn't produce any unusual or unexpected output, but if you want I will redo the steps and post the output.
 
Old 08-27-2016, 11:42 AM   #18
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.
Thank you for the response. It didn't produce any unusual or unexpected output, but if you want I will redo the steps and post the output.
 
Old 08-27-2016, 11:43 AM   #19
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
I think, then, that there may be something going on with X, where the regular user has insufficient rights for hardware accelerated graphics or something. I'm afraid I do not know how to troubleshoot X issues like this.

You could try creating a new regular user and see if the new user has similar issues. If nothing else, creating a new regular user will give you a "sand box" for experimenting with potential fixes or trying to duplicate an issue.
 
Old 08-27-2016, 04:39 PM   #20
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
had another glance at post #1.
intel broadwell cpu & graphics, i915 driver, probably a cutting edge kernel version with arch - i really don't see any problems there.

i suspect that the whole running-gui-apps-as-root might have messed things up a bit (a lot).
 
Old 08-28-2016, 01:21 AM   #21
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Running Firefox as root poses no problem to an ordinary user's home, if the X session was started as root. Otherwise, trouble like Shadow_7 describes is to be expected.

Creating a new user to see if it solves the original lagging problem is a good idea, but it won't solve problems created by the original user running Firefox as root. To confirm that all root owned files in the normal user's home have been eradicated is fairly easy using the OFM MC (Midnight Commander), which lists files the same way as 'ls -l' does, so root-owned files will jump in your face if they exist, while MC makes easy to navigate through the home tree looking to see that all files and directories are properly owned.

Does that Haswell laptop have both Intel and NVidia video? IIUC, that combination wants a special video driver that won't install by default, Bumblebee or Optimus.

If there is only Intel, uninstalling the Intel video driver will result in the 1.18.4 server falling back to the integral modesetting driver, which works just fine on my Haswell, and might solve the original problem.
 
Old 08-28-2016, 03:45 AM   #22
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 mrmazda View Post
Running Firefox as root poses no problem to an ordinary user's home, if the X session was started as root.
wasn't:
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.
 
Old 08-28-2016, 04:06 AM   #23
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
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.
What sequence of events is transpiring here is clear as mud. How exactly are these different browser versions being started up? It sounds like these are simultaneous and need --no-remote switches or envar NO_REMOTE=1.
 
Old 08-28-2016, 06:37 AM   #24
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Quote:
Originally Posted by mrmazda View Post
Running Firefox as root poses no problem to an ordinary user's home, if the X session was started as root. Otherwise, trouble like Shadow_7 describes is to be expected.
It's normally a problem if you run it as root and are IN the ordinary user's home path. Like if you use "su" instead of "su - root" to become root as that ordinary user. Not normally an issue if the user ran firefox first. But if the first user to run firefox from that path was root and not the user, issues. Probably not the issue in this case.

$ groups

If you're not in the "video" group, you can't use GPU acceleration. Which would make things slower. Also if you don't have internet access I've found that firefox launch time is extremely slow. Since my internet was down several hours on friday evening (storm). And bringing up said browser to reboot the router over it's webby interface was painful. It didn't used to be this way.
 
Old 08-28-2016, 09:59 AM   #25
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by mrmazda View Post
...if the X session was started as root...
Quote:
Originally Posted by Shadow_7 View Post
It's normally a problem if you run it as root and are IN the ordinary user's home path. Like if you use "su" instead of "su - root" to become root as that ordinary user....
When you start an X session as root, it doesn't matter where you start an X application from. The only settings that will be used for the root X session are those in /root/. It works the same way as for normal users, other than root's homedir isn't a subdir of /home/. When you are in a normal user's X session already and use su, all bets are off, because you didn't start the X session as root, and thus can expect file ownership trouble.
 
Old 08-28-2016, 12:23 PM   #26
ForumBot
LQ Newbie
 
Registered: Jul 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by IsaacKuo View Post
I think, then, that there may be something going on with X, where the regular user has insufficient rights for hardware accelerated graphics or something. I'm afraid I do not know how to troubleshoot X issues like this.

You could try creating a new regular user and see if the new user has similar issues. If nothing else, creating a new regular user will give you a "sand box" for experimenting with potential fixes or trying to duplicate an issue.
Thank you for the response.

I created a new user with useradd -m temp. When I ran su temp and then startx, sXorg would not start and produced produced the error at http://textuploader.com/58gra. When I logged out and logged in as temp, startx ran without errors except for occasionally outputting, "(firefox:9348_: Gtk-CRITICAL **: gtk_clipboard_set_with_data: assertion 'targets != NULL' failed." I didn't notice a change in speed between running Firefox as temp, lithoria, and before and after the error was outputted.

I will now give more details about Firefox's performance. On rare occasions, displaying typing and opening new tabs is done almost instantaneously when running as temp. I have noticed opening new tabs being displayed almost instantaneously when running Firefox as lithoria, but I haven't seen typing being displayed almost instantaneously when running as lithoria. This may be due to its rarity. Aside from these occasions, when I start typing into the search box, no text is displayed until I stop typing text for roughly two seconds, which results in all text being displayed. It takes roughly one second for the display to update after opening or closing a tab. It takes 20-30 seconds for the display to updated after highlighting text. It takes roughly 50 seconds for the display to update after pressing a menu item in the Firefox preferences pages. It takes roughly one second for the widgets on the top right corner of the screen to be highlighted when moused over. It took 19 seconds for the display to be updated after clicking on the drop-down list in Firefox's search preferences page.
 
Old 08-28-2016, 12:36 PM   #27
ForumBot
LQ Newbie
 
Registered: Jul 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
What sequence of events is transpiring here is clear as mud. How exactly are these different browser versions being started up? It sounds like these are simultaneous and need --no-remote switches or envar NO_REMOTE=1.
The events happened in this order:
* I ran startx as lithoria
* From within Ratpoison, I ran su root to log in as root.
* From within the above terminal, as root, I ran firefox.
* I opened a new terminal without closing the other one.
* In the new terminal I was already lithoria, so I ran firefox.
* Firefox updated the display quickly.
 
Old 08-28-2016, 12:53 PM   #28
ForumBot
LQ Newbie
 
Registered: Jul 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Shadow_7 View Post
It's normally a problem if you run it as root and are IN the ordinary user's home path. Like if you use "su" instead of "su - root" to become root as that ordinary user. Not normally an issue if the user ran firefox first. But if the first user to run firefox from that path was root and not the user, issues. Probably not the issue in this case.

$ groups

If you're not in the "video" group, you can't use GPU acceleration. Which would make things slower. Also if you don't have internet access I've found that firefox launch time is extremely slow. Since my internet was down several hours on friday evening (storm). And bringing up said browser to reboot the router over it's webby interface was painful. It didn't used to be this way.
Thank you for the response.

I have Internet access.

I edited /etc/group to add lithoria to the video group, which lithoria was not currently in. I didn't notice any changes in Firefox's speed.
 
Old 08-28-2016, 01:22 PM   #29
ForumBot
LQ Newbie
 
Registered: Jul 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
To confirm that all root owned files in the normal user's home have been eradicated is fairly easy using the OFM MC (Midnight Commander), which lists files the same way as 'ls -l' does, so root-owned files will jump in your face if they exist, while MC makes easy to navigate through the home tree looking to see that all files and directories are properly owned.
I used ls -lR to look through all files in /home/lithoria other than those in documents, downloads, and archive, which only contain personal files. All files had owners and owner groups of lithoria.

[QUOTE=mrmazda;5597203]Does that Haswell laptop have both Intel and NVidia video? IIUC, that combination wants a special video driver that won't install by default, Bumblebee or Optimus.[\QUOTE]

AFAIK my laptop only has Intel, but I don't know how to verify this.

[QUOTE=mrmazda;5597203]If there is only Intel, uninstalling the Intel video driver will result in the 1.18.4 server falling back to the integral modesetting driver, which works just fine on my Haswell, and might solve the original problem.[\QUOTE]

I had the package xf86-video-intel. I uninstalled it. After doing so, Firefox updated the display quickly when run as a normal user. Thank you. Do you know why uninstalling it fixed the problem? Presumably it's because it stopped Firefox from using the driver, but I don't know why that fixed the problem.
 
Old 08-28-2016, 01:40 PM   #30
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by Shadow_7 View Post
AFAIK my laptop only has Intel, but I don't know how to verify this.
'lspci | grep VGA' should be sufficient to see if there is more than just Intel.

Quote:
Quote:
Originally Posted by mrmazda View Post
If there is only Intel, uninstalling the Intel video driver will result in the 1.18.4 server falling back to the integral modesetting driver, which works just fine on my Haswell, and might solve the original problem.
I had the package xf86-video-intel. I uninstalled it. After doing so, Firefox updated the display quickly when run as a normal user. Thank you. Do you know why uninstalling it fixed the problem? Presumably it's because it stopped Firefox from using the driver, but I don't know why that fixed the problem.
Some hardware exposes bugs that other hardware doesn't. This provides an overview, but doesn't help with why Firefox only as normal user. Someone in a Mozilla-specific forum, e.g. on IRC, might be able to provide insight.

Last edited by mrmazda; 08-28-2016 at 04:19 PM.
 
  


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 03:02 PM.

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