How to set Display Resolution while having to use "NOMODESET" on boot

26,192

Solution 1

I had the same problem and was finding nomodeset annoying not just because of the screen resolution, but because it really made compiz suck cpu. So I went back to not using nomodeset because I'd found that if I waited 5 minutes after booting, the screen would come on.

Anyway, just now when I booted, it went black after the grub screen as usual, but the screen turned on just before the login screen appeared. I remembered I took an update this morning that included Ubuntu base, so I'm speculating that the problem was addressed. It isn't fully fixed, but is 95% better, so give it a go if you haven't taken this update yet.

Solution 2

I have 4 laptops upgraded with 16.04, and they all behave a little different with what GRUB accepts. The preferred way should be to set in /etc/default/grub

GRUB_GFXMODE=1920x1080x32

with the part after the equal sign the allowed resolutions for your device. Use either c at the GRUB prompt and enter vbeinfo, or run sudo hwinfo --framebuffer from the console in linux to get a list of accepted modes.

Sometimes, even if the screen is a 16:10 1920x1200 or similar, only a resolution of 1600x1200 is accepted, so watch out for this. This is the setting for GRUB. To have it carry over to the booting system, use a line

GRUB_GFXPAYLOAD_LINUX=keep 

after that.

For some devices, this (preferred) option has no effect. But for my two problem children, commenting out the GRUB_GFXMODE line, keeping the GRUB_GFXPAYLOAD_LINUX line and using the deprecated option vga= with nomodeset was sufficient:

GRUB_CMDLINE_LINUX_DEFAULT="nomodeset vga=0x35a quiet splash"

sets the tty to 1600x1200 with 24 bit. Use the hex value sudo hwinfo --framebuffer gives you.

Solution 3

I've had the exact same problem. Blank screen on boot-time, that I've partially solved withe nomodeset. But after that, I could not use my external HDMI monitor.

So I've finally solved it by leaving GRUB_CMDLINE_LINUX_DEFAULT="" like that. It seems to me (I'm guessing) that removing the splash option does not force to load any video requirements, and hence once the boot is completed, and because I'm not using nomodeset, external monitor can be detected. But again, just a guess...

I'm using ubuntu 20.04.

OS: Ubuntu 20.04 LTS x86_64 
Host: 20N3S01B00 ThinkPad T490 
Kernel: 5.4.0-29-generic 
Uptime: 7 mins 
Packages: 1735 (dpkg), 6 (snap) 
Shell: bash 5.0.16 
Resolution: 1366x768, 1440x900 
DE: GNOME 
WM: Mutter 
WM Theme: Adwaita 
Theme: Yaru [GTK2/3] 
Icons: Yaru [GTK2/3] 
Terminal: gnome-terminal 
CPU: Intel i7-8565U (8) @ 4.600GHz 
GPU: Intel UHD Graphics 620 
Memory: 2461MiB / 7617MiB 
Share:
26,192

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I have a Samsung laptop with a Radeon graphics chip.

    Live-Images and graphical installation have always worked on this laptop with the proper resolution of 1366x768. However, after Ubuntu had been installed, I ran into the black screen problem which so far, I solved by setting nomodeset temporarily during the first boot which gave me a resolution of 1024x768. Having booted like that, I would then install the fglrx driver, reboot and enjoy my Ubuntu with the proper resolution.

    Since I can't use the fglrx driver in Ubuntu 16.04 I am stuck with either a black screen (without using nomodeset) or a distorted display due to the wrong resolution of 1024x768. I tried setting the resolution manually with xrandr but I think since I have to use nomodeset there's no way that I can do that.

    Is there any way to fix this? I know that I could stick with Ubuntu 15.10 but I would really prefer an LTS version.

    • You'reAGitForNotUsingGit
      You'reAGitForNotUsingGit about 8 years
      Have you tried the amdgpu driver?
    • Admin
      Admin about 8 years
      I ran sudo apt-get install xserver-xorg-video-amdgpu libdrm-amdgpu1. Both packages were already installed...
  • Admin
    Admin about 8 years
    Sadly, no luck so far... I tried GRUB_GFXMODE=800x600x32 just to see that GRUB's resolution changed as expected. Still had to use nomodeset to boot to login screen. Also when adding GRUB_GFXPAYLOAD_LINUX. The resolution in Ubuntu changed, though. sudo hwinfo --framebuffer only gives me resolutions up to 1024x768. In GRUB vbeinfo outputs lots more but if I choose one beyond 1024x768 it doesn't have any effect. Maybe because the height is greater than 768 in all of these options...
  • Admin
    Admin about 8 years
    This seems to have fixed it! I reinstalled 16.04 to try it out. Installed the updates after booting with nomodeset and then I waited about 20 minutes without the screen coming on. Nothing. Today, installed the new updates. On the first reboot, the display was black but not powered off (which had been the case before). I just moved the mouse and there it was: My login screen with 1366x768. On the second reboot, the login screen showed up directly.
  • Ken Spagnolo
    Ken Spagnolo about 8 years
    Great! I have to say that since I posted that, the behavior I've experienced has been a little erratic, with the screen sometimes coming on immediately and sometimes not. Hopefully the driver will continue to be improved, but in the meantime I can live with it and function without resorting to nomodeset. Cheers.
  • Admin
    Admin about 8 years
    Well... A little erratic seems to be the right choice of words... After another update, the same problems reappeared and I'm having the same problems again. I'll give it another go to see whether it changed again or not. But I think I'll downgrade to 15.10 for now to have an OS I can actually work with...
  • cirrusio
    cirrusio over 5 years
    Here we are at 2018 and adding GRUB_GFXMODE... seems to have fixed my ability to boot into ubuntu. Thanks!
  • Kevin
    Kevin almost 4 years
    This worked for me, @Lucas. Had to SSH into my 20.4 install and edit grub as you noted... now I can get to login screen and use multiple monitors without issue.
  • PPP
    PPP almost 4 years
    On my GTX 1060 it worked, but not on GT 750