Solved No login screen; is Nvidia to blame?

diortemew

Member

Reaction score: 8
Messages: 73

I followed the install for xfce4 perfectly. The only thing it didn't cover was nvidia gpu settings. I want to launch from .xinitrc, or should I consider the next method in the install section and modify .xsession?

Are there any nvidia settings I missed? I'm almost there, where are my frogs at? Leap into action! Gwahahahahahahaha! I have no idea where that came from. Maybe that old DMX song that played earlier? Ignore that silliness.

Real talk, almost there. Need some guidance. Please advise. And thank you all for all that you do!

Edit: fixed the misspelling of frogs so the reference makes sense
 

Attachments

  • xfce_fallflat4.jpg
    xfce_fallflat4.jpg
    1,004.1 KB · Views: 66

wolffnx

Aspiring Daemon

Reaction score: 230
Messages: 675

na,nothing special about nvidia config, first install the drivers
from ports
second , load the kernel module (nvidia)

and the install and run
nvidia-xconfig
this create a xorg.conf file
for your nvidia card

I would prefer the .xinitrc method,
but its just me

for load the module at boot
put in /boot/loader.conf
nvidia_load=yes
 
OP
diortemew

diortemew

Member

Reaction score: 8
Messages: 73

I would prefer the .xinitrc method,
but its just me

for load the module at boot
put in /boot/loader.conf
nvidia_load=yes
I installed the driver via ```pkg install -y nvidia-driver``` (sorry, code button is grayed out). And I would much rather the .xinitrc, too. Just change the nvidia in /boot/loader and keep everything as is?
 
OP
diortemew

diortemew

Member

Reaction score: 8
Messages: 73

for load the module at boot
put in /boot/loader.conf
nvidia_load=yes
I loaded this, and the other /X11/ setting to add
Driver "nvidia"
But it was blank, it wasn't already showing
Driver "nv"
and I am still being taken to the login via tty. There is no gui. Klstat shows Nvidia and nvidia.ko, so I don't know what I am doing wrong here.
 

wolffnx

Aspiring Daemon

Reaction score: 230
Messages: 675

I installed the driver via ```pkg install -y nvidia-driver``` (sorry, code button is grayed out). And I would much rather the .xinitrc, too. Just change the nvidia in /boot/loader and keep everything as is?
first this, at least for me allways compile the driver from source give me good results
try this

kldunload nvidia
pkg delete nvidia-driver

check if the kernel module was removed kldload nvidia should return an error

then go to
/usr/ports/x11/nvidia-driver-340
make install clean

delete /etc/X11/xorg.conf (if there anyone)
kldload nvidia
nvidia-xconfig

put (temporaly) , in .xinitrc
xterm

and run startx

if you can use xterm smille :)
 

wolffnx

Aspiring Daemon

Reaction score: 230
Messages: 675

I loaded this, and the other /X11/ setting to add
Driver "nvidia"
But it was blank, it wasn't already showing
Driver "nv"
and I am still being taken to the login via tty. There is no gui. Klstat shows Nvidia and nvidia.ko, so I don't know what I am doing wrong here.
start from my previous response and if not work lets go to the next step to debug the problem
 

scottro

Daemon

Reaction score: 870
Messages: 2,021

If you're using packages, have you enabled linux? With the package, (though you can remove it from ports), you need to have the linux service enabled. You can quickly check with kldstat|grep linux

There's a decent write-up somewhere on the forums. Official writeups were out of date, last time I checked, but I haven't checked in awhile.

If using package, pkg install nvidia-driver
Enable linux by adding to /etc/rc.conf linux_enable="YES"
(I install from ports and remove Linux dependency, so I'm not quite sure what packages you have to add to enable Linux).
I also install nvidia-xconfig because it will often fix things.
Add to /boot/loader.conf nvidia-modeset_load="YES"
Reboot and startx. If it doesn't work, run nvidia-xconfig. For example, on one machine, the nvidia-xorg program put in a BusID that I'd never needed before. Generally, you don't need it, you just need to add the following to /usr/local/etc/X11/xorg.conf.d (you may have to create the directory).
Code:
Section "Device"
        Identifier "NVIDIA Card"
        VendorName "NVIDIA Corporation"
        Driver "nvidia"
EndSection

If you do that, and it doesn't boot, then use the xconfig-nvidia program to create an xorg.conf

All this is assuming your card uses the latest driver.

Ah, just found the good write up on the forums. Most of what I've written was gotten from that.

 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,988
Messages: 38,443

With the package, (though you can remove it from ports), you need to have the linux service enabled.
No, that's not needed. The LINUX option of the driver is just to add support for the Linux ABI compatibility so you can use the driver with Linux applications. It's not required for the driver to work. If you don't use any Linux applications you don't need to enable the Linux ABI.
 

shkhln

Daemon

Reaction score: 937
Messages: 2,187

To be precise, the driver has a dependency on the linux.ko kernel module (it sets an ioctl handler for the Linux emulation subsystem), thus linux.ko will be loaded regardless of whether it's explicitly enabled. The driver doesn't care about any linux-* ports/packages.
 
OP
diortemew

diortemew

Member

Reaction score: 8
Messages: 73

na,nothing special about nvidia config, first install the drivers
from ports
second , load the kernel module (nvidia)

and the install and run
nvidia-xconfig
this create a xorg.conf file
for your nvidia card

I would prefer the .xinitrc method,
but its just me

for load the module at boot
put in /boot/loader.conf
nvidia_load=yes
My internet is down. I can't do anything until it is resolved. I will update once I can get some data.

Now that I have a Microsoft Surface I am likely going to reinstall when I get internet restored. I no longer need to dual-boot so FreeBSD will be my only OS. AT&T says there is no timeframe listed to restore the service at this time.
 
OP
diortemew

diortemew

Member

Reaction score: 8
Messages: 73

first this, at least for me allways compile the driver from source give me good results
try this

kldunload nvidia
pkg delete nvidia-driver

check if the kernel module was removed kldload nvidia should return an error

then go to
/usr/ports/x11/nvidia-driver-340
make install clean

delete /etc/X11/xorg.conf (if there anyone)
kldload nvidia
nvidia-xconfig

put (temporaly) , in .xinitrc
xterm

and run startx

if you can use xterm smille :)
Alright. My internet finally came back up and I uninstalled Windows then installed FreeBSD so fresh and so clean. During the install I included ports and source. As the install finished, I entered TTY and ran #pkg install -y vim. Then rebooted.

Upon system boot I logged in with root + password.

Then in this order, I installed needed packages:
> xorg
> xfce
> slim
> slim-themes

Then I added the following lines to my rc:
> dbus_enable="YES"
> hald_enable="YES"
> slim_enable="YES"

At this point I have done nothing with Nvidia. I am ready to install from ports. Is there anything else I need to do? I can't wait to learn and understand this process, it has been more difficult than I imagined. Friggin' Nvidia...

_diortemew
 
OP
diortemew

diortemew

Member

Reaction score: 8
Messages: 73

start from my previous response and if not work lets go to the next step to debug the problem
I had to get on my laptop, I can't stand typing on phone. Kernel module is loaded. However, when I type 'nvidia-xconfig' the following is returned: 'nvidia-xconfig: Command not found.'

Standing by for further instructions, I don't want to screw this up.
 
OP
diortemew

diortemew

Member

Reaction score: 8
Messages: 73

Standing by for further instructions, I don't want to screw this up.
I lied. I saw the /boot/loader.conf above so I tried it. Then power went out (it's storming). Upon reboot I have a mountroot> keeping me from getting into the system. I'll research it later. Too friggin' tired.
 

wolffnx

Aspiring Daemon

Reaction score: 230
Messages: 675

I had to get on my laptop, I can't stand typing on phone. Kernel module is loaded. However, when I type 'nvidia-xconfig' the following is returned: 'nvidia-xconfig: Command not found.'

Standing by for further instructions, I don't want to screw this up.
that's easy, pkg install nvidia-xconfig
dont come in the base system
 
OP
diortemew

diortemew

Member

Reaction score: 8
Messages: 73

This is ridiculous. The documentation has me all over the place. One says use /boot/loader.conf, but any time I load anything nvidia there, I get stuck in a mountroot>. When I attempt to load anything via mountroot>, the system hangs. So apparently using bootloader is wrong.

Another tells me to use xorg.conf. I prefer .xinitrc, but hey, let's roll with it. Nope. Any xorg.conf fails. Every single time. And this is where I find documentation to NOT use the handbook method, delete all xorg.conf files, then try the above method. So apparently using xorg is wrong.

Then I run with my trusty ol' .xinitrc. Cool, I use it on Fedora, piece of cake, right? Nope. I can't get diddly squat to load. I was visiting yesterday, and I got a login screen, but as I was typing the pw power went out again. I wasn't familiar with what I saw, but it was slim from looking at videos to identify it. Since I don't know slim, I opted to turn to sddm, something I am familiar with. Unfortunately, I was unable to replicate the previous window as the system booted directly to TTY. I eventually gave up with slim and reinstalled. Every attempt since has been with sddm.

I have uninstalled and reinstalled FreeBSD about 7-9 times in three days trying to figure this out. I even turned to you all, in hopes I could try the great desktop experience others say exist. I watch RoboNuggie (and others) and stare in awe as he puts this OS to great use. I love the simplicity and power that flows from the OS. And no, my install attempts come directly from the handbook or forum posts others have directed me to. And I still failed.

I turn to videos to see if maybe I miss something, but get this, hardly anyone uses Nvidia, or even touches on it, because they are in a VM. I have run it in a VM. It works. I run it on an old Dell AIO. It works. But I want it on my rig. Why can I not find a single source that says, "Hey, diortemew, bruh, this is how you Sonic!" Wait, wrong, dang I am hungry. And a Route 44 would be awesome right now. I have worked up a serious thirst.

Why can I not find a single source that says, "Hey, diortemew, bruh, this is how you install FreeBSD, without jumping all over the place in the handbook, which doesn't really touch on your current need, because it keeps pointing you to A to B to C to F to D to B to A to 7. And those that do not work, try this section, it might work, yeah, you won't find that here. Oh, and this is what you type, and where. No more typing across two or more files the different iterations of ="YES" from sound_load to snd_hda_load to other various discrepancies like linux_load, nvidia_load, nvidia_name, nvidia_modeset_load, andnvidia_modeset_name to make a few. Oh, and is it kldload nvidia or kldload nvidia-modeset? We tell you."

I am a firm believer in the hand-holding ain't for us approach to this forum. I love it across many discord and discussion communities I am a part of on my journey to learn and become a better desktop user and efficient in the tools we use through the desktop every day. But I am at a frustrated place with FreeBSD and I refuse to give up.

I know I can install GhostBSD, or even easier, go back to Fedora. But what will I have learned? I am not walking away from this. But my ability to install a working and functional desktop (preferably KDE, at minimum XFCE) using the tools available to me has failed. I feel stupid that I can't figure something this ludicrously easy out and make it happen. But I am not stupid. Far from it. Yet here I am. W. T. F.?!

Who among you, can help me out with a bullet-format guide (or whatever format one can follow) from the moment one boots into a fresh install of FreeBSD? Apparently I am too stupid, but that image to all of you aside, I still want to know how this system will run with FreeBSD and learn it from the desktop I prefer, not on my test systems where I wish to test other things like the server side of FreeBSD and OpenBSD.

I am not asking you to hold my hand. I am asking you to show me the correct way so I can figure out where I am going wrong in all of this. The handbook has me all over the place, I can't figure this nvidia craziness out at all. And I don't care what DE you tell me to install, I will follow your steps to a T. I will not give up. I want to see this through.

Dazed and confused,

_diortemew
 

chrbr

Aspiring Daemon

Reaction score: 356
Messages: 869

I refuse to give up.
This is a good attitude. I can tell you what I have. From dmesg
Code:
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0x4000-0x407f mem 0xd7000000-0xd7ffffff,0xc0000000-0xcfffffff,0xd0000000-0xd1ffffff irq 16 at device 0.0 on pci1
nvidia0: <Quadro 1000M> on vgapci0
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: Boot video device
hdac0: <NVIDIA GT108 HDA Controller> mem 0xd8000000-0xd8003fff at device 0.1 on pci1
What I have installed as packages if I remember correctly:
Code:
 pkg info |grep nvidia
nvidia-driver-340-340.108_2    NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-xconfig-440.100         Tool to manipulate X configuration files for the NVidia driver
nvidia-xconfig generated /etc/X11/xorg.conf. Without that file the driver has had no effect. Finally I have the following video related entries in /boot/loader.conf
Code:
nvidia_load="YES"
nvidia_modeset_load="YES"
efi_max_resolution="1280x800"
I have no kldload linux or so. Nevertheless it is loaded as below.
Code:
kldstat
Id Refs Address                Size Name
 1   32 0xffffffff80200000  227ad00 kernel
 2    1 0xffffffff8247b000   3bad38 zfs.ko
 3    2 0xffffffff82836000     a448 opensolaris.ko
 4    1 0xffffffff82842000   e11698 nvidia.ko
 5    3 0xffffffff83654000     d770 linux_common.ko
 6    2 0xffffffff83662000    b28f8 linux.ko
 7    1 0xffffffff83cf9000     87d0 tmpfs.ko
 8    1 0xffffffff83d02000     a160 if_lagg.ko
 9    1 0xffffffff83d0d000    25248 ipfw.ko
10    1 0xffffffff83d33000      acf mac_ntpd.ko
11    1 0xffffffff83d34000     2940 nullfs.ko
May be things change with a different NVIDIA hardware. Sometimes there is more than one method to get something up and running. I hope my working config is useful.
 

mickey

Aspiring Daemon

Reaction score: 302
Messages: 747

This is ridiculous. The documentation has me all over the place. One says use /boot/loader.conf, but any time I load anything nvidia there, I get stuck in a mountroot>. When I attempt to load anything via mountroot>, the system hangs. So apparently using bootloader is wrong.
See, one particularly bad thing about the internet is, that it does not forget. The result is that when you search for guidance about a thing (even more so if said thing has existed for so long) you will come across a great amount of outdated information that has been valid at some point in time, but that moment is long gone.

So lets take it step by step. First thing after installing the correct nvidia-driver(-xxx) package for your particular nvidia hardware is to make sure it gets loaded upon system startup. The now preferred way of doing this is to add nvidia-modeset to the kld_list variable in your /etc/rc.conf file. This method replaces loading the driver from /boot/loader.conf, so make sure that there is no nvidia_load="YES" in that file anymore. When this is done, reboot the machine and check output from dmesg | grep nvidia to see if the driver got initialized correctly upon boot.

Next, forget all about running Xorg -configure or similar nvidia tools to auto-generate an initial xorg.conf file, as that stuff is like from the stone ages of X. Modern X servers auto-probe most hardware and can even go without any configuration file at all. Therefore you should start afresh and make sure that there are no leftover configuration files (i.e. /usr/local/etc/X11/xorg.conf or in /usr/local/etc/X11/xorg.conf.d) before you continue. Unfortunately one of the few things the X server does not automatically detect is nvidia GPUs. So you have to create a minimal configuration file that tells X to actually make use of the nvidia driver. Create a new file /usr/local/etc/X11/xorg.conf.d/20-nvidia.conf with the following contents (change Identifier and BoardName as you see fit):

Code:
Section "Device"
        Identifier              "GTX-nnnn"
        Driver                  "nvidia"
        VendorName              "NVIDIA Corporation"
        BoardName               "GeForce GTX nnnn"
EndSection

With that in place it's time to test whether the bare X server (no fancy DE, no graphical login manager, etc) starts up correctly using the nvidia driver. On your regular (non-root) user account make sure to remove or move aside any .xinitrc file you might have in your home directory, then fire up startx. If everything is alright, a very basic desktop using twm window manager and some xterms should appear. Check /var/log/Xorg.0.log for any potential problems, in particular any lines starting with (WW) or (EE). In this file you should also see that the nvidia driver is being used. You might want to check whether your input devices (keyboard/mouse) work as expected or if they require additional tweaking (keyboard layout, etc).

Only after everything so far is working you should go about setting up a desktop environment/your window manager of choice. Whether you start that by means of .xinitrc
or using a graphical login manager like sddm, slim, xdm, etc is a matter of personal preference and taste.
 

wolffnx

Aspiring Daemon

Reaction score: 230
Messages: 675

diortemew ,

Another tells me to use xorg.conf. I prefer .xinitrc, but hey, let's roll with it. Nope. Any xorg.conf fails. Every single time.

you are some confused about files,what they do,etc?

if the posts above dont work for you ( chrbr and mickey explains very easy and complete)
tell me and will write a "mini" tutorial from zero to install your box

and dont give up!! , when you have it working it will be a new world...is only a stone in the way
 
OP
diortemew

diortemew

Member

Reaction score: 8
Messages: 73

Sorry for the delay, everyone. We buried our friend today. It has been a rough week.

With that in place it's time to test whether the bare X server (no fancy DE, no graphical login manager, etc) starts up correctly using the nvidia driver. On your regular (non-root) user account make sure to remove or move aside any .xinitrc file you might have in your home directory, then fire up startx. If everything is alright, a very basic desktop using twm window manager and some xterms should appear.

I just did the following and startx resulted in "startx: Command not found".

- Fresh Install
- pkg install -y nvidia-driver
- edit /etc/rc.conf
---kld_list="nvidia-modeset"
- No xorg present
- startx (fail)
... then I realized I didn't install xorg. Lol. So I am fixing that now. But I am exhausted, I think I am taking a nap first. I'll be back in a few hours. I can't focus right now. I need to step away, and I just got here. Forgive me.
 

wolffnx

Aspiring Daemon

Reaction score: 230
Messages: 675

Sorry for the delay, everyone. We buried our friend today. It has been a rough week.



I just did the following and startx resulted in "startx: Command not found".

- Fresh Install
- pkg install -y nvidia-driver
- edit /etc/rc.conf
---kld_list="nvidia-modeset"
- No xorg present
- startx (fail)
... then I realized I didn't install xorg. Lol. So I am fixing that now. But I am exhausted, I think I am taking a nap first. I'll be back in a few hours. I can't focus right now. I need to step away, and I just got here. Forgive me.

take care man,sorry for hear about your friend,the forum wont go to anywere, take you time to process your lost
 
OP
diortemew

diortemew

Member

Reaction score: 8
Messages: 73

Create a new file /usr/local/etc/X11/xorg.conf.d/20-nvidia.conf with the following contents (change Identifier and BoardName as you see fit):
mickey, I have no idea where you got the 20-nvidia.conf from, but that was definitely a missing piece. startx put me right into login and xterm GUIs. Is this where I install KDE then all the line entries(dbus_enable, etc.)? I am about to install all of that now and give it a go. I don't see anything referring to a 20-nvidia.conf in the handbook. Whatever this sorcery is, it put me in the twm as you stated it would.
 

scottro

Daemon

Reaction score: 870
Messages: 2,021

The 20-nvidia.conf is described, though with different names in most unofficial howtos. Forget the handbook for this, it will just send you in the wrong direction. If you look at tobik's old how to, https://forums.freebsd.org/threads/howto-setup-xorg-with-nvidias-driver.52311/ he describes it though it is called driver-nvidia.conf. The important thing about the name is that it ends with .conf. If it's the only file in there, it doesn't matter. The number at the beginning just means if you put another file in there with a name of say 10synaptics.conf it will be ready after the synaptics file.

If startx has nvidia running, you don't have to worry about the dbus_enable and all that. Just install KDE and have fun.
Glad you've gotten it working. And yes, as far as the desktop end, FreeBSD is severely lacking. The handbook, is very good for the base system, but many third party program articles are out of date and give no indication of when they written. This can be problematic as third party programs often change.
 
OP
diortemew

diortemew

Member

Reaction score: 8
Messages: 73

Forget the handbook for this, it will just send you in the wrong direction.
No doubt!

Check this out! I can't even begin to thank everyone. As soon as I plugged everything in as I had done a thousand times before, it simply worked. I don't know what that .conf did differently than the directory before it, but it was the piece that made it all work. Within a minute or two after my last post, I was in XFCE and getting everything setup. I even took a screenshot out of pure bliss:

Okay, I can begin to thank everyone: real talk, thank you all for your guidance and helping me learn this process. I still have to figure out the whole 20-nvidia thing deeper to see scottro is teaching, but I'll get to that in time. I have a system to get setup and a Bootcamp to catch up on, I am behind.

wolffnx scottro SirDice [he who lurks in the shadows] shkhln judd chrbr mickey Thank you! Honestly, my gratitude is immeasurable for you all right now. I was struggling and juggling so many things, and now I am back on track. Again, thank you! What a great way to start the new year. I can't wait to learn more with all of you.

Undazzled on my Cunfrazzled, yo,

_diortemew
 

Attachments

  • xfce_neofetch.png
    xfce_neofetch.png
    173.4 KB · Views: 46
Top