Linux How-To

Fixing Ubuntu Freezing at Boot Time

SEOClerks

This step-by-step tutorial exhibits you easy methods to cope with Ubuntu freezing on the boot by putting in proprietary NVIDIA drivers. The tutorial was carried out on a newly put in Ubuntu system but it surely must be relevant in any other case as nicely.

The opposite day I purchased an Acer Predator laptop computer (affiliate hyperlink) to check numerous Linux distribution. It’s a cumbersome, heavy constructed laptop computer which is in distinction to my liking of smaller, light-weight laptops just like the superior Dell XPS.

The explanation why I opted for this gaming laptop computer regardless that I don’t recreation on PC is NVIDIA Graphics. Acer Predator Helios 300 comes with NVIDIA Geforce GTX 1050Ti.

NVIDIA is thought for it’s poor compatibility with Linux. Quite a few It’s FOSS readers requested for my assist with their NVIDIA laptops and I might do nothing as a result of I didn’t have a system with NVIDIA graphics card.

So once I determined to get a brand new devoted machine for testing Linux distributions, I opted for a laptop computer with NVIDA graphics.

This laptop computer comes with Home windows 10 put in on the 120 GB SSD and 1TB of HDD for storing information. I twin booted Home windows 10 with Ubuntu 18.04. The set up was fast, straightforward and painless.

I booted into Ubuntu. It was displaying the acquainted purple display after which I observed that it froze there. The mouse received’ transfer, I couldn’t kind something and nothing else might be achieved besides turning off the machine by holding the facility button.

And it was the identical story on the subsequent login attempt. Ubuntu simply will get caught on the purple display even earlier than reaching the login display.

Sounds acquainted? Let me present you how one can repair this drawback of Ubuntu freezing at login.

Please notice that whereas this tutorial was carried out with Ubuntu 18.04, this might additionally work on different Ubuntu-based distributions corresponding to Linux Mint, elementary OS and so on. I’ve confirmed it with Zorin OS.

Repair Ubuntu freezing at boot time due to NVIDIA drivers

How to fix Ubuntu freezing at boot timeHow to fix Ubuntu freezing at boot time

The answer I’m going to explain right here works for techniques with NVIDIA graphics card. It’s as a result of your system is freezing thanks the open supply NVIDIA Nouveau drivers.

With out additional delay, let’s see easy methods to repair this drawback.

Step 1: Modifying Grub

If you boot your system, simply cease on the Grub display just like the one beneath. In case you don’t see this display, maintain holding Shift key on the boot time.

At this display, press ‘E’ key to enter the enhancing mode.

Edit Grub Menu to fix Ubuntu freezing at loginEdit Grub Menu to fix Ubuntu freezing at loginPress ‘E’ key

It is best to see some type of code just like the one beneath. It is best to give attention to the road that begins with Linux.

Editing grub to fix frozen boot issue with Ubuntu LinuxEditing grub to fix frozen boot issue with Ubuntu LinuxGo to line beginning with Linux

Step 2: Quickly Modifying Linux kernel parameters in Grub

Bear in mind, our drawback is with the NVIDIA Graphics drivers. This incompatibility with open supply model of NVIDIA drivers triggered the difficulty so what we are able to do right here is to disable these drivers.

Now, there are a number of methods you possibly can attempt to disable these drivers. My favourite approach is to disable all video/graphics card utilizing nomodeset.

Simply add the next textual content on the finish of the road beginning with Linux. It is best to have the ability to kind usually. Simply just remember to are including it on the finish of the road.

nomodeset

Now your display ought to seem like this:

Disabling NVIDIA Open Source graphics driversDisabling NVIDIA Open Source graphics driversDisable graphics drivers by including nomodeset to the kernel

Press Ctrl+X or F10 to avoid wasting and exit. Now you’ll boot with the newly modified kernel parameters right here.

Rationalization of what we did right here (click on to broaden)

So, what did we simply do right here? What’s that nomodeset factor? Let me clarify it to you briefly.

Usually, the video/graphics card had been used after the X or every other show server was began. In different phrases, once you logged in to your system and see graphical person interface.

However these days, the video mode settings had been moved to the kernel. Amongst different advantages, it allows you to have a wonderful, excessive decision boot splash screens.

In case you add the nomodeset parameter to the kernel, it instructs the kernel to load the video/graphics drivers after the show server is began.

In different phrases, you disabled loading the graphics driver at the moment and the battle it was inflicting goes away. After you login to the system and see every part as a result of the graphics card is loaded once more.

Step three: Replace your system and set up proprietary NVIDIA drivers

Don’t be too joyful but simply because you’ll be able to login to your system now. What you probably did was non permanent and the subsequent time you boot into your system, your system will nonetheless freeze as a result of it would nonetheless attempt to load the Nouveau drivers.

Does this imply you’ll at all times must edit Kernel from the grub display? Fortunately, the reply isn’t any.

What you are able to do right here is to put in further drivers in Ubuntu for NVIDIA. Ubuntu received’t freeze at boot time whereas utilizing these proprietary drivers.

I’m assuming that it’s your first login to a freshly put in system. This implies you could replace Ubuntu earlier than you do anything. Open a terminal utilizing Ctrl+Alt+T keyboard shortcut in Ubuntu and use the next command:

sudo apt replace && sudo apt improve -y

You could attempt putting in further drivers in Ubuntu proper after the completion of the above command however in my expertise, you’ll must restart your system earlier than you can efficiently set up the brand new drivers. And once you restart, you’ll have to alter the kernel parameter once more the identical approach we did earlier.

After your system is up to date and restarted, press Home windows key to go to the menu and seek for Software program & Updates.

Search Software & Updates in GNOME ActivitySearch Software & Updates in GNOME ActivityClick on on Software program & Updates

Now go to the Extra Drivers tab and look forward to just a few seconds. Right here you’ll see proprietary drivers obtainable in your system. It is best to see NVIDIA within the listing right here.

Choose the proprietary driver and click on on Apply Adjustments.

Install Nvidia Driver in UbuntuInstall Nvidia Driver in UbuntuPutting in NVIDIA Drivers

It is going to take a while within the set up of the brand new drivers. In case you have UEFI safe boot enabled in your system, you’ll be additionally requested to set a password. You may set it to something that’s straightforward to recollect. I’ll present you its implications later in step four.

Enable secure boot with NvidiaEnable secure boot with NvidiaYou might have to setup a safe boot password

As soon as the set up finishes, you’ll be requested to restart the system to take adjustments into impact.

Nvidia drivers installed successfullyNvidia drivers installed successfullyRestart your system as soon as the brand new drivers are put in

Step four: Coping with MOK (just for UEFI Safe Boot enabled gadgets)

In case you had been requested to setup a safe boot password, you’ll see a blue display that claims one thing about “MOK administration”. It’s an advanced subject and I’ll attempt to clarify it in easier phrases.

MOK (Machine Proprietor Key) is required because of the safe boot function that requires all kernel modules to be signed. Ubuntu does that for all of the kernel modules that it ships within the ISO. Since you put in a brand new module (the extra driver) or made a change within the kernel modules, your safe system might deal with it as an unwarranted/international change in your system and should refuse in addition.

Therefore, you possibly can both signal the kernel module by yourself (telling your UEFI system to not panic since you made these adjustments) otherwise you merely disable the safe boot.

Now that a bit about safe boot and MOK, let’s see what to do on the subsequent boot once you see the blue display on the subsequent boot.

If you choose “Proceed boot”, likelihood is that your system will boot like regular and also you received’t must do something in any respect. Nevertheless it’s doable that not all options of the brand new driver work accurately.

This is the reason, it’s best to select Enroll MOK.

MOK and UEFI secure boot in LinuxMOK and UEFI secure boot in Linux

It is going to ask you to Proceed within the subsequent display adopted by asking a password. Use the password you had set whereas putting in the extra drivers within the earlier step. You’ll be requested to reboot now.

In case you miss this blue display of MOK or by chance clicked Proceed boot as a substitute of Enroll MOK, don’t panic. Your predominant purpose is to have the ability to boot into your system and you’ve got efficiently achieved that half by disabling the Nouveau graphics driver.

The worst case can be that your system switched to the built-in Intel graphics as a substitute of the NVIDIA graphics. You may set up the NVIDIA graphics drivers later at any level of time. Your precedence is in addition into the system.

Step 5: Having fun with Ubuntu Linux with proprietary NVIDIA drivers

As soon as the brand new driver is put in, you’ll must restart your system once more. Don’t fear! Issues must be higher now and also you received’t have to edit the kernel parameters anymore. You’ll be booting into Ubuntu straightaway.

I hope this tutorial helped you to repair the issue of Ubuntu freezing on the boot time and also you had been in a position to boot into your Ubuntu system.

In case you have any questions or solutions, please let me know within the remark part beneath.

Source link

Related Articles

Leave a Reply

Back to top button