Siduction Forum

Siduction Forum => Software - Support => Topic started by: finotti on 2016/07/24, 11:26:10

Title: Firefox slow after DU [Solved]
Post by: finotti on 2016/07/24, 11:26:10
Dear all,

After a recent DU, Firefox is incredibly slow, for instance, when scrolling it lags almost a second before the page actually moves.


I created a new user, using Firefox fresh with no plugins, in a plain HTML page (no scripts, flash, ads, nothing) and I still have this problem.  I tried it in Plasma and in fluxbox, with the same result.  The memory and CPU usages do not go high when using Firefox.


Chromium runs just fine.


This started happening right after a recent DU.  Here are my logs for that DU: http://paste.siduction.org/20160724090508


I suspected the new xorg-core, but I see no errors in Xorg.0.log: http://paste.siduction.org/20160724090732


Since a new kernel also came, I also tried an older kernel, but it did not help.  (I see no kernel.log in /var/log/.  Is that normal?)


I have no idea where else to look for problems.


Here is some info on the laptop:


Code: [Select]
e7440[~]$ inxi -v 3
System:    Host: e7440 Kernel: 4.6.2-towo.2-siduction-amd64 x86_64 (64 bit gcc: 6.1.1)
           Desktop: KDE Plasma 5.6.5 (Qt 5.6.1)
           Distro: siduction 15.1.0 Paint It Black - kde - (201601162135)
Machine:   System: Dell (portable) product: Latitude E7440 v: 00
           Mobo: Dell model: 07F3F4 v: A00 Bios: Dell v: A17 date: 12/01/2015
Battery    BAT0: charge: 64.4 Wh 128.0% condition: 50.3/64.4 Wh (78%)
           model: SMP DELL 909H538 status: Full
CPU:       Dual core Intel Core i7-4600U (-HT-MCP-) cache: 4096 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10778
           clock speeds: max: 3300 MHz 1: 1245 MHz 2: 2099 MHz 3: 1338 MHz 4: 2083 MHz
Graphics:  Card: Intel Haswell-ULT Integrated Graphics Controller bus-ID: 00:02.0
           Display Server: X.Org 1.18.4 drivers: (unloaded: fbdev,vesa) Resolution: 1920x1080@60.02hz
           GLX Renderer: Mesa DRI Intel Haswell Mobile
           GLX Version: 3.0 Mesa 11.2.2 Direct Rendering: Yes
Network:   Card-1: Intel Ethernet Connection I218-LM
           driver: e1000e v: 3.2.6-k port: f080 bus-ID: 00:19.0
           IF: eno1 state: down mac: 34:e6:d7:19:d5:4d
           Card-2: Intel Wireless 7260 driver: iwlwifi bus-ID: 02:00.0
           IF: wlp2s0 state: up mac: 48:51:b7:67:5b:a1
Drives:    HDD Total Size: 256.1GB (44.3% used) ID-1: model: SAMSUNG_SSD_PM85
Info:      Processes: 231 Uptime: 6:30 Memory: 2989.7/7895.6MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0 Client: Shell (bash 4.3.461) inxi: 2.3.0


Any help would be greatly appreciated.


Best to all,


Luis


P.S.: I thought of putting this on Upgrade Warnings, but since I am the only one who seems to be having this problem, I thought maybe Software would be better.  Mods, feel free to move this if it seems appropriate.
Title: Re: Firefox slow after DU
Post by: musca on 2016/07/24, 12:06:05
Hello finotti,

kernel 4.6 enabled Frame-Buffer Compression (FBC) in the intel driver again by default on Haswell and Broadwell GPUs.

You can try to boot with disabled FBC by adding the cheat code "i915.enable_fbc=0" to the linux cmdline (Press "e" in grub menu). If it works you can permanently add it to your modules options.

greetings
musca
Title: Re: Firefox slow after DU
Post by: finotti on 2016/07/24, 12:34:04
Thanks, Musca, for the very quick reply!


Is there a place where to put the code in grub screen (after "e")?  Make a new line with it?


Also, to make it permanent (if it works), is it in /etc/default/grub in GRUB_CMDLINE_LINUX_DEFAULT?


Thanks again,


Luis
Title: Re: Firefox slow after DU
Post by: devil on 2016/07/24, 12:50:49
I cannot confirm this behaviour on two machines. Firefox and Okular are as fast as usual.


greetz
devil

Title: Re: Firefox slow after DU
Post by: finotti on 2016/07/24, 13:16:19
Thanks, Musca, for the very quick reply!


Is there a place where to put the code in grub screen (after "e")?  Make a new line with it?


Also, to make it permanent (if it works), is it in /etc/default/grub in GRUB_CMDLINE_LINUX_DEFAULT?


Thanks again,


Luis


OK, tried both with no result.  Also, an old 4.4 kernel (original from the last release) did not help.


I cannot confirm this behaviour on two machines. Firefox and Okular are as fast as usual.


greetz
devil




Thanks, devil.  I was pretty sure it was not a common issue as it is not subtle at all.  It makes Firefox unusable.


If anyone has any ideas or suggestions, it would be really appreciated...


Best to all,


Luis
Title: Re: Firefox slow after DU
Post by: devil on 2016/07/24, 14:22:44
Try with a new empty profile. If that works fine, you have cruft in your profile.


greetz
devil
Title: Re: Firefox slow after DU
Post by: finotti on 2016/07/24, 14:30:40
Try with a new empty profile. If that works fine, you have cruft in your profile.


greetz
devil


Thanks again, devil.  I tried a new user with a new default profile (even under fluxbox) and had the same problem.  But thanks for the suggestion!
Title: Re: Firefox slow after DU
Post by: piper on 2016/07/24, 16:08:16
See if this helps

Code: [Select]
apt install sqlite3
close firefox, as user

Code: [Select]
find ~/.mozilla/firefox/ -type f -name "*.sqlite" -exec sqlite3 {} VACUUM \;
also make sure Enable multi-process is disabled (if in your build)

Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 ID:20160722030235 CSet: e0bc88708ffed39aaab1fbc0ac461d93561195de
Title: Re: Firefox slow after DU
Post by: finotti on 2016/07/24, 18:41:29
See if this helps

Code: [Select]
apt install sqlite3
close firefox, as user

Code: [Select]
find ~/.mozilla/firefox/ -type f -name "*.sqlite" -exec sqlite3 {} VACUUM \;
also make sure Enable multi-process is disabled (if in your build)

Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 ID:20160722030235 CSet: e0bc88708ffed39aaab1fbc0ac461d93561195de


Thanks, Piper, but still did not work...
Title: Re: Firefox slow after DU
Post by: buhtz on 2016/07/24, 20:23:51
I have similar problems.

I installed a fresh Siduction Xfce and did a d-u. I tried scrolling in FF with mouse-wheel, dragging the scrollbar and with arrow keys. Allways the same. My old profile (with addblocker) and on a absolute fresh profile (without any addon). I tried kernel 4.4 and 4.6. Nothing changed.

Other applications scrollbehaviour is without problems and quite smooth.

I tried the "i915.enable_fbc=0" option. I check if it is correct set with "cat /proc/cmdline". Checked!
And it is on:
$ sudo cat /sys/module/i915/parameters/enable_fbc
0

But the problem is still there.
Title: Re: Firefox slow after DU
Post by: finotti on 2016/07/25, 04:28:23
I have similar problems.

I installed a fresh Siduction Xfce and did a d-u. I tried scrolling in FF with mouse-wheel, dragging the scrollbar and with arrow keys. Allways the same. My old profile (with addblocker) and on a absolute fresh profile (without any addon). I tried kernel 4.4 and 4.6. Nothing changed.

Other applications scrollbehaviour is without problems and quite smooth.

I tried the "i915.enable_fbc=0" option. I check if it is correct set with "cat /proc/cmdline". Checked!
And it is on:
$ sudo cat /sys/module/i915/parameters/enable_fbc
0

But the problem is still there.


I am sorry to hear you are having the same problem...  Are you also having problems playing video?  For me youtube or local videos are playing a bit rough (opposite of smooth).  I am not sure if it is related...
Title: Re: Firefox slow after DU
Post by: piper on 2016/07/25, 09:43:20
Curious, in

Code: [Select]
about:preferences#advanced 

are both these

Code: [Select]
Use autoscrolling
Use smooth scrolling

unchecked ?

Also, what happens if you enable/disable

Code: [Select]
Use hardware acceleration when available
Title: Re: Firefox slow after DU
Post by: dibl on 2016/07/25, 12:00:29

Chromium runs just fine.



If this is true for videos and scrolling the same pages that are problematic for Firefox, then I don't see how the problem can be any deeper than Firefox and its configurations.  Do VLC or other video players work correctly?
Title: Re: Firefox slow after DU
Post by: towo on 2016/07/25, 12:25:36
Maybe it's Xserver related. For now, debian is using modesetting DDX instead of intel-DDX for most intel graphics.
Please have a look in your x-log, which driver is used.
Title: Re: Firefox slow after DU
Post by: finotti on 2016/07/26, 01:35:32

Firstly, thanks all for the support!

Curious, in

Code: [Select]
about:preferences#advanced 

are both these

Code: [Select]
Use autoscrolling
Use smooth scrolling

unchecked ?

Also, what happens if you enable/disable

Code: [Select]
Use hardware acceleration when available


I've tried them all and did not notice a difference.



Chromium runs just fine.



If this is true for videos and scrolling the same pages that are problematic for Firefox, then I don't see how the problem can be any deeper than Firefox and its configurations.  Do VLC or other video players work correctly?


So, the scrolling problem is really bad in Firefox, but not bad at all with Chromium.  The problems with video happen  in Chrome too, as well as local files with vlc, mpv, smplayer and dragon player.  So, I think it is really an Xorg problem.   Even switching virtual desktops is not very smooth anymore.

Maybe it's Xserver related. For now, debian is using modesetting DDX instead of intel-DDX for most intel graphics.
Please have a look in your x-log, which driver is used.




My Xorg.0.log is posted above (here too: http://paste.siduction.org/20160724090732).  I cannot find ddx in it at all.  Searching for "driver" I see:


Code: [Select]
[ 22276.162] (II) modeset(0): [DRI2]   DRI driver: i965
[ 22276.162] (II) modeset(0): [DRI2]   VDPAU driver: i965


Does that help?


Thanks again,


Luis
Title: Re: Firefox slow after DU
Post by: towo on 2016/07/26, 06:49:00
So your system is indeed using modesetting. If you want to check, if this is the culprint, you can make an


/etc/X11/xorg.conf.d/20-intel.conf which contains


Code: [Select]

Section "Device"
Identifier "My GPU"
Driver "intel"
EndSection


Then restart X and look, if the issue is gone.
Title: Re: Firefox slow after DU
Post by: piper on 2016/07/26, 10:11:10
If towo's advise don't work for you, can you please use paste and paste the output of

Code: [Select]
about:support
use the

Code: [Select]
copy text to clipboard
and paste it all


my basics


Code: [Select]
Application Basics
------------------

Name: Firefox
Version: 50.0a1
Build ID: 20160724030208
Update Channel: nightly
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
OS: Linux 4.6.4-towo.1-siduction-amd64
Multiprocess Windows: 0/1 (Disabled)
Safe Mode: false
Title: Re: Firefox slow after DU
Post by: Miho on 2016/07/27, 17:45:15
towo's advise works for me - thx!
Title: Re: Firefox slow after DU
Post by: finotti on 2016/07/27, 18:21:22
It seems to work for me too, but I can't test it very well now.  I will do it this weekend and mark it as solved if it is indeed.
Title: Re: Firefox slow after DU [Solved]
Post by: finotti on 2016/07/28, 14:54:23
Indeed, problem solved!  Thanks towo and all for the great support!
Title: Re: Firefox slow after DU
Post by: buhtz on 2016/07/30, 13:40:20
So your system is indeed using modesetting. If you want to check, if this is the culprint, you can make an

/etc/X11/xorg.conf.d/20-intel.conf which contains
Code: [Select]

Section "Device"
   Identifier "My GPU"
   Driver "intel"
EndSection
The issue is gone. Thank you very much!

But could you please explain your solution?

I understand that there is a different "mode" in X. There is no need (for me) to understand that in details.
But what I want to understand is why this simple text-file here (de)activate that mode.

Does this modify a setting int he Debians own (new) intel driver. Or does this totaly switch to the old intels-own driver?

btw:
Firefox use Gecko, right?
There are similar problems with WebKit, too. https://bugs.freedesktop.org/show_bug.cgi?id=85064 (https://bugs.freedesktop.org/show_bug.cgi?id=85064)
Title: Re: Firefox slow after DU [Solved]
Post by: finotti on 2016/08/10, 17:11:32
I think that the intel driver wasn't being loaded (see the output of inxi in the original post) before.  The config file simply told the system to us the intel drive.

But I could be wrong...
Title: Re: Firefox slow after DU [Solved]
Post by: musca on 2016/08/11, 22:58:41
yes, it is right.

formerly there has been a separate driver package xserver-xorg-video-modesetting.
Some time ago this driver has been integrated into the xserver-xorg-core package.

Now the automatic detection was changed so modesetting is used for intel devices.
~$ zless /usr/share/doc/xserver-xorg-core/NEWS.Debian.gz
xorg-server (2:1.18.3-2) unstable; urgency=medium

  X now defaults to using built-in modesetting video driver on Intel
  hardware which is "4th gen GMA" and newer, so roughly speaking on hardware
  from 2007 and up. If this triggers new bugs on your hw, please file them
  against the xserver.

  Continuing to use the -intel driver is possible by dropping the template
  xorg.conf to /etc/X11:

  # cp /usr/share/doc/xserver-xorg-video-intel/xorg.conf /etc/X11

 -- Timo Aaltonen <tj...on@debian.org>  Tue, 19 Jul 2016 04:28:05 +0300


There is an explanation on Timo's blog (https://tjaalton.wordpress.com/2016/07/23/intel-graphics-gen4-and-newer-now-defaults-to-modesetting-driver-on-x/).

The mentioned the template should be included in the xserver-xorg-video-intel package - I can't find it.

greetings,
musca
Title: Re: Firefox slow after DU [Solved]
Post by: der_bud on 2016/08/12, 10:01:31
... should be included in the xserver-xorg-video-intel package - I can't find it. ...
Seems to be a funny bug. Here too, reinstalling xserver-xorg-video-intel does not create that template xorg.conf. But regarding  https://packages.debian.org/en/sid/amd64/xserver-xorg-video-intel/filelist it is in the file list. So I downloaded the *.deb file and opened it with an archive manager, there is '...data.tar.xz\data.tar\.\usr\share\doc\xserver-xorg-video-intel\xorg.conf', but it does not get installed.
Title: Re: Firefox slow after DU [Solved]
Post by: musca on 2016/08/12, 11:03:35
Hello der_bud,

siduction/fixes includes a package which doesn't provide the file. (cleanup needed? (http://paste.siduction.org/20160812131326))
The debian package is installable with:
Code: [Select]
apt-get install xserver-xorg-video-intel=2:2.99.917+git20160706-1
The original content is:
musca@sidbox:~$ cat /usr/share/doc/xserver-xorg-video-intel/xorg.conf
Section "Device"
    Identifier "Intel"
    Driver "intel"
#    Option "AccelMethod" "uxa"
EndSection

SNA (Sandybridge New Acceleration) is its default mode.
UXA (Universal Xcceleration Architecture) might be worth a try. Just uncomment the line.
Users can create this configuration file with:
Code: [Select]
mkdir-p /etc/X11/xorg.conf.d \
 && echo -e "\nSection \"Device\"\n    Identifier \"Intel\"\n    Driver \"intel\"\n#    Option \"AccelMethod\" \"uxa\"\nEndSection" >> /etc/X11/xorg.conf.d/20-intel.conf

greetings
musca
Title: Re: Firefox slow after DU [Solved]
Post by: musca on 2016/08/12, 15:00:42
Hello der_bud,

cleanup is neccessary, because in April intel had tagged the driver in git as version 2.99.918 but withdrawn to 917 later.

If you experience any problems with the intel driver we suggest to purge and install the intel driver,
Code: [Select]
apt update && apt purge xserver-xorg-video-intel && apt install xserver-xorg-video-intel
or just downgrade to the current version, e.g. :
Code: [Select]
apt install xserver-xorg-video-intel=2:2.99.917+git20160706-1
greetings
musca