Fix no-TTY terminal on ctl-alt-F1 with Nvidia drivers

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
s_raiguel
Level 1
Level 1
Posts: 8
Joined: Thu Sep 05, 2013 5:55 pm

Fix no-TTY terminal on ctl-alt-F1 with Nvidia drivers

Post by s_raiguel » Fri May 23, 2014 11:35 am

This has been an issue that has been an annoyance with Nvidia proprietary drivers for two or three years, and has kept me away from Ubuntu-based distros for some time. Finally, on the Nvidia forum, I found the workaround I'd been looking for. The problem arises with Nvidia proprietary drivers (Nouveau doesn't show this behavior): when you push ctrl-alt-F1, you get only a black screen or, at best, a flashing cursor that does nothing. The problem apparently, has to do with the way the framebuffer in implemented and this needs to be disabled. To see if this is the problem, first you need to make a couple of minor modifications to /etc/default/grub - but first, make a backup!

sudo cp /etc/default/grub /etc/default/grub.bak

Now edit the file by entering

sudo pluma /etc/default/grub

in the editor, uncomment the lines
#GRUB_TERMINAL=console
#GRUB_GFXMODE=640x480
by removing the "#". Save the file and run undate-grub to implement the changes

sudo update-grub

Now, to see if the framebuffer is the problem, we'll try to temporarily disable it. When the machine first boots, and you're on the black and white GRUB screen, pressing "e" to edit the boot parameters for just this session. At the end of the line that has the kernel version, add "gfxpayload=nomodeset" (w/o quotes). If this doesn't work, and you still can't get the TTY terminal after you boot and log on, try "gfxpayload=nofb" or "gfxpayload=normal". Also, on some older distros, the same command is apparently vga=nomodeset (or vga=nofb, vga=normal, or vga=normal=nomodeset). You'll just have to see what works. If nothing does the trick, then disabling the framebuffer isn't the right solution for your system, and you'll probably want to stop here, and replace the modified etc/default/grub file with the backup you made earlier - and wait until Nvidia comes out with a driver that addresses this issue.

If one of the commands did work, you'll next need to make the change permanent. Again, edit grub. Find the line near the top of the file that reads GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" and modify it so that it reads

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

If something other than "nomodeset" worked earlier, then of course, you'll want to add that to the line instead, but "nomodeset" was the one that worked for me with Mint 17 MATE, Qiana.

Again, run update-grub to implement the changes. Now, after you reboot, you should be able to get a TTY terminal with ctl-alt-F1 to F6.

versican
Level 1
Level 1
Posts: 2
Joined: Fri Jul 18, 2014 11:44 am

Re: Fix no-TTY terminal on ctl-alt-F1 with Nvidia drivers

Post by versican » Fri Jul 18, 2014 12:31 pm

Thank you!! We had black screen problems. I had modified the #GRUB_TERMINAL=console but not #GRUB_GFXMODE=640x480. Once I got the other value uncommented and saved, it worked. Your fix was so valuable!

My son and I are complete beginners to Linux. We didn't even pronounce it right until I heard a computer tech say it. We got an older computer that had been wiped of its operating system and decided to load Linux and learn. We were happy to get Linux loaded (using a thumb drive we downloaded free Linux Mint 17 Cinnamon...but then realized we needed another thing downloaded to make life easier...Unetbootin from http://www.pendrivelinux.com/). Once we had those both on the thumb drive, and he changed the Bios to boot from the USB, it worked so well.

The next step was upgrading the video card. This also required an upgrade to the power supply. Oh the things we learned! Power supply was easy enough, once we realized the new 8-pin CPU power plug could be split into two separate 4-pin parts. Our motherboard only had place for the 4-pin.

Finally, the video card. Two days agonizing and trying to get the driver installed. When I tried to run it (sh /home/blah/n.run), I always got that weird comment to stop the x server. Nothing I tried to stop that x server worked. I would get the black screen when I tried ctrl alt f1. Likewise, the black screen when I typed in the terminal "sudo service mdm stop". I did things that made no sense to me...just trying advice from other forums. I looked at keyboard mappings where ctrl alt backspace was supposed to kill X server. No it didn't. I googled and googled for help. I screwed up enough we had to completely erase/reinstall Linux. Eventually I figure out it had to be something simple because it was so hard.

I found a recommendation where they made the Grub file modification of just the #GRUB_TERMINAL=console to uncomment. My command to modify that GRUB file was different than what you have listed. "Pluma" was not recognized as a command for me. I used "gksu gedit /etc/default/grub" without the quotes to get the file opened in edit mode. It didn't fix the black-screen problem for us. But, then I saw your topic. I modified the other #GRUB_GFXMODE=640x480 by uncommenting it too. After those additional modifications to the GRUB file, I ran the update as you suggested (sudo update-grub).

That was it!!! I didn't need to carry on with your other suggestions. I don't recall if I rebooted or not, but ctrl alt f1 now takes us to the tty1 prompt. From there, we were able to login, go to our root (su), stop the x server by typing 'sudo mdm service stop' -- perhaps that's redundant but we did it anyway, and get the drivers installed 'sh /home/blah/n.run' and the video card is working. It took a couple install tries though -- I couldn't answer 'yes' to all the install questions...had to be picky.

Thank you so much for your Topic. I wish I had seen it days ago though it took me quite a while to realize what I even had to try to fix. I hope other novices can figure out how to modify their grub file...and if "sudo pluma..." doesn't work for them to open their file, perhaps "gksu gedit..." will. Or perhaps you'll enlighten me regarding the difference.

pedrovay2003
Level 1
Level 1
Posts: 30
Joined: Sun Dec 01, 2013 7:32 pm

Re: Fix no-TTY terminal on ctl-alt-F1 with Nvidia drivers

Post by pedrovay2003 » Thu Jul 31, 2014 11:35 pm

I know this fix is over two months old now, but I just wanted to say how much I appreciate you posting it. Not only was my terminal gone, but a BUNCH of programs that worked for me in Mint 16 were seemingly broken in Mint 17, and your fix made all of them work, as well. I don't know if it was a result of the v2 ISOs that were released a while ago or if it was this fix, but there's too much of a coincidence there for this to not have done something. Thank you so much for sharing this!

arunciblespoon
Level 1
Level 1
Posts: 27
Joined: Sat Oct 25, 2014 1:01 pm

Re: Fix no-TTY terminal on ctl-alt-F1 with Nvidia drivers

Post by arunciblespoon » Sun Nov 02, 2014 8:40 am

Hi, my experience here,

The "gfxpayload=nomodeset" options did not work, but just putting nomodeset did.
also i had a lot of trouble getting the grub menu to start with

so had to edit (using gedit) grub to
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="splash=verbose nomodeset"
GRUB_CMDLINE_LINUX=""
green to get the grub menu at boot, red was the framebuffer fix. splash verbose not neccesary, i just like to see what PC is doing.

next question is, does altering the framebuffer affect anything, like say game performance?

As an aside, this also fixed my slow logout and impossible switch user problems.

Thanks to all for the prompting.

bwilson25
Level 1
Level 1
Posts: 1
Joined: Tue Feb 03, 2015 11:46 pm

Re: Fix no-TTY terminal on ctl-alt-F1 with Nvidia drivers

Post by bwilson25 » Tue Feb 03, 2015 11:48 pm

I literally just registered to say I love you. That worked for me (an Ubuntu user by the way)

mattst
Level 1
Level 1
Posts: 24
Joined: Fri Oct 18, 2013 5:10 am

Re: Fix no-TTY terminal on ctl-alt-F1 with Nvidia drivers

Post by mattst » Fri Sep 25, 2015 1:42 pm

Hi,

IMPORTANT: ALL OF THE ABOVE MAY BE UNNECESSARY FOR YOU / A TOTALLY DIFFERENT SOLUTION

I tried everything above and a whole load more that I found on the web to try and get my ttys working. Nothing worked until I found a post today suggesting the following. If nothing is working for you this might solve the issue for you as well.

This is only for users who have a graphics adaptor on their motherboard which they are not using because they are using a graphics card installed in their system instead.

Go into your PC's BIOS settings during boot-up and find the section that allows you to disable hardware components. Then disable the motherboard's on-board graphics. The setting is likely to be in the advanced settings of your BIOS. After disabling my motherboard's on-board graphics my ttys worked perfectly. I restored my grub file back to the defaults and am very pleased to have my ttys working again.

Note: In my BIOS the setting I disabled was called 'Intel Video Graphics' and it was in the 'Peripherals' section. The person, whose post led me to this solution, changed a setting to enable VGA only when there is no graphics card installed.

I hope this helps anyone who, like me, found this thread while looking for a solution to this annoying problem.

P.S. The reason this fix works and there are no ttys, just a black screen, is that Linux is using an unused graphics adaptor for tty display. After the on-board graphics has been disabled Linux is no longer aware of its existence and so can't choose the on-board graphics to display the ttys on.

hudlum
Level 1
Level 1
Posts: 1
Joined: Thu May 10, 2018 7:07 pm

Re: Fix no-TTY terminal on ctl-alt-F1 with Nvidia drivers

Post by hudlum » Thu May 10, 2018 7:33 pm

I registered to thank mattst for their reply and share my experience. I have been trying to solve this issue for a long time and tried countless grub settings, modprobe configurations without any success.
I am using an AMD APU on an Asrock motherboard, which I guess is a low end model. The problem is that there is not an option to disable integrated graphics in UEFI settings.
You can set primary graphics adapter to PCI-Express but it is considered as a preference and does not actually disable the APU. Therefore I blacklisted radeon modules and set the memory share to 32MB which is the smallest amount available and have been using like that for about two years.
By chance I discovered that changing memory share to auto achieves what mattst describes (altough memory dedicated to APU doubles). At this point I can switch to TTY at any time and I can also observe output while the system is turning off. Furthermore disabling CSM from ACPI menu enables the full experience with high resolution. I am not using any grub setting or flag related to this issue right now and it automatically picks the best resolution.
One thing I want to add is when I read dmesg, I would find efifb is registered with some resolution just fine but it would not work. Therefore, if you are using AMD APU or similar integrated graphics and using a motherboard that provides no option to disable it, you might need to find a creative method to disable integrated graphics or configure your framebuffer driver to avoid using it.

Post Reply

Return to “Tutorials”