Locionic
Blog
Projects
Dev ToolsCheatsheetsSeries & Guides
About MeFree Production KitContact
Send email to LocionicLocionic GitHub profileLocionic YouTube channel
© 2026Locionic• All rights reserved.
Dev Kits & Data•Tools•Tags•RSS•Privacy Policy•Terms
  1. Home
  2. Blog
  3. Fixing 2–3 Minute Login Delay on Ubuntu with NVIDIA (Xorg + nvidia-drm Issue)
Wednesday, May 27, 2026•7 min read

Fixing 2–3 Minute Login Delay on Ubuntu with NVIDIA (Xorg + nvidia-drm Issue)

Locionic
Locionic(@Locionic)
linux ubuntu nvidia performance troubleshooting
Fixing 2–3 Minute Login Delay on Ubuntu with NVIDIA (Xorg + nvidia-drm Issue)

I typed my password, hit enter, and then... nothing. Well, not nothing exactly. The screen stayed black. The cursor was there, mocking me. Two minutes passed. Then three. Finally, my desktop showed up like nothing had happened.

This went on for weeks. I kept telling myself I'd fix it later. Later came when I couldn't take it anymore.

If you've got an NVIDIA card running Xorg on Ubuntu and your login feels like waiting for a 2003 dial-up connection, this one's for you.

Audio Briefing• Voice: Google Cloud Journey-F
0:00 / --:--
Interactive Dev Tool
100% Client-Side & Private

Linux Permissions & Chmod Calculator

Interactive octal & symbolic permission matrix with CLI builder

Convert between octal (755, 644, 600) and symbolic (rwxr-xr-x) Linux permissions with an interactive matrix and shell command builder.

Chmod OctalSymbolic PermissionsLinux MatrixBash Command
Launch Full ToolBrowse all 22 Dev Tools
What I Was Dealing With
  • Boot time was totally fine. About 20 seconds to the login screen.
  • I'm using Xorg (GNOME) with an NVIDIA GPU.
  • The problem: A solid 2-3 minute freeze right after entering my password. Every single time.

Chasing the Wrong Problem

Like most people, I started where I always do. Systemd.

I ran systemd-analyze to check boot times. Everything looked normal. Then I tried systemd-analyze --user blame to see if any user services were hanging. Nothing stood out. I disabled a few things I didn't need, hoping it would help.

It didn't.

I checked my startup applications. Nope. I looked at GNOME extensions. Still nope. I was sure this was a slow service or a misbehaving app.

Turns out I was completely wrong.

What Actually Tipped Me Off

I finally thought to check the kernel logs with dmesg. Buried in there were two things that didn't belong:

[nvidia-drm] Failed to grab modeset ownership

and

nvidia-gpu ... i2c timeout error

That's when I stopped guessing and started hunting.


What Was Really Going On

Here's the thing about NVIDIA on Linux. It works, mostly. But every now and then, it does something weird that makes you question your life choices.

The problem was a DRM modeset ownership conflict. Sounds technical, but the idea is simple.

The Fight

When Xorg starts, nvidia-drm tries to take control of the display. But something else already had the DRM ownership locked down.

The Stalemate

Instead of giving up gracefully, the driver kept hammering away. Retry after retry. Two to three minutes of nothing.

The Surrender

Eventually, it timed out, let go, and GNOME finally got to draw my desktop. By that point, I'd already made coffee.

Why does this happen? Your guess is as good as mine. Some kernel versions handle the modeset handoff differently. A system update probably changed something. All I know is that nvidia-drm and Xorg ended up fighting over the same resource, and neither one wanted to back down.


The Fix (Spoiler: It's One Line)

After all that debugging, the solution is almost comically simple.

Open GRUB Config

Fire up a terminal and edit GRUB:

bash
sudo nano /etc/default/grub

Add One Kernel Parameter

Find GRUB_CMDLINE_LINUX_DEFAULT. You'll probably see something like "quiet splash". Change it to:

text
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=0"

Apply It

Save the file, then update GRUB and reboot:

bash
sudo update-grub
sudo reboot

That's it. A single kernel parameter. nvidia-drm.modeset=0.

What This Actually Does

Setting nvidia-drm.modeset=0 disables DRM modesetting for the NVIDIA driver. It stops the deadlock before it starts. The boot sequence goes straight from kernel to NVIDIA driver to Xorg without any of that ownership fighting.

After the reboot, I logged in, held my breath, and... my desktop appeared instantly. Like it was supposed to all along. I actually sat there for a second, confused by the lack of waiting.


But Wait, Is There a Downside?

Good question. Disabling DRM modesetting means you're giving up some functionality.

If you're using Wayland instead of Xorg, this fix will break things. Wayland needs DRM modesetting to work properly. Same thing if you rely on PRIME Sync or GSP firmware features.

But if you're like me, running plain Xorg on a desktop with one monitor, you won't notice a thing. Everything renders the same. Games still work. Video playback is fine. The only difference is that your computer actually responds when you log in.

When NOT to Do This
  • You're on Wayland (this will break it)
  • You need PRIME Sync or GSP firmware features
  • You're using an Optimus laptop setup

Stick to the default modesetting in those cases.


What I Learned

I spent hours chasing performance issues that didn't exist. Systemd logs, GNOME tweaks, kernel parameters, you name it. The whole time, the answer was hiding in dmesg output that I kept ignoring.

Next time something weird happens with my system, dmesg is the first place I'll check, not the last. The kernel usually knows exactly what's wrong. You just have to ask.

And honestly? Sometimes the dumbest fixes are the right ones. A single boot parameter that takes ten seconds to type saved me from 2-3 minutes of waiting every single day. Do the math on that over a few months and it's hundreds of minutes I'm not staring at a black screen.

My desktop appears when I log in now. No fanfare. No waiting. Just the way it should be.

You Might Also Like

  • How to Add a Directory to PATH in Linux (Permanent Fix)
  • FastAPI Docker Multistage Builds: Cut Your Image Size by 70%
  • Astral uv in Docker: Multi-Stage Builds, BuildKit Caching & Fast CI
  • Docker BuildKit Cache Mounts: Python uv, Go & Node.js Guide (2026)

Test Your Knowledge

Interactive Quiz
Question 1 of 2

A developer encounters a 2-3 minute delay after logging into an Ubuntu desktop with an NVIDIA GPU. After checking `systemd-analyze` and startup applications without success, which diagnostic step is most effective for isolating the root cause?

Advertisement
Share this article:

Stay Updated

Get the latest posts delivered straight to your inbox.

Free Developer Utilities

Free In-Browser Developer Tools

Clean AI CLI logs, build cron expressions, decode JWTs, and calculate chmod permissions offline.

Explore Tools

Related Articles

Fixing a 2-Minute Login Delay on Ubuntu (Real Debugging Journey)
linuxMay 27, 2026

Fixing a 2-Minute Login Delay on Ubuntu (Real Debugging Journey)

Spent three days chasing a two-minute login freeze on Ubuntu. Turns out it wasn't one bug - it was three separate issues stacking up: NetworkManager waiting for network, gnome-keyring starting twice, and snapd adding two minutes for 18 snaps. Here's the full debugging trail.

Read more
Ubuntu Server Security: The Pragmatic Linux Hardening Checklist
devopsJuly 22, 2026

Ubuntu Server Security: The Pragmatic Linux Hardening Checklist

Production Ubuntu server hardening guide: SSH key enforcement, UFW firewalls, Fail2ban intrusion prevention, unattended upgrades, and auditd logging.

Read more
Why pipes sometimes get "stuck": buffering
terminalNovember 29, 2024

Why pipes sometimes get "stuck": buffering

The first time my terminal froze mid-pipeline I spent an hour debugging the wrong thing. Here's what was actually happening and how to fix it in seconds.

Read more
On this page
0%
  • Chasing the Wrong Problem
  • What Was Really Going On
  • The Fix (Spoiler: It's One Line)
  • But Wait, Is There a Downside?
  • What I Learned
  • Test Your Knowledge
PreviousFixing a 2-Minute Login Delay on Ubuntu (Real Debugging Journey)Read NextWhy Your Technical Blog Needs a Tag Taxonomy (And How to Build One That Lasts)