[Solved] VLC hangs on exit

Questions about software.
docke
Posts: 26
Joined: 12 Apr 2015 00:00

[Solved] VLC hangs on exit

Postby docke » 05 Aug 2016 06:55

Hello.
The VLC process sometimes refuses to exit and keeps running with 100% of the dedicated CPU core.
This behavior is not new. It keeps happening since the first time I installed SolydK a year ago, and in two different machines.

I was looking in the forum for a similar post, but I failed to find it.
Anybody has some idea how to tackle this undesirable issue? And I am not talking about to kill the process. :D

I add a screenshot showing the above said.
It shows two VLC processes, one is running fine, but the other refused to exit and it is sucking 100% of the core.

Image

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: VLC hangs on exit

Postby Zill » 05 Aug 2016 10:05

docke wrote:... It shows two VLC processes, one is running fine, but the other refused to exit and it is sucking 100% of the core.
Are you intentionally running multiple instances of VLC and, if so, why?

Have you tried killing all VLC processes with the following command:

Code: Select all

killall vlc
If the problem persists, please open a terminal, maximize the window and post the full output of the following two commands:

Code: Select all

inxi -Frxz
dpkg -l *vlc* | grep ii
Please also advise:
  1. Is your machine overclocked?
  2. What kind of media are you running when VLC refuses to exit?

docke
Posts: 26
Joined: 12 Apr 2015 00:00

Re: VLC hangs on exit

Postby docke » 06 Aug 2016 10:24

Multiples instances are enabled, but the problem shows up when I reutilize the same instance to play another video.
I mean; without to exit VLC I click on other video in Dolphin, then this new video plays as expected. However, two icons of VLC appears on the task bar plus two process in the system monitor, exactly as was already explained in the previous post.

The command output you told me are:

Code: Select all

owner@pc2 ~ $ inxi -Frxz
System:    Host: pc2 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4) 
           Desktop: KDE 4.14.2 (Qt 4.8.6) Distro: SolydXK 8 solydxk 
Machine:   Mobo: Dell model: Inspiron M5030 v: A02
           Bios: Dell v: A02 date: 08/05/2010
CPU:       Dual core AMD Athlon II P340 (-MCP-) cache: 1024 KB
           flags: (lm nx sse sse2 sse3 sse4a svm) bmips: 8777 
           Clock Speeds: 1: 2200 MHz 2: 2200 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] RS880M [Mobility Radeon HD 4225/4250]
           bus-ID: 01:05.0
           Display Server: X.Org 1.16.4 drivers: ati,radeon (unloaded: fbdev,vesa)
           Resolution: 1366x768@59.91hz
           GLX Renderer: Gallium 0.4 on AMD RS880
           GLX Version: 3.0 Mesa 10.3.2 Direct Rendering: Yes
Audio:     Card Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA) 
           driver: snd_hda_intel bus-ID: 00:14.2 
           Sound: Advanced Linux Sound Architecture v: k3.16.0-4-amd64
Network:   Card-1: Qualcomm Atheros AR8152 v2.0 Fast Ethernet
           driver: atl1c v: 1.0.1.1-NAPI port: d000 bus-ID: 05:00.0
           IF: eth1 state: down mac: <filter>
           Card-2: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express)
           driver: ath9k bus-ID: 04:00.0
           IF: wlan0 state: down mac: <filter>
Drives:    HDD Total Size: 320.1GB (51.1% used)
           ID-1: /dev/sda model: ST9320325AS size: 320.1GB
Partition: ID-1: / size: 39G used: 5.3G (15%) fs: ext4 dev: /dev/sda1 
           ID-2: /home size: 252G used: 145G (61%) fs: ext4 dev: /dev/sda3 
           ID-3: swap-1 size: 3.15GB used: 0.02GB (1%) fs: swap dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 64.2C mobo: N/A 
           Fan Speeds (in rpm): cpu: N/A 
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://repository.solydxk.com/ solydxk main upstream import
           deb http://ftp.debian.org/debian jessie main contrib non-free
           deb http://security.debian.org/ jessie/updates main contrib non-free
           deb http://ftp.debian.org/debian/ jessie-backports main contrib non-free
Info:      Processes: 181 Uptime: 3:33 Memory: 1726.3/2762.4MB 
           Init: systemd runlevel: 5 Gcc sys: 4.9.2 
           Client: Shell (bash 4.3.301) inxi: 2.1.28 
owner@pc2 ~ $ dpkg -l *vlc* | grep ii
ii  browser-plugin-vlc              2.0.6-4        amd64        multimedia plugin for web browsers based on VLC
ii  libvlc5                         2.2.4-1~deb8u1 amd64        multimedia player and streamer library
ii  libvlccore8                     2.2.4-1~deb8u1 amd64        base library for VLC and its modules
ii  phonon-backend-vlc:amd64        0.8.0-2        amd64        Phonon VLC backend
ii  vlc                             2.2.4-1~deb8u1 amd64        multimedia player and streamer
ii  vlc-data                        2.2.4-1~deb8u1 all          Common data for VLC
ii  vlc-nox                         2.2.4-1~deb8u1 amd64        multimedia player and streamer (without X support)
ii  vlc-plugin-notify               2.2.4-1~deb8u1 amd64        LibNotify plugin for VLC
ii  vlc-plugin-pulse                2.2.4-1~deb8u1 all          transitional dummy package for vlc
ii  vlc-plugin-samba                2.2.4-1~deb8u1 amd64        Samba plugin for VLC
The outcome of the command "killall vlc" is to terminate the video running fine, but the offender process is not.
As is shown in the following capture.

Image

The only way to terminate it that I know, is to select it from the System Monitor and to choose "Send Signal--->Kill".
By the way, this is a relatively old machine that is not overclocked or tampered in any way. Also, the videos are regular "MP4" downloaded from Youtube.

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: VLC hangs on exit

Postby Zill » 06 Aug 2016 15:03

docke: I don't understand why you are running multiple instances of VLC. Do you actually want to watch two videos simultaneously?

With my SolydX system the default behaviour is that only one instance of VLC will run. If I open VLC from the main Whisker menu then I can then select a file directly from within VLC and this then plays. If I choose to open another file from within VLC then the initial video is replaced with the new video.

Opening a file from the file manager (Thunar in the case of XFCE), this shows the same behaviour in that a currently running video is replaced by a new video, running in the same instance of VLC.

The only way I can get a second instance of VLC running is to open the second one from the terminal. This will then play the second video correctly but the terminal does display the following error:

Code: Select all

"Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory"
If I do have two instances of VLC running then the command "killall vlc" does, as expected, kill both instances.

As this command does not seem to work properly with your system, I suggest you can confirm VLC processes are running with the following command:

Code: Select all

top
("q" to quit)
Then you can confirm the PID (process ID) with the following command:

Code: Select all

ps -C vlc
You can then manually kill each VLC process with the following command:

Code: Select all

kill PID_of_target_process
(using the process ID(s) identified above)
This should kill off the last remaining instance(s) of VLC

User avatar
ilu
Posts: 2519
Joined: 09 Oct 2013 12:45

Re: VLC hangs on exit

Postby ilu » 06 Aug 2016 16:05

Have a look at "Tools - Settings - Interface" in vlc too. What is checked there?

Also installing htop is a good idea when coping with processes. IT's a graphical interface to top and you can easily select the right one and kill it.

kurotsugi
Posts: 2234
Joined: 09 Jan 2014 00:17

Re: VLC hangs on exit

Postby kurotsugi » 07 Aug 2016 05:57

Code: Select all

kill
pkill
killall
these commands could be used to kill apps/processes. alternatively, if you don't know the app name, you can use xkill. make sure that you have it installed then execute the command on terminal. your mouse pointer will turned into "X" icon. click the app to kill it.

docke
Posts: 26
Joined: 12 Apr 2015 00:00

Re: VLC hangs on exit

Postby docke » 07 Aug 2016 08:27

Zill wrote:docke: I don't understand why you are running multiple instances of VLC. Do you actually want to watch two videos simultaneously?
I believe there is a misunderstanding.
I do have enabled in the "Preferences" dialog the option to run multiples instances, and I use this choice rarely for comparative purposes.
However, the root of the problem appears when I do run a single instance and suddenly this single process becomes double.
This issue happens once every five videos, as an average. Two SolydK reinstallations from zero did not fix it. And it is not hardware related because it shows up in three different systems.

Using Htop I made this screen capture.
Image

Looking at the "System Monitor" is possible to see, besides the hanged process sucking 100% CPU that there are multiple instances of VLC with different IDs at the bottom of the list (a believe they are called "zombie" processes).
Image Image

@Ilu
Here are the settings for the Interface tab.
Image

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: VLC hangs on exit

Postby Zill » 07 Aug 2016 10:15

docke: I think the problem may simply be that you are working your system too hard!

VLC, like all multimedia applications, demands considerable system resources, both RAM and CPU. Videos also have very varying demands based on many factors, such as the format, the resolution of the video and the required display size.

As your machine is, relatively, low powered, I suggest you should only run one instance of any multimedia application (including VLC) at once and ensure that this instance is properly closed before starting another instance.

The zombie processes that apparently remain on your system seem to show that earlier instances of VLC were unable to close properly, hence they leave some remnants behind in RAM. Zombie processes are generally harmless but it is best not to create them if problems are to be avoided, which is why I suggest you always ensure that VLC exits properly.

On this basis, I recommend that you change your VLC preferences so that the option "Use only one instance when started from the file manager" is also checked.

When you have changed the VLC preferences in this way, a reboot should remove all existing zombie processes so that you start again with a "clean" system, leaving maximum resources available for a (single) instance of VLC.

docke
Posts: 26
Joined: 12 Apr 2015 00:00

Re: VLC hangs on exit

Postby docke » 10 Aug 2016 08:40

Zill wrote:I recommend that you change your VLC preferences so that the option "Use only one instance when started from the file manager" is also checked.
This made the trick. :clap:

By the way, I really appreciate your explanation about zombie processes; my understanding of them were quite fuzzy.
Thank you so much. :)

User avatar
Zill
Posts: 1850
Joined: 13 Aug 2013 14:28
Location: Lincolnshire, UK

Re: VLC hangs on exit

Postby Zill » 10 Aug 2016 09:57

docke: I'm pleased things now seem to be working OK.

FWIW, I only run "older" machines myself and so have discovered many of the limitations the hard way! Having said that, I can usually coax the old clunkers to do what I want - as long as I don't try to make them do too much at once. (a bit like me really!)

Would you now please mark the thread as solved to help any other users with a similar query. You need to edit your first post in this thread and add the prefix [Solved] to the title. Only the OP (Original Poster) can do this.

docke
Posts: 26
Joined: 12 Apr 2015 00:00

Re: [Solved] VLC hangs on exit

Postby docke » 11 Aug 2016 05:11

Done.


Return to “Software”

Who is online

Users browsing this forum: No registered users and 6 guests