How to fix "if playback doesn't begin shortly, try restarting your device" for Linux and Ubuntu users
Introduction
You are likely to encounter this error as a Linux (Ubuntu) user after upgrading your device. This error (if playback doesn't begin shortly, try restarting your device) persists on windows but Linux requires a different approach to get it solved. While simple solutions like reloading/restarting your browser can fix this error, it may require other technical methods if reloading your browser cannot fix the issue.
The solutions below are a combination of online solutions and personal options that I tried. This article will be updated as more solutions are recorded.
Reasons for error
browser update
system update
driver update/ missing drivers
disabling Javascript in the browser
Error characteristics
The following is a list of the errors exhibited by various devices;
Inaudible sound, while playing a video.
The video only plays on mute.
The video starts buffering when you insert your headphone jack or connect a Bluetooth device.
Black screen and buffering with an error message.
In some cases, the issue can be easily fixed by tweaking your browser settings like enabling Javascript. In another case, it may require a more technical approach to fix the problem. So here is a fix for chrome and firefox browsers. If the solution fails, follow the next steps.
Linux Fix
Two approaches can be applied to fix the issue in Linux
Installing/updating Nvidia-driver
Verification
Open the terminal and type in the command below to verify Nvidia GPU information.
nvidia-smi
If the above code generates an error, what you need to do is install Nvidia-driver. Follow the steps below to install Nvidia.
sudo apt purge nvidia-* #You need to uninstall existing version sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt update sudo apt-get install aptitude sudo aptitude install -y nvidia-driver-xxx #omitting the version(-xxx) will install latest version.
Click this link to check your GPU version if you wish to install a dedicated driver version. If you encounter an error when running the
sudo add-apt-repository ppa:graphics-drivers/ppa
, you might need to install python3-launchpad lib using the following command.sudo apt-get install python3-launchpadlib
Restart the above procedure after running the
sudo apt-get install python3-launchpadlib
command. Then restart your computer.Uninstall PulseAudio and install Pipewire
The issue may persist if PulseAudio is unable to detect the HSP profile of your headset. Installing Pipewire would be a great fit for you.
Follow these steps;
The PPA is maintained regularly
sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
#We will use a PPA for adding Pipewire to Ubuntu 20.04, which is maintained regularly: sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream #To update the PPA packages in your system do: sudo apt update #Install the package: sudo apt install pipewire #There is also a dependency needed to be installed with Pipewire, otherwise you will face the issue of “Bluetooth headset won’t connect after installing pipewire”. Install the dependency by: sudo apt install libspa-0.2-bluetooth #Now, to install the client libraries: sudo apt install pipewire-audio-client-libraries #Reload the daemon: systemctl --user daemon-reload #Disable PulseAudio: systemctl --user --now disable pulseaudio.service pulseaudio.socket #If you are on Ubuntu 20.04, you also need to “mask” the PulseAudio by: systemctl --user mask pulseaudio #After a new update of Pipewire, you also need to enable pipewire-media-session-service: systemctl --user --now enable pipewire-media-session.service #You can ensure that Pipewire is now running through: pactl info #This command will give the following output, in Server Name you can see: > PulseAudio (on PipeWire 0.3.28)
If you encounter connection issues after running
pactl info
here is a possible fix that may helprun:
systemctl --user --now enable pipewire pipewire-pulse
OR
replace:
systemctl --user --now enable pipewire-media-session.service
withsystemctl --user --now enable wireplumber
in the above code.#Things should be working by now and you can see your microphone. #If it doesn’t show up, then try restarting Pipewire by this command: systemctl --user restart pipewire #uninstalling ofono and phonesim from your system if you have them installed. sudo apt remove ofono sudo apt remove ofono-phonesim
Restart your computer after running the
sudo apt remove ofono-phonesim
command.While it may be the best solution, you might want to roll back changes in the future. The code below will roll back the changes you made.
systemctl --user unmask pulseaudio systemctl --user --now disable pipewire{,-pulse}.{socket,service} systemctl --user --now enable pulseaudio.service pulseaudio.socket
Disable secure boot in BIOS
This solution can be applied independently or after trying the above methods.
Restart your system to access the BIOS/UEFI using Esc or F10 key
Click system configuration settings
Locate and turn off the secure boot
Restart your device
This is the minimal solution listed but could be the one that works for you.
Conclusion
Video glitches like this are frustrating especially when it prevents you from completing tasks that involve a deadline. Finding the solution is even more frustrating as there are only a few resources that address the problem. The solutions presented above worked in different cases. Of the solutions stated above, reinstalling the Nvidia driver worked for me.
Subscribe to my newsletter
Read articles from Keshinro Damilare directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Keshinro Damilare
Keshinro Damilare
Data scientist and researcher. My interest are Linux, web scraping, artificial intelligence and machine learning.