EDIT2: I managed to sneak some extra time to try the nvidia-modeset solution found in Thread 82201. It worked.
Still working on getting Firefox working in Kiosk mode but Xorg starts with a terminal window now. nvidia-modeset was the solution. Marking as solved.
Forgive me if this belongs under "system hardware," I wasn't sure which to put it under. I expect to do more tweaking with X than the Nvidia drivers so I went with "Display Servers."
I'm installing FreeBSD on an old Asus RoG gaming laptop. It has an Intel i7-4700HQ CPU and Nvidia GeForce GTX 765m GPU. I'm just trying to get a bare-minimum X/Firefox/Chromium kiosk setup going to keep configuration simple while I figure out FreeBSD.
I identified what I believe are the correct drivers for my card from the Nvidia website (package is nvidia-driver-390-390.144) and followed FreeBSD documentation to set up the driver and X, installing the correct drivers from
When I run
Here are some examples where I've trimmed the output to what seems relevant:
IN:
OUT:
I've run Xorg with just the defaults (twm, xterm) on other systems, so I tried startx with no .conf files in /etc/X11/ or /usr/local/etc/X11/xorg.conf per the instructions in 5.4.1 here.
So far, it seems like the defaults aren't going to work and I need to actually configure things. I took a look at the Xorg log to see what went wrong.
According to FreeBSD's Compiz Fusion documentation, I explicitly want X to use the "nvidia" driver and not the "nv" one. I'm not sure if that's just necessary for CF, but "X with full proprietary Nvidia bells and whistles" is my end goal here anyway. I also haven't looked into how udev and AutoAddDevices might be factoring into this but that's on my to-do list.
When I check the config file that
This appears to be the correct device based on /var/log/messages.
Finally, I checked up on the loaded modules and was surprised to not find a loaded Nvidia module. I have set
in /boot/loader.conf per aforementioned instructions.
<no output>
When I checked with the verbose flag (side note, love the insight this gives):
In those instructions, it's mentioned that the Nvidia driver needs to be loaded at boot time. I checked
So knowing that I need to load it at boot, I tried loading it manually and running everything again anyway.
I also tried running
Some relevant output from /var/log/messages:
When I actually try using the generated configuration file, I get the same results unless I manually load the nvidia driver first:
With the driver loaded and (known faulty) configuration file in place, I get a black screen with a white text cursor and pointer cursor. It looks like I'm actually getting a graphical shell though, there's no more text output and I have to reboot to get back to the terminal (I should really just ssh into the machine from my other system and kill the process or something, I know, but I expected to fix this sooner).
My questions are:
- What can I do to get the Nvidia driver loading correctly? It keeps not loading at boot and seems like something's still wrong when I load it manually (devd & kernel keep repeating a "client dropped" message).
- do I have the right idea for getting a basic X system up on FreeBSD so far? If not, what other configuration might I need to do?
Any advice on the "FreeBSD web kiosk" idea in general that people happen to have would be appreciated, too.
I'm noticing that Xorg seems to be expecting udev stuff and that
In that case, advice or pointers to advice on how to compile Xorg/Firefox/Chromium and configure FreeBSD for both/either Unix and/or Linux-y would be awesome. But I'm not even 100% sure if that's what's wrong, nor am I sure what settings I'd need to worry about it if is. The Xorg log seemed to suggest that it was having no trouble finding all my input devices despite constantly mentioning udev. It also mentioned the nvidia PCI device and /usr/local/lib/xorg/modules/drivers/nvidia_drv.so and I didn't see any errors about that.
EDIT: editing this before it's even been approved, I found this Thread 82201 and it seems like nvidia-modeset might be what I need. I'll need to come back to this and test more later, but I'll post again if I get things working with that information.
Still working on getting Firefox working in Kiosk mode but Xorg starts with a terminal window now. nvidia-modeset was the solution. Marking as solved.
Forgive me if this belongs under "system hardware," I wasn't sure which to put it under. I expect to do more tweaking with X than the Nvidia drivers so I went with "Display Servers."
I'm installing FreeBSD on an old Asus RoG gaming laptop. It has an Intel i7-4700HQ CPU and Nvidia GeForce GTX 765m GPU. I'm just trying to get a bare-minimum X/Firefox/Chromium kiosk setup going to keep configuration simple while I figure out FreeBSD.
I identified what I believe are the correct drivers for my card from the Nvidia website (package is nvidia-driver-390-390.144) and followed FreeBSD documentation to set up the driver and X, installing the correct drivers from
pkg
. I tried both Firefox and Chromium with and without -kiosk, --kiosk, and --kiosk-mode flags per various web tutorials.When I run
startx
, xinit firefox
or Xorg -configure
, I get similar results where it seems like X can't "talk to" the Nvidia card. All commands are being run as root, though I've also started added a user account to the video group and intend to run X as that user after successful testing as root. I also used commands given in a tutorial using bash
, but usually am using fish
as my default shell.Here are some examples where I've trimmed the output to what seems relevant:
IN:
$ Xorg -configure
OUT:
Code:
(==) Log file: "/var/log/Xorg.0.log"
List of video drivers:
nvidia
scfb
modesetting
vesa
scfb trace: probe start
(++) Using config file: "/root/xorg.conf.new"
(==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
Number of created screens does not match number of detected devices.
Configuration failed.
(EE) Server terminated with error (2).
xinit firefox
AND xinit firefox $* -- :1
Code:
(==) Log file: "/var/log/Xorg.0.log"
(==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
scfb trace: probe start
scfb trace: probe done
(EE)
Fatal server error:
(EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices
I've run Xorg with just the defaults (twm, xterm) on other systems, so I tried startx with no .conf files in /etc/X11/ or /usr/local/etc/X11/xorg.conf per the instructions in 5.4.1 here.
startx
Code:
file /root/.serverauth.14244 does not exist
(stdin):1: bad display name ":0" in "add" command/
file /root/.Xauthority does not exist
(argv):1: bad display name ":0" in "list" command
(argv):1: bad display name "/unix:0" in "add" command
...
xinit: giving up
xinit: unable to connect to X server. Connection refused.
So far, it seems like the defaults aren't going to work and I need to actually configure things. I took a look at the Xorg log to see what went wrong.
less /var/log/Xorg.0.log
Code:
(==) Using system config directory
(==) No Layout section. Using the first Screen section.
(==) No Screen section available. Using defaults.
...
(==) Not automatically adding GPU devices
(II) The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices.
(--) PCI:*(1@0:0:0)
(II) LoadModule: "glx"
(II) LoadModule: "nv"
According to FreeBSD's Compiz Fusion documentation, I explicitly want X to use the "nvidia" driver and not the "nv" one. I'm not sure if that's just necessary for CF, but "X with full proprietary Nvidia bells and whistles" is my end goal here anyway. I also haven't looked into how udev and AutoAddDevices might be factoring into this but that's on my to-do list.
When I check the config file that
Xorg -config
generates at /root/xorg.conf.new (I renamed it to xorg.conf.auto for the last "defaults" test), I see in the last section:
Code:
Section "Device"
Identifier "Card0"
Driver "nvidia"
BusID "PCI:1:0:0"
Endsection
This appears to be the correct device based on /var/log/messages.
Finally, I checked up on the loaded modules and was surprised to not find a loaded Nvidia module. I have set
Code:
nvidia-load="YES"
kldstat | grep nv
<no output>
When I checked with the verbose flag (side note, love the insight this gives):
kldstat -v | less
Code:
... kernel (/boot/kernel/kernel)
Contains modules:
...
82 pci/ata_nvidia
359 g_raid_md_nvidia
In those instructions, it's mentioned that the Nvidia driver needs to be loaded at boot time. I checked
pkg info -l nvidia-driver-390-390.144 | grep ko
and found /boot/modules/nvidia.ko, which I'm guessing is what I need to load.So knowing that I need to load it at boot, I tried loading it manually and running everything again anyway.
kldload nvidia
kldstat | grep nv
Code:
8 ... nvidia.ko
startx
and so on, with same results as before. So I know there's something wrong with this module at boot, but I might be making mistakes with X as well.I also tried running
xinit firefox
after loading the module and got a different result; I got a black screen with white text cursor and mouse cursor, which is more-or-less what I was expecting in the first place. But it's weird that it isn't loading at boot.Some relevant output from /var/log/messages:
Code:
kernel: vgapci0: <VGA-compatible display> ... at device 0.0 on pci1
kernel: vgapci0: Boot video device
...
pkg[3118]: xinit-1.4.1,1 installed
devd[42000]: check_clients: dropping disconnected client.
kernel: interface ata_nvidia.1 already present in the KLD 'kernel'!
kernel: linker_load_file: /boot/kernel/atanvidia.ko - unsupported file type
kernel: nvidia0: <GeForce GTX 765M> on vgapci0
kernel: vgapci0: child nvidia0 requested pci_enable_io
syslogd: last message repeated 1 times
devd[13870]: check_clients: dropping disconnected client
syslogd: last message repeated 1 times
syslogd: last message repeated 1 times
syslogd: last message repeated 1 times
When I actually try using the generated configuration file, I get the same results unless I manually load the nvidia driver first:
mv /root/xorg.conf.auto /etc/X11/xorg.conf
Xorg -config
startx
xinit firefox
With the driver loaded and (known faulty) configuration file in place, I get a black screen with a white text cursor and pointer cursor. It looks like I'm actually getting a graphical shell though, there's no more text output and I have to reboot to get back to the terminal (I should really just ssh into the machine from my other system and kill the process or something, I know, but I expected to fix this sooner).
My questions are:
- What can I do to get the Nvidia driver loading correctly? It keeps not loading at boot and seems like something's still wrong when I load it manually (devd & kernel keep repeating a "client dropped" message).
- do I have the right idea for getting a basic X system up on FreeBSD so far? If not, what other configuration might I need to do?
Any advice on the "FreeBSD web kiosk" idea in general that people happen to have would be appreciated, too.
I'm noticing that Xorg seems to be expecting udev stuff and that
kldload nvidia
loads Linux compatibility modules as dependencies. I think the X package is configured for Linux compatibility and I'm going to either have to configure it for classic FreeBSD features from Ports or configure my system for Linux compatibility. Going "Linux mode" might be necessary for my workstation in the end but I want to see how far I can get with a "classic" FreeBSD desktop stack (OSS and devd instead of PA and udev, that kind of thing).In that case, advice or pointers to advice on how to compile Xorg/Firefox/Chromium and configure FreeBSD for both/either Unix and/or Linux-y would be awesome. But I'm not even 100% sure if that's what's wrong, nor am I sure what settings I'd need to worry about it if is. The Xorg log seemed to suggest that it was having no trouble finding all my input devices despite constantly mentioning udev. It also mentioned the nvidia PCI device and /usr/local/lib/xorg/modules/drivers/nvidia_drv.so and I didn't see any errors about that.
EDIT: editing this before it's even been approved, I found this Thread 82201 and it seems like nvidia-modeset might be what I need. I'll need to come back to this and test more later, but I'll post again if I get things working with that information.