You are not logged in.

#1 2014-03-24 08:24:17

nanawel
Member
Registered: 2012-05-07
Posts: 88
Website

Yet another black screen on TTY with nvidia drivers

Hi everyone,

I've just changed my hardware and immediately installed a fresh Arch on it. Everything was fine until I installed the nvidia drivers: from that moment, once the boot is complete I get a normal (and working) GDM login screen, but I cannot switch to TTY with Ctrl+Alt+Fn. If I do, the screen goes black, but even worse, the monitor goes into sleep mode and I cannot get back to X (with Ctrl+Alt+F1).

The machine is still working correctly though, as I can get access to it via SSH. The only problem is that I cannot use the virtual consoles unless I want to lose all X display until the next reboot (restarting it via systemctl restart gdm doesn't work).

I also tried lightdm as a replacement but it's still the same.

However, when using the nouveau driver, everything works as expected and I can switch from one TTY to another as much as I want. Of course, I'd like to keep the nvidia driver for various reasons.

I found a lot of similar issues on the web and on this forum but none had this "additional little annoying thing" which is the sleep mode that can't be reverted but with a reboot.

Any help will be appreciated. Thanks in advance.

My specs:
- MSI GeForce GTX760
- Intel i7-4771
- Gigabyte Z87-D3HP
- Boot UEFI

Last edited by nanawel (2014-03-24 14:54:03)

Offline

#2 2014-03-24 15:36:30

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Yet another black screen on TTY with nvidia drivers

Hello
Explain in details how you switched between the nouveau and the nvidia drivers (ie all the commands you ran).
And post log files, as you have access to your machine via SSH.
We cannot guess without data, we have no access to your machine...

Offline

#3 2014-03-24 15:56:46

nanawel
Member
Registered: 2012-05-07
Posts: 88
Website

Re: Yet another black screen on TTY with nvidia drivers

berbae wrote:

Hello
Explain in details how you switched between the nouveau and the nvidia drivers (ie all the commands you ran).
And post log files, as you have access to your machine via SSH.
We cannot guess without data, we have no access to your machine...

Of course!

I initially installed the nvidia driver, so "pacman -S nvidia" etc. And the problem happened immediately. I tried changing some stuffs found around the web (GRUB_GFX_MODE) and there was also the moment I tried lightdm instead of GDM. But no luck.

To switch to nouveau I just followed the wiki:

pacman -Rdds nvidia nvidia-utils nvidia-libgl libvdpau libcl

Then:

pacman -S xf86-video-nouveau lib32-nouveau-dri

I don't remember changing anything else after that. Nouveau just worked flawlessly, except that the power consumption was a bit higher than with nvidia.

To switch to nvidia I adapted the previous command:

pacman -Rdds xf86-video-nouveau lib32-nouveau-dri

Then installed the nvidia driver with:

pacman -S nvidia nvidia-utils nvidia-libgl libvdpau libcl

Since then, X has been working with 3D accelereration and everything, but I lost my good ol' TTYs...

EDIT:
Ah yes, I almost forgot. It's not just about switching to TTY, I also cannot logout from my DE (XFCE here, but also tried Gnome), otherwise GDM/lightdm never appears and I get a black screen here again, and then the monitor goes into sleep mode. But still the machine is up, no problem with SSH for example.

Last edited by nanawel (2014-03-24 20:33:51)

Offline

#4 2014-03-24 21:57:52

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Yet another black screen on TTY with nvidia drivers

Since then, X has been working with 3D acceleration and everything, but I lost my good ol' TTYs...

That seems a problem with frame buffer.
What do you have in log about that?
Run with the nvidia driver:
$ journalctl -b|grep -i -e vesa -e vga

Offline

#5 2014-03-25 08:11:07

nanawel
Member
Registered: 2012-05-07
Posts: 88
Website

Re: Yet another black screen on TTY with nvidia drivers

Unfortunately (I guess) it doesn't return anything:

$ journalctl -b|grep -i -e vesa -e vga
$

But this one is a bit more chatty:

$ dmesg | grep -i -e vga -e vesa
[    0.329158] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=mem,locks=none
[    0.329161] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
[    0.329162] vgaarb: loaded
[    0.329163] vgaarb: bridge control possible 0000:01:00.0
[    0.329163] vgaarb: no bridge control possible 0000:00:02.0
[    0.424830] fb0: EFI VGA frame buffer device
[    1.516743] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none
[    1.589752] hda-intel 0000:01:00.1: Handle VGA-switcheroo audio client
[    2.795733] NVRM: Your system is not currently configured to drive a VGA console
[    2.795735] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
[    2.795736] NVRM: requires the use of a text-mode VGA console. Use of other console
[    2.795737] NVRM: drivers including, but not limited to, vesafb, may result in

There's a reference to an EFI frame buffer, and with the warning message following I found this topic about FB, nvidia, and UEFI, there's also something about not getting any TTY while X seems to work: https://bbs.archlinux.org/viewtopic.php?id=143569
But there doesn't seem to be any solution...

Offline

#6 2014-03-25 10:28:13

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Yet another black screen on TTY with nvidia drivers

Gusar in the thread you mentioned said in https://bbs.archlinux.org/viewtopic.php … 2#p1225752

What exactly is the problem? Do you just get that message (which is not an error as such, just a warning that things might not work), or does the driver not work at all? The driver does not officially support EFI, so it wouldn't be weird if it doesn't, but I've seen reports that it does anyway.

If the driver doesn't work, boot the machine in BIOS mode, or switch to the nouveau driver.

He referenced also a thread in https://bbs.archlinux.org/viewtopic.php … 0#p1118480 with infos and other links in it.

Personally I use a MBR boot loader and the vesafb frame buffer; I get the warning from NVRM nvidia, but the tty consoles work like that for me.
So I let the config untouched for now (vga=773 in the kernel command line).

It seems a simple solution for you, if you don't want to use the nouveau driver, would be to reconfigure your boot loader to the MBR mode instead of UEFI;
or to try the suggestions with grub or grub2 given in the mailing list thread Gusar referenced.

Good luck.

Offline

#7 2014-03-25 18:20:25

nanawel
Member
Registered: 2012-05-07
Posts: 88
Website

Re: Yet another black screen on TTY with nvidia drivers

Yes I used UEFI+GPT since the info I found in the wiki didn't seem to indicate that it could lead to issues like that.

What is strange is that if I disable all login managers, I get a virtual terminal after boot, and I can switch from TTY1 to TTY7 without any problem. But if I configure and start X with startx, I can no longer switch to the terminals. It's just by running X once that I get into this dead-end.

Anyway, thanks for your help so far. I guess I have a better idea of what's causing this issue. I'm going to keep on searching that way.

EDIT:
This guy seems to have the same problem, except that he's on Mac: https://devtalk.nvidia.com/default/topi … tarting-x/

Last edited by nanawel (2014-03-25 18:39:52)

Offline

#8 2014-03-25 22:23:54

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Yet another black screen on TTY with nvidia drivers

From http://www.nvnews.net/vbulletin/showpos … stcount=13

The NVIDIA Linux graphics driver does not currently support native UEFI configurations. We plan on addressing this, of course (unfortunately, I do not have an ETA for this). But in the meantime, the driver stack requires a system booted in CSM mode with a mode 3 text console.

And explanations about the CSM mode at http://en.wikipedia.org/wiki/Unified_Ex … SM_booting
It seems that UEFI can emulate the BIOS-MBR boot loader which should be compatible with the nvidia driver.

Offline

#9 2014-03-26 08:13:19

nanawel
Member
Registered: 2012-05-07
Posts: 88
Website

Re: Yet another black screen on TTY with nvidia drivers

berbae wrote:

And explanations about the CSM mode at http://en.wikipedia.org/wiki/Unified_Ex … SM_booting
It seems that UEFI can emulate the BIOS-MBR boot loader which should be compatible with the nvidia driver.

From what I understand, it's possible for a UEFI-based PC to behave like a BIOS-based one, and of course in this case install any kind of x86 operating system even if it's 20 years old.
The problem is: my PC is already configured 100% UEFI + GPT (because I thought that in 2014 that wouldn't be a problem, am I foolish...), for both Archlinux and Windows 7 that have their own hard drive (yes, it would be a pity not to play with those toys).

Correct me if I'm wrong, but if I enable this CSM feature now it means that I'll have to reinstall everything again, right? I mean, maybe not with Arch but at least W7.
I also cannot tell if I'll be able to keep GPT. I'd say no since BIOS doesn't seem to handle this format, but could you confirm?

Offline

#10 2014-03-26 14:21:54

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Yet another black screen on TTY with nvidia drivers

I found that at https://help.ubuntu.com/community/UEFI

Set up the BIOS in EFI or Legacy mode

Some recent computers (>2011) allow to set up the boot either in UEFI mode or in Legacy (not-EFI) mode. The way to carry out this setting depends on the computers, but generally this setting is located in the "Boot order" tab of the BIOS (to access the BIOS screens, it is generally necessary to press a key during the PC startup).

Note: Some BIOSes (e.g. American Megatrends' "Aptio", found on the Asus vivobook series) call Legacy mode "Compatibility Support Module" or simply "CSM".

So if that applies to your machine, you might be able to boot Windows7 with UEFI mode and Arch+Nvidia with Legacy BIOS mode, without changing anything to the installation (the BIOS boot loader seems to be compatible wih GPT partition table, but there is to configure something for it to work see https://wiki.archlinux.org/index.php/GPT#BIOS_systems).
If you can't do that and you really do not want to use the nouveau driver, you have no other choice than to wait for Nvidia to release an UEFI compatible driver, and not to work in tty console mode.

You can also try to search how some has succeeded to use the efifb frame buffer with the nvidia driver, with special configurations.

But, apart from the BIOS switch between boot loaders,  the two easiest approaches for you are either to use the nouveau driver or to not work in tty console mode when using the nvidia driver.
Maybe you could find something better but it will be more complicated, I don't know if you have time and motivation to go this way...
Nvidia will surely release a UEFI compatible driver sooner or later...

Regards.

Last edited by berbae (2014-03-26 14:42:01)

Offline

#11 2014-03-26 15:55:30

nanawel
Member
Registered: 2012-05-07
Posts: 88
Website

Re: Yet another black screen on TTY with nvidia drivers

Now I know what I can and can't do, and it's something.

So my solutions so far are:

  • Use the nvidia driver to get all 3D acceleration nouveau cannot handle for now, but at the cost of losing my VTs. I guess Nvidia will eventually release a UEFI-compatible driver that will meet my needs.

  • Use the nouveau driver to get a pretty good 3D acceleration and be able to use the VTs.

I guess I can create a little script to switch easily from one driver to the other (I remember reading something like that on the wiki).

But I need to focus first on a way to get 3 screens working together, 2 plugged on the Nvidia card, one plugged on the integrated chipset from Intel. Once I'll have this xorg.conf ready, I'll work on making it work with both drivers with minimal changes.

Thanks again for your help.

Regards

Offline

#12 2014-04-15 14:52:22

Baryon
Member
Registered: 2011-08-12
Posts: 72

Re: Yet another black screen on TTY with nvidia drivers

Hi, I have been having exactly the same issue.
I have fixed it by simply disabling KMS, by adding nomodeset to the kernel options line.

I also tried installing uvesafb, but I'm getting these errors in journalctl:

kernel: uvesafb: cannot reserve video memory at 0xd1000000
kernel: uvesafb: probe of uvesafb.0 failed with error -5

I don't know what the consequence of this error is, however, since both X and the framebuffer are now working. Presumably vesafb, or something else, is still taking control of the framebuffer and I don't know how I would switch to uvesafb.
I was thinking that vesafb must be what's driving the framebuffer before X starts, so surely there should be a way of reverting control of the graphics to vesafb when you switch out of X.

But for now, nomodeset has fixed the original issue!

Last edited by Baryon (2014-04-15 14:53:00)

Offline

#13 2014-04-21 14:22:24

nanawel
Member
Registered: 2012-05-07
Posts: 88
Website

Re: Yet another black screen on TTY with nvidia drivers

Thanks for your reply, I'll give it a shot. For now I switched back to nouveau in order to make multiseat work correctly. It seems easier with this driver than with the proprietary one.

Offline

Board footer

Powered by FluxBB