[SOLVED] VLC takes long time to start.

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
nimantha
Level 1
Level 1
Posts: 13
Joined: Sun Jul 18, 2021 11:54 pm

[SOLVED] VLC takes long time to start.

Post by nimantha »

I installed linux mint 20.2 yesterday and I installed vlc using apt install. VLC 3.0.9.2 is installed. When I open vlc it takes about 20 secs to start everytime. I have used linux mint 20.2 before with vlc but never faced this issue.

When I run it using terminal, I get

Code: Select all

VLC media player 3.0.9.2 Vetinari (revision 3.0.9.2-0-gd4c1aefe4d)
[000055e222299640] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
qt5ct: using qt5ct plugin
qt5ct: D-Bus global menu: no
qt5ct: D-Bus system tray: yes
[000055e222336fc0] main playlist: playlist is empty

The delay happens between qt5ct: using qt5ct plugin and the next line. How to fix this ?

Code: Select all

System:    Host: nimantha-HP-Notebook Kernel: 5.4.0-80-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.0.5 
           wm: muffin 5.0.1 dm: LightDM 1.30.0 Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal 
Machine:   Type: Laptop System: HP product: HP Notebook v: Type1ProductConfigId serial: <superuser/root required> Chassis: 
           type: 10 serial: <superuser/root required> 
           Mobo: HP model: 8135 v: 31.35 serial: <superuser/root required> UEFI [Legacy]: Insyde v: F.1E date: 12/25/2015 
Battery:   ID-1: BAT1 charge: 32.3 Wh condition: 33.8/41.6 Wh (81%) volts: 16.4/14.6 model: Hewlett-Packard PABAS0241231 
           type: Li-ion serial: 41167 status: Unknown 
CPU:       Topology: Dual Core model: Intel Core i3-6100U bits: 64 type: MT MCP arch: Skylake rev: 3 L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 18399 
           Speed: 500 MHz min/max: 400/2300 MHz Core speeds (MHz): 1: 500 2: 499 3: 500 4: 500 
Graphics:  Device-1: Intel Skylake GT2 [HD Graphics 520] vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:1916 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa resolution: 1366x768~60Hz, 1366x768~60Hz 
           OpenGL: renderer: Mesa Intel HD Graphics 520 (SKL GT2) v: 4.6 Mesa 20.2.6 direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           chip ID: 8086:9d70 
           Sound Server: ALSA v: k5.4.0-80-generic 
Network:   Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Hewlett-Packard driver: r8169 v: kernel port: 4000 
           bus ID: 01:00.0 chip ID: 10ec:8136 
           IF: enp1s0 state: down mac: 70:5a:0f:06:a9:cd 
           Device-2: Realtek RTL8723BE PCIe Wireless Network Adapter vendor: Hewlett-Packard driver: rtl8723be v: kernel 
           port: 3000 bus ID: 02:00.0 chip ID: 10ec:b723 
           IF: wlp2s0 state: up mac: 30:f7:72:52:42:83 
Drives:    Local Storage: total: 931.51 GiB used: 469.93 GiB (50.4%) 
           ID-1: /dev/sda vendor: HGST (Hitachi) model: HTS541010A9E680 size: 931.51 GiB speed: 6.0 Gb/s rotation: 5400 rpm 
           serial: JA1090DW0NPSYH rev: A710 scheme: MBR 
Partition: ID-1: / size: 93.37 GiB used: 21.26 GiB (22.8%) fs: ext4 dev: /dev/sda1 
           ID-2: swap-1 size: 5.72 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda5 
Sensors:   System Temperatures: cpu: 40.5 C mobo: 29.8 C 
           Fan Speeds (RPM): N/A 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/nodesource.list 
           1: deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x focal main
           2: deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x focal main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http://packages.linuxmint.com uma main upstream import backport
           2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
           3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
           4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
           5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http://archive.canonical.com/ubuntu/ focal partner
           Active apt repos in: /etc/apt/sources.list.d/vscode.list 
           1: deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
Info:      Processes: 218 Uptime: 2h 16m Memory: 7.68 GiB used: 2.60 GiB (33.9%) Init: systemd v: 245 runlevel: 5 Compilers: 
           gcc: 9.3.0 alt: 9 Shell: bash v: 5.0.17 running in: gnome-terminal inxi: 3.0.38 
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mikeflan
Level 17
Level 17
Posts: 7106
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: VLC takes long time to start.

Post by mikeflan »

Hi. Please try the suggestions here:
viewtopic.php?p=2037402#p2037402
nimantha
Level 1
Level 1
Posts: 13
Joined: Sun Jul 18, 2021 11:54 pm

Re: VLC takes long time to start.

Post by nimantha »

I don't know what is the reason for the delay at startup. But I tried installing vlc by using snap. It got installed a newer vlc version (3.0.16). Apt installation installed 3.0.9.2. The delay is not there in the snap installation. But there is another problem. Now my vlc player doesn't have the dark theme as in the apt installation. I have Mint-Y-dark theme set.

Screenshot from 2021-07-22 21-54-10.png
How to fix this ? I really love having that dark theme.
nimantha
Level 1
Level 1
Posts: 13
Joined: Sun Jul 18, 2021 11:54 pm

Re: VLC takes long time to start.

Post by nimantha »

In the terminal I have :

Code: Select all

VLC media player 3.0.16 Vetinari (revision 3.0.16-0-g5e70837d8d)
[000055c226bb1360] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Qt: Session management error: Could not open network socket
QApplication: invalid style override 'gtk2' passed, ignoring it.
	Available styles: Breeze, Windows, Fusion
[000055c226bab3c0] main playlist: playlist is empty
gtk2 is ignored.
nimantha
Level 1
Level 1
Posts: 13
Joined: Sun Jul 18, 2021 11:54 pm

Re: VLC takes long time to start.

Post by nimantha »

Oh yes. That was my mistake. I have set an environment variable to override to gtk2 (QT_STYLE_OVERRIDE). After removing it, terminal output is:

Code: Select all

VLC media player 3.0.16 Vetinari (revision 3.0.16-0-g5e70837d8d)
[0000563ebfb8f360] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Qt: Session management error: Could not open network socket
[0000563ebfb893c0] main playlist: playlist is empty
But how can I make vlc to use the same dark theme that the system uses ?
nimantha
Level 1
Level 1
Posts: 13
Joined: Sun Jul 18, 2021 11:54 pm

Re: VLC takes long time to start.

Post by nimantha »

I found a working solution for the delay from viewtopic.php?p=1982045#p1982045 .

So I installed vlc by sudo apt install vlc. Then followed the instructions in the above post. Then restarted the laptop. Boom. The vlc starts like in 3 secs with the dark theme I have set in the Themes.

I don't know how this solution works. But it does work.

Thank you everyone for your help.
Moonstone Man
Level 16
Level 16
Posts: 6054
Joined: Mon Aug 27, 2012 10:17 pm

Re: VLC takes long time to start.

Post by Moonstone Man »

nimantha wrote: Thu Jul 22, 2021 10:12 pm I don't know how this solution works.
The answer is implied in this quote from the link you followed, it isn't spelled out directly but I'll do that for you:
All qt5 apps ran thru qt5ct also take 30 seconds to startup. If you use qt5ct and change the style from gtk2 to anything else, this problem goes away.
VLC is a native Qt5 application, and on native GTK desktops, which includes Mint, qt5ct should be invoked by a native Qt5 application in order to set the interface colour theme to something approaching what you would get in vlc if vlc were a native GTK application, ie qt5ct tries to translate the GTK colour scheme to something that a Qt5 application can use. The implication is that qt5ct has a bug that is triggered by the use of a gtk2 theme.

Having reviewed the qt5ct source code, I'm not actually surprised :)
nimantha
Level 1
Level 1
Posts: 13
Joined: Sun Jul 18, 2021 11:54 pm

Re: [SOLVED] VLC takes long time to start.

Post by nimantha »

Kadaitcha Man, thank you for your clear and simple explanation. I learnt something new by trying to solve the problem. :D
Moonstone Man
Level 16
Level 16
Posts: 6054
Joined: Mon Aug 27, 2012 10:17 pm

Re: [SOLVED] VLC takes long time to start.

Post by Moonstone Man »

nimantha wrote: Fri Jul 23, 2021 1:44 am Kadaitcha Man, thank you for your clear and simple explanation. I learnt something new by trying to solve the problem. :D
With my compliments.
Locked

Return to “Software & Applications”