You are not logged in.

#1 2019-02-01 22:37:03

mr.buffed
Member
Registered: 2018-10-05
Posts: 19

[SOLVED] UI of specific applications lag Laptop connected via dock

Hi there everyone,

recently I noticed a strange problem with my up to date laptop. I'm running arch on a ThinkPad X1 Carbon 6gen and everything works fine. However, the applications signal-desktop and skypeforlinux have significant delay, i.e., when I click a UI element it takes between 3-5 seconds until the application reacts. This holds for key strokes, too. At first I thought that this might be related to the underlying framework, which I guess is Electron. Therefore, I asked on the signal package for someone with the same problems and got redirected to this  github issue.

Only yesterday I noticed that when I use my laptop without being connected to the dock, both applications work without the mentioned delay. Thus, the delay must be somehow related to the dock. What is strange is that all other applications as, for example, firefox, work without any delay.

The dock I am using is this one and I had to install displaylink in order to make it work. See this thread for how I figured out how to make it work.

As I am relatively new to arch I am somehow lost what to look for in order to debug this problem. So if anyone of you has any hints I'd be very grateful!

Cheers and thanks in advance for your help
mr.buffed

Last edited by mr.buffed (2019-02-04 14:13:43)

Offline

#2 2019-02-01 23:23:53

seth
Member
Registered: 2012-09-03
Posts: 51,312

Re: [SOLVED] UI of specific applications lag Laptop connected via dock

Maybe rather power supply related (so if it detects AC it figures it can burn the CPU a bit w/ some superfluous animations etc)?
What leads to the prime question: is there an impact on CPU/RAM usage depending on the dock connection state?
What is the CPU clock frequency w/ and w/o the dock? (https://wiki.archlinux.org/index.php/CP … cy_scaling)

Online

#3 2019-02-03 21:33:10

mr.buffed
Member
Registered: 2018-10-05
Posts: 19

Re: [SOLVED] UI of specific applications lag Laptop connected via dock

I just checked via top (let me know if there's a better way) whether CPU and MEM load differs for the signal-desktop application w/ and w/o the dock. However, in both cases the CPU load is between 1 - 5% and the application consumes 0.5 - 3.4% MEM.

I checked the CPU frequency via cpupower w/ and w/o the dock and got the following results.

W/ dock:

> cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.00 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.00 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 800 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

W/o dock:

> cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.00 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.00 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 800 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

At least for me it looks as if there is no difference yet. However, immediately after disconnecting the dock, the signal application worked fluently and smooth.

Do you have any further ideas?

Offline

#4 2019-02-03 21:57:06

seth
Member
Registered: 2012-09-03
Posts: 51,312

Re: [SOLVED] UI of specific applications lag Laptop connected via dock

Do you use different input/output devices along the dock (ext. monitor, mouse/keyboard)?
What if you create soem continuous screen update near the supposed reaction area in signal (eg. run glxgears, make sure the gears are in sight eg. by bringing them always on top of other windows)

Online

#5 2019-02-04 12:26:56

mr.buffed
Member
Registered: 2018-10-05
Posts: 19

Re: [SOLVED] UI of specific applications lag Laptop connected via dock

Yes, I use two external monitors connected to the dock via displaylink as well as an external keyboard and an external mouse. Running glxgears shows the problem very well:

> glxgears
6 frames in 6.0 seconds =  1.000 FPS
6 frames in 6.0 seconds =  1.000 FPS
--- unplugged laptop from dock ---
171 frames in 5.0 seconds = 34.148 FPS
301 frames in 5.0 seconds = 60.013 FPS

I think I'm getting something wrong here, but why is the low frame rate only a problem for some and not all applications, when I'm running my laptop via the dock? Is this probably related to my GPU or the installed drivers?

Thanks so far for your help!

Offline

#6 2019-02-04 12:42:38

seth
Member
Registered: 2012-09-03
Posts: 51,312

Re: [SOLVED] UI of specific applications lag Laptop connected via dock

Could be a swapping issue (bad vsync assumption) -> "glxinfo"?

Online

#7 2019-02-04 13:14:24

mr.buffed
Member
Registered: 2018-10-05
Posts: 19

Re: [SOLVED] UI of specific applications lag Laptop connected via dock

I run glxinfo and got the following output but do not know where to look for a swapping issue.

Last edited by mr.buffed (2019-02-04 13:45:53)

Offline

#8 2019-02-04 13:28:50

seth
Member
Registered: 2012-09-03
Posts: 51,312

Re: [SOLVED] UI of specific applications lag Laptop connected via dock

You don't, i needed to know HW & driver.

__GL_SYNC_TO_VBLANK=0 vblank_mode=0 glxgears

Just setting vblank_mode should do (__GL_SYNC_TO_VBLANK is nvidia) and you can make this permanent:
https://wiki.archlinux.org/index.php/In … on_(VSYNC)

The result should be that at least the undocked glxgears rises far above 60fps, check the docked version and in case of success, apply the value to Signal.

Online

#9 2019-02-04 13:45:16

mr.buffed
Member
Registered: 2018-10-05
Posts: 19

Re: [SOLVED] UI of specific applications lag Laptop connected via dock

Awesome, that fixed my problem, i.e., it works fluently when connected to the dock! Is it correct to add the application-tags with the value "Default" to the .drirc file (as in the link you provided) or shall I change it to something like this

<device screen="0" driver="dri2">
	<application name="signal-desktop">
		<option name="vblank_mode" value="0"/>
	</application>
	<application name="skypeforlinux">
		<option name="vblank_mode" value="0"/>
	</application>
</device>

such that it only affects the corresponding applications?

Thank you so much for your help!

Last edited by mr.buffed (2019-02-04 13:47:05)

Offline

#10 2019-02-04 14:02:46

seth
Member
Registered: 2012-09-03
Posts: 51,312

Re: [SOLVED] UI of specific applications lag Laptop connected via dock

Since the dock seems to garble the refresh rate, I'd rather go w/ a Default and alter that depending on whether the dock is attached (udev rule possible?) to hit all clients since they'll all suffer from this (unless you're willing to get fragged for money ;-)

Online

#11 2019-02-04 14:12:50

mr.buffed
Member
Registered: 2018-10-05
Posts: 19

Re: [SOLVED] UI of specific applications lag Laptop connected via dock

That's a good point! Thank you so much again for your help, works flawless now!

Offline

Board footer

Powered by FluxBB