Lag in window movement

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Huuhkaja
Level 1
Level 1
Posts: 9
Joined: Sun Jun 24, 2018 2:11 am

Lag in window movement

Post by Huuhkaja » Sun Jun 24, 2018 2:25 am

Hello all

I've been at this for a few days now trying to figure it out, but i can't seem to make it go away completely. And it seems this has been a bit of a problem for quite some time now.

Code: Select all

System:    Host: Timo-Kotikone Kernel: 4.17.2-041702-generic x86_64
           bits: 64 gcc: 7.3.0
           Desktop: Xfce 4.12.3 (Gtk 2.24.31) Distro: Linux Mint 19 Tara
Machine:   Device: desktop Mobo: ASUSTeK model: Z170 PRO GAMING v: Rev X.0x serial: N/A
           UEFI: American Megatrends v: 3805 date: 05/16/2018
CPU:       Quad core Intel Core i5-6600K (-MCP-) 
           arch: Skylake-S rev.3 cache: 6144 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 28032
           clock speeds: max: 4300 MHz 1: 800 MHz 2: 800 MHz 3: 800 MHz
           4: 800 MHz
Graphics:  Card: NVIDIA GM204 [GeForce GTX 970] bus-ID: 01:00.0
           Display Server: x11 (X.Org 1.19.6 ) driver: nvidia
           Resolution: 1920x1080@144.00hz, 1920x1200@59.95hz
           OpenGL: renderer: GeForce GTX 970/PCIe/SSE2
           version: 4.6.0 NVIDIA 396.24.02 Direct Render: Yes
Audio:     Card-1 NVIDIA GM204 High Def. Audio Controller
           driver: snd_hda_intel bus-ID: 01:00.1
           Card-2 Intel Sunrise Point-H HD Audio
           driver: snd_hda_intel bus-ID: 00:1f.3
           Card-3 SteelSeries ApS driver: USB Audio usb-ID: 001-005
           Sound: Advanced Linux Sound Architecture v: k4.17.2-041702-generic
Network:   Card-1: Intel Ethernet Connection (2) I219-V
           driver: e1000e v: 3.2.6-k bus-ID: 00:1f.6
           IF: enp0s31f6 state: down mac: <filter>
           Card-2: Broadcom Limited BCM4360 802.11ac Wireless Network Adapter
           driver: wl bus-ID: 03:00.0
           IF: wlp3s0 state: up mac: <filter>
Drives:    HDD Total Size: 766.0GB (7.7% used)
           ID-1: /dev/sda model: Samsung_SSD_850 size: 250.1GB
           ID-2: /dev/sdb model: WDC_WD5000AAKX size: 500.1GB
           ID-3: USB /dev/sdc model: Transcend_16GB size: 15.8GB
Partition: ID-1: / size: 314G used: 56G (19%) fs: ext4 dev: /dev/sdb5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 29.8C mobo: 27.8C gpu: 0.0:54C
           Fan Speeds (in rpm): cpu: 0
Info:      Processes: 211 Uptime: 18 min Memory: 1894.9/15981.6MB
           Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56 
So first in Cinnamon the lag was so bad that when i moved a window, everything else would stop. Like a youtube video was playing and i moved a window and the video would stop until i stopped moving the window. The actual window wasn't really following the mouse at all until i released it. Started messing with all kinds of different things that i found on google. modeset drm=1 for nvidia, pipeline and full pipeline. disabling the vblank and flipping, setting nvidia to max performance on boot, disabling effects and grid snapping and what not. Updated nvidia drivers from 390 to 396, updated kernel from 4.15 -> 4.17.2, updated bios, installed gnome, mate and xfce. xfce is now the one that is the most "ok" but there is still a lag in window movement and i still gotta figure out how to install stuff to xfce like the menu that was in cinnamon and all the others (windows key -> start typing is in the muscle memory and it's not working atm). If you grap a window and move it slowly, you can see that mouse cursor moves first and window comes after.

Gaming performance on steam in f.ex Tomb Raider benchmark gives me on ultimate settings at 1080p an average of 55fps, min ~40fps, max 60-70fps so that's good atleast. It's just the day to day use while watching a youtube video and doing stuff, that minor stutter/lag starts get to you when it wasn't there on Windows 10.

Code: Select all

top - 09:22:40 up 32 min,  1 user,  load average: 2,17, 1,83, 1,63
Tasks: 224 total,   4 running, 166 sleeping,   0 stopped,   0 zombie
%Cpu(s): 14,7 us, 21,2 sy,  0,0 ni, 61,7 id,  0,0 wa,  0,0 hi,  2,4 si,  0,0 st
KiB Mem : 16365176 total, 10803056 free,  2476884 used,  3085236 buff/cache
KiB Swap:  2097148 total,  2097148 free,        0 used. 13903836 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND     
 6528 root      20   0  430392  97784  67680 R  70,4  0,6   1:47.61 Xorg        
 7565 timo      20   0 2281424 583316 140424 S  27,6  3,6   9:30.45 Web Content 
 7407 timo      20   0 3021696 493912 198428 S  22,9  3,0   7:27.30 firefox     
 6747 timo      20   0  273432  50168  36436 R   9,3  0,3   0:49.40 xfwm4       
 7660 timo      20   0 1728576 234496 111860 S   3,7  1,4   1:45.71 Web Content 
 6756 timo      20   0 1333496 108252  78280 S   3,0  0,7   0:03.08 WhatsApp    
 6753 timo      20   0  498376  35100  27748 S   2,3  0,2   0:00.61 Thunar      
 7159 timo      20   0  604176 173100 119572 S   2,3  1,1   0:47.20 steam       
 6751 timo      20   0  385580  31328  23944 S   2,0  0,2   0:01.25 xfce4-panel 
 6755 timo      20   0  698352  78512  41900 R   2,0  0,5   0:01.02 xfdesktop   
 6809 timo       9 -11 2098864  12912   9004 S   2,0  0,1   0:25.30 pulseaudio  
  579 root      20   0       0      0      0 S   1,3  0,0   0:37.66 nvidia-mod+ 
 6532 root     -51   0       0      0      0 S   1,3  0,0   0:34.40 irq/130-nv+ 
 8363 timo      20   0 2440448 316284 116644 S   1,0  1,9   0:07.36 thunderbird 
    9 root      20   0       0      0      0 I   0,3  0,0   0:00.96 rcu_sched   
10233 timo      20   0   45400   4260   3532 R   0,3  0,0   0:00.10 top         
    1 root      20   0  159860   9320   6816 S   0,0  0,1   0:01.54 systemd     
that's when i have youtube playing and i was dragging a file manager window around.

If you need any other info, let me know and i'll try and get that info for you guys. Hope i can get this sorted so i can start becoming a full time linux user in my day to day life :P.

Cheers all!

P.s. Really have tried to but effort into switching from windows to linux, spent half a week setting up arch first in virtualbox and after messing up that installation and not being able to fix it, switched to mint and spent rest of the week messing about and got everything working. But ofc being virtualbox, had no idea about the videocard or other performance stuff. Couldn't even get 18.3 live usb stick to boot on this computer so had to use the 19 beta.

Mattyboy
Level 6
Level 6
Posts: 1164
Joined: Thu Mar 26, 2015 2:17 pm

Re: Lag in window movement

Post by Mattyboy » Sun Jun 24, 2018 4:36 am

Hello...

as you know you're using Linux Mint 19 Tara, which is still in beta.

If you read through, maybe there's to many, the comments lots of people are having issues with nvidia cards/drivers. It's, reasonably, expected these issues will be resolved once 19 has an official stable release.

Also you're running a 4.17 kernel version. Mint 19 sits on 4.15.

So combined with using a beta release and using the 'incorrect' kernel ( can't see an obvious reason why you would be using that on your hardware ) problems are bound to happen.

Install Mint 18.3, nvidia 384 and stick with the 4.13 Kernel... a Skylake should work on that.

At the very least use 4.15 if you need to stick with 19.

EDIT: Actually you might do better with Ubuntu 18.04, its officially released and runs on 4.15.... I would go with the MATE version, not a fan of GNOME but that's a preference.

Huuhkaja
Level 1
Level 1
Posts: 9
Joined: Sun Jun 24, 2018 2:11 am

Re: Lag in window movement

Post by Huuhkaja » Sun Jun 24, 2018 5:03 am

As i said, i couldn't even boot 18.3 from the live usb, secure and fast boot disabled from uefi and fast boot disabled from windows. All i got was the text on boot up would stuck with some acpi errors, did try using the acpi disable command on start, didn't help, tried legacy bootin and efi booting and same thing. and that's why i went with 19. I know it's beta.

Also i said that updating the kernel was one of the things i tried to solve this issue with as it was happening with clean install with default recommended drivers and all. Updated the kernel because that was one solution to this problem that someone had success with.

Guess i'll stick with it until release and see what happens but as this window lag issue seems to have been around atleast from 2012 according to threads in various places that i found while investigating i thought there might be some way to fix this.

Mattyboy
Level 6
Level 6
Posts: 1164
Joined: Thu Mar 26, 2015 2:17 pm

Re: Lag in window movement

Post by Mattyboy » Sun Jun 24, 2018 5:19 am

Code: Select all

System:    Host: admin1-To-be-filled-by-O-E-M Kernel: 4.15.0-23-generic x86_64
           bits: 64 gcc: 7.3.0
           Desktop: Cinnamon 3.8.4 (Gtk 3.22.30-1ubuntu1)
           Distro: Linux Mint 19 Tara
Machine:   Device: desktop System: Gigabyte product: N/A serial: N/A
           Mobo: Gigabyte model: G1.SNIPER B7-CF v: x.x serial: N/A
           UEFI: American Megatrends v: F4 date: 11/02/2015
CPU:       Dual core Intel Core i3-6100 (-MT-MCP-) 
           arch: Skylake-S rev.3 cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 14784
           clock speeds: max: 3700 MHz 1: 3400 MHz 2: 3400 MHz 3: 3400 MHz
           4: 3399 MHz
Graphics:  Card: NVIDIA GP106 [GeForce GTX 1060 6GB] bus-ID: 01:00.0
           Display Server: x11 (X.Org 1.19.6 )
           drivers: nvidia (unloaded: modesetting,fbdev,vesa,nouveau)
           Resolution: 1920x1080@60.00hz
           OpenGL: renderer: GeForce GTX 1060 6GB/PCIe/SSE2
           version: 4.6.0 NVIDIA 390.48 Direct Render: Yes
I'm not having issues with Windows lag and the beta works just fine on the recommended software on MY machine.

As I edited above try Ubuntu 18.04. You may need the 4.15 Kernel for your MOBO, not sure, Or, if you wish to stick with Mint 19 go for the MATE version now it'll probably be better, But DO run your machine on 4.15 and get rid of that 4.17 Kernel.

Oh and.. a 'Linux newbie' starting with Arch?.... you were brave :lol:

Good luck buddy. :)

Huuhkaja
Level 1
Level 1
Posts: 9
Joined: Sun Jun 24, 2018 2:11 am

Re: Lag in window movement

Post by Huuhkaja » Sun Jun 24, 2018 7:08 am

Guess next time i build a pc, i'll get together a build that someone has tested with linux to work out of the box. Always when i have tried linux, especially graphics card has been the problem area and has never worked with "just install recommended".

Mattyboy
Level 6
Level 6
Posts: 1164
Joined: Thu Mar 26, 2015 2:17 pm

Re: Lag in window movement

Post by Mattyboy » Sun Jun 24, 2018 7:41 am

Makes sense to use to most modern components you can when building a machine you just have to consider it usually takes around 6 months for Linux to 'catch up' after new chip sets are released.

That being said you need to use Linux, use it correctly, as intended and install the distro's that are already set up for a particular hardware configuration, released 'proper' and don't fiddle if you want everything working without hassles. Ubuntu based disrto's like Mint.

Of course you can have the absolute bleeding edge if that's what you require and that's where something like Arch come's in, you, essentially 'cherry pick' and build the various software components into your OS... but this requires knowledge and time.. lots of it and much like an old car high maintenance.

No guarantees but I suspect Ubuntu 18.04 MATE will work just fine on your machine now, today, and so will Mint 19 once released. Both are built on a new Ubuntu base. It may be even worth even waiting for 19.1. The absolute new of the new is always a trade off. How often did you read complaints about Windows 10 'blue screens' and crashes just after it was released? .... that rubbish is still going on now and that's just one ( bad ) OS.

Huuhkaja
Level 1
Level 1
Posts: 9
Joined: Sun Jun 24, 2018 2:11 am

Re: Lag in window movement

Post by Huuhkaja » Sun Jun 24, 2018 7:59 am

Yeah, windows 10 is a bad OS with all the forced updates and ads and whatnot, but can't say it has ever bsod on me or had any problems with it. Same with vista and 8 and 8.1 that all were horrible crashing bug infested nests, i never had any problems with them :).

Just tested mint 18.3 that i had installed on my laptot that has nvidia gtx570m and i5-2450m and both cinnamon and xfce have the laggy windows as my desktop has...so stable is stable yea. This is something else than mere beta vs stable thing imo.

Mattyboy
Level 6
Level 6
Posts: 1164
Joined: Thu Mar 26, 2015 2:17 pm

Re: Lag in window movement

Post by Mattyboy » Sun Jun 24, 2018 9:06 am

Huuhkaja wrote:
Sun Jun 24, 2018 7:59 am
Yeah, windows 10 is a bad OS with all the forced updates and ads and whatnot, but can't say it has ever bsod on me or had any problems with it. Same with vista and 8 and 8.1 that all were horrible crashing bug infested nests, i never had any problems with them :).
No need to discuss all the negatives about Windows 10, preaching to the converted here lol we know its problems but I too have never had issues using it, right from its release, never crashed, updates gone through smoothly ( regardless of wanting them or not ), at its core its a pretty good OS and once you drill down into the registry and disable all the bloat and rubbish its fast and skips along nicely on my rig. Its the lack of control that bugs me and the Apple inspired 'Walled garden' direction M$ are pushing it. No wonder Enterprise users are migrating to Linux. Windows 10 stripped down V1 would sell like hot cakes.

Huuhkaja wrote:
Sun Jun 24, 2018 7:59 am
Just tested mint 18.3 that i had installed on my laptot that has nvidia gtx570m and i5-2450m and both cinnamon and xfce have the laggy windows as my desktop has...so stable is stable yea. This is something else than mere beta vs stable thing imo.
I wonder what your expectations are? Cinnamon can be laggy on less powerful machines but xfce should be rocking and rolling ( after running updates and correct drivers ), Drive speeds make a difference too.

Did you do a fresh install for each desktop environment or install another one 'on top'?.... not a good idea that as that's known to cause problems.

Huuhkaja
Level 1
Level 1
Posts: 9
Joined: Sun Jun 24, 2018 2:11 am

Re: Lag in window movement

Post by Huuhkaja » Sun Jun 24, 2018 9:30 am

Fresh installs, laptop has it on ssd and desktop has it on hdd. No difference in performance except cinnamon works better on laptop.

What i'm expecting is when i drag a window to a different place, mouse cursor and the window move at the same time instead of mouse cursor moving first and then window after. First is how it goes in Windows with my hardware.

gm10
Level 5
Level 5
Posts: 763
Joined: Thu Jun 21, 2018 5:11 pm

Re: Lag in window movement

Post by gm10 » Sun Jun 24, 2018 9:32 am

I get that lag you describe when using compositing. You can't disable that in Cinnamon but try switching to e.g. your MATE environment and see if disabling compositing makes a difference (Desktop Settings > Windows > Window Manager).

At to Mint 19 beta and Ubuntu 18.04, Mint 19 builds on top of Ubuntu 18.04 so at the base it's the same thing. And Mint 19 will receive the release label in a few days, anyway, and no changes that would affect anything described here are on the roadmap. That said, Mint doesn't automatically install some drivers that Ubuntu does by default, so might be worth trying out an Ubuntu live USB regardless.

Huuhkaja
Level 1
Level 1
Posts: 9
Joined: Sun Jun 24, 2018 2:11 am

Re: Lag in window movement

Post by Huuhkaja » Sun Jun 24, 2018 10:11 am

Tried that on MATE, didn't help. Also tried it in XFCE by going to the settings editor and under xfwm4 made use_compositing to false and that actually made it worse. windows started to have a tail.

Considering Ubuntu, should i try out Xubuntu since XFCE has worked the best in Mint so far? Last time i installed Ubuntu on my laptop was 17.something and nvidia drivers didn't work at all on that one neither in wayland or xorg so that's why i'm a bit hesitant to spent time on Ubuntu.

gm10
Level 5
Level 5
Posts: 763
Joined: Thu Jun 21, 2018 5:11 pm

Re: Lag in window movement

Post by gm10 » Sun Jun 24, 2018 10:31 am

Might not be compositing for you then (although you could also try compiz, that one works fine for me). Otherwise it will probably have to come down to driver/kernel issues. I'm not getting any UI lag on Mint (except with compton as previously mentioned) and I'm just on old integrated intel graphics on this laptop, so it's not a problem with the desktop environments/window managers as such. I'm wondering if your graphics hardware is being used at all, I guess a bad software emulation could lag you out like that as well. Maybe you can find a hint to what's going on in the xorg logs. Sorry I can't be of more help.

Huuhkaja
Level 1
Level 1
Posts: 9
Joined: Sun Jun 24, 2018 2:11 am

Re: Lag in window movement

Post by Huuhkaja » Sun Jun 24, 2018 10:55 am


gm10
Level 5
Level 5
Posts: 763
Joined: Thu Jun 21, 2018 5:11 pm

Re: Lag in window movement

Post by gm10 » Sun Jun 24, 2018 11:27 am

I'm no expert on this, either, but the 4.15 kernel one has

Code: Select all

[ 23916.918] (EE) AIGLX: reverting to software rendering
so that's definitely the issue there.
The 4.17 one looks to be set up correctly though so unless there's a general incompatibility with that kernel and the nvidia driver I can't say what's wrong, maybe somebody else has an idea.

Huuhkaja
Level 1
Level 1
Posts: 9
Joined: Sun Jun 24, 2018 2:11 am

Re: Lag in window movement

Post by Huuhkaja » Sun Jun 24, 2018 12:33 pm

Also just figured out there is no point in messing about with virtualbox at this moment with different distros as they seem to all go with software rendering since i have no idea how to enable the pcie passthrough at this moment.

Huuhkaja
Level 1
Level 1
Posts: 9
Joined: Sun Jun 24, 2018 2:11 am

Re: Lag in window movement

Post by Huuhkaja » Sun Jun 24, 2018 5:21 pm

Installed Xubuntu 18.04 on a new partition and pretty much the same as it was with my mint setup. Both on mint and xubuntu 'glxgears' gives smooth rotating gears and games on steam run very well. Disabling compositing makes it again worse :). Well, now i'm just gonna leave it as it is and see if anyone comes around and has any idea :D

Code: Select all

System:    Host: Timo-Xubuntu Kernel: 4.15.0-23-generic x86_64
           bits: 64 gcc: 7.3.0
           Desktop: Xfce 4.12.3 (Gtk 2.24.31) Distro: Ubuntu 18.04 LTS
Machine:   Device: desktop Mobo: ASUSTeK model: Z170 PRO GAMING v: Rev X.0x serial: N/A
           UEFI: American Megatrends v: 3805 date: 05/16/2018
CPU:       Quad core Intel Core i5-6600K (-MCP-) 
           arch: Skylake-S rev.3 cache: 6144 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 28032
           clock speeds: max: 4300 MHz 1: 800 MHz 2: 800 MHz 3: 800 MHz
           4: 800 MHz
Graphics:  Card: NVIDIA GM204 [GeForce GTX 970] bus-ID: 01:00.0
           Display Server: x11 (X.Org 1.19.6 ) driver: nvidia
           Resolution: 1920x1080@60.00hz, 1920x1200@59.95hz
           OpenGL: renderer: GeForce GTX 970/PCIe/SSE2
           version: 4.6.0 NVIDIA 390.48 Direct Render: Yes
Audio:     Card-1 NVIDIA GM204 High Def. Audio Controller
           driver: snd_hda_intel bus-ID: 01:00.1
           Card-2 Intel Sunrise Point-H HD Audio
           driver: snd_hda_intel bus-ID: 00:1f.3
           Card-3 SteelSeries ApS driver: USB Audio usb-ID: 001-004
           Sound: Advanced Linux Sound Architecture v: k4.15.0-23-generic
Network:   Card-1: Intel Ethernet Connection (2) I219-V
           driver: e1000e v: 3.2.6-k bus-ID: 00:1f.6
           IF: enp0s31f6 state: down mac: <filter>
           Card-2: Broadcom Limited BCM4360 802.11ac Wireless Network Adapter
           driver: wl bus-ID: 03:00.0
           IF: wlp3s0 state: up mac: <filter>
Drives:    HDD Total Size: 766.0GB (10.3% used)
           ID-1: /dev/sda model: Samsung_SSD_850 size: 250.1GB
           ID-2: /dev/sdb model: WDC_WD5000AAKX size: 500.1GB
           ID-3: USB /dev/sdc model: Transcend_16GB size: 15.8GB
Partition: ID-1: / size: 144G used: 9.0G (7%) fs: ext4 dev: /dev/sdb6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 29.8C mobo: 27.8C gpu: 0.0:51C
           Fan Speeds (in rpm): cpu: 0
Info:      Processes: 198 Uptime: 14 min Memory: 2217.6/15981.6MB
           Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56 

Post Reply

Return to “Newbie Questions”