VLC freezes PC when resuming from suspend to ram (Debian, Ubuntu, Linux Mint) - SOLUTION

I've been observing this weird thing that when I leave VLC open and I suspend my Linux machine.

Whenever I try to resume the system from suspend I can't login and there's a black screen. If I try to CTRL+ALT+F1-F8 I can sometimes  login but it's a black screen again and nothing happens.
This freezes the whole system and only the CTRL+ALT+PAUSE+O (K or L) works by shutting down the system in a graceful manner.

Solution Kill VLC

Ctrl+Alt+F4 to get to a console TTY and login with your user.

ps -aux | grep vlc

sudo pkill -9 vlc

After killing VLC you can go back to CTRL+ALT+F1 or CTRL+ALT+F2 and login, everything will work fine.

Solution 2 system2 system-sleep script

We can do something else to automate this process since I might not want to go in the console each time. If I go to sleep with VLC open, then let the system close VLC and then restart it later

vim /lib/systemd/system-sleep/vlc-pm

#!/bin/bash

PATH=/sbin:/usr/sbin:/bin:/usr/bin

case "$1" in
	pre)	pkill -9 vlc
		exit 0
		;;
	post)	
		exit 0
		;;
 	*)	exit 1
		;;
esac

NOTE, this seems NOT to work all of the time, so the first solution is better.

You might enjoy these similar articles:

Be the first to comment!

The comments section is closed.

Subscribe to my awesome newsletter!








What to expect: Ultimate Knowledge regarding Business Efficiency, Personalized Marketing Experience, Software Development and Cyber Security tips and tricks. 1-3 mails per month. Unsubscribe any time. See the privacy policy to learn how we take care of your information.