Hardware: * Tomahawk X870 motherboard with the integrated AMD graphics card (disabled in BIOS) * NVidia card RTX 2060 (external PCI card) The regular nvidia-driver doesn't work in this configuration: Xorg hangs when /etc/rc.conf has 'kld_list="nvidia nvidia-modeset"'. It works for ~30 seconds or so and hangs after which the system sometimes reboots. This looks strange to me because I always used nvidia-driver before, including with the same NVidia card, but on different motherboards. Xorg starts fine when /etc/rc.config has 'kld_list="nvidia-drm"'. The problem is with Firefox, Thunderbird, Chrome, and possibly other apps: they don't get mouse and keyboard events. Solution: For FF and TB the following should be added to prefs.js (individually for each of FF and TB): > user_pref("security.sandbox.content.level", 0); > user_pref("media.hardware-video-decoding.enabled", false); > user_pref("gfx.webrender.force-disabled", true); > user_pref("layers.acceleration.disabled", true); This environment variable is also potentially needed: export MOZ_USE_XINPUT2=0 Chromium also has a similar solution. Problem: FF, TB, Chromium should work out of the box, and instead they require setting special options just for them which is a hassle that regular users likely can't handle. Other apps might also have the same problem, especially when they are built with the latest GTK.
(In reply to Yuri Victorovich from comment #0) > The regular nvidia-driver doesn't work in this configuration: Xorg hangs when /etc/rc.conf has 'kld_list="nvidia nvidia-modeset"'. It works for ~30 seconds or so and hangs after which the system sometimes reboots. NVidia xorg driver is not expected to work "out of the box". You have to write a xorg config that enables it as explained in https://docs.freebsd.org/en/books/handbook/book/#x-config-gpu The black screen you see is due to xorg picking up vesa or scfb driver instead and failing in some other way. > Xorg starts fine when /etc/rc.config has 'kld_list="nvidia-drm"'. And this is expected, because xorg tries the modesetting path by default. If there is any DRM driver available (i915, amdgpu, nvidia-drm), it will be picked up automatically. > The problem is with Firefox, Thunderbird, Chrome, and possibly other apps: they don't get mouse and keyboard events. What's the output of pkg info -x xf86 ?
As Gleb already mentioned, NVIDIA drivers WITHOUT DRM/KMS support (graphics/nvidia-drm-*-kmod*) needs manual configuration. Explain why about old-school drivers a bit. By default, x11-servers/xorg-server (and already deleted x11-servers/xf86-server) doesn't know about NVIDIA proprietary drivers at all, thus, try nouveau (nonexistent on FreeBSD) and x11-drivers/xf86-video-nv, and if both failed (expected for RTX 2060), fall back to generic framebuffers (x11-drivers/xf86-video-scfb for UEFI boots and x11-drivers/xf86-video-vesa for legacy BIOS boots incuding UEFI+CSM). So anyone want to use NVIDIA proprietary driver in old-school way need to teach x11-servers/xorg-server about NVIDIA proprietary driver. About apps: What you've mentioned are all Gtk3 apps. Does the issue happen on others, i.e., Gtk4 apps, Gtk2 apps, Qt* apps or plain libX11 / libxcb apps? If not (means, work sanely), does rebuilding x11-toolkits/gtk30 with default options help?
(In reply to Gleb Popov from comment #1) $ pkg info -x xf86 libXxf86dga-1.1.7 libXxf86vm-1.1.7 xf86-input-evdev-2.10.6_8 xf86-input-keyboard-1.9.0_6 xf86-input-mouse-1.9.3_5 xf86-video-scfb-0.0.7_2 xf86-video-vesa-2.6.0
(In reply to Yuri Victorovich from comment #3) pkg install xf86-input-libinput
I understand that Xorg doesn't know about the NVidia driver that is why there is the xorg.conf file that is used. What is surprising is that certain apps don't work while Xorg itself works. All Qt apps work fine. Gtk2 apps: - gimp - works fine Gtk3 apps: 3 of them fail, see the OP. Gtk4 apps: - amberol - fails: hangs for very long time before showing windows - not usable - curtail - fails: hangs for very long time before showing windows - not usable - nautilus - fails: hangs for very long time before showing windows - not usable Many apps don't work. This is a very serious problem.
(In reply to Gleb Popov from comment #4) I just installed xf86-input-libinput, but nautilus and curtail Gtk4 apps still don't work.
(In reply to Yuri Victorovich from comment #6) That is after restarting Xorg of course.
(In reply to Yuri Victorovich from comment #6) It is hard to tell what's wrong, but it is clearly a pilot error and has nothing to do with [nvidia-]drm-kmod.
(In reply to Gleb Popov from comment #8) I agree - it's likely doesn't have to do with graphics/nvidia-drm-66-kmod FYI: No errors in Xorg.0.log. It looks normal.
Workaround for Chromium: $ chrome --disable-gpu --disable-software-rasterizer --disable-gpu-sandbox
(In reply to Yuri Victorovich from comment #9) So are there any dependencies (regardless direct or indirect) common to ALL ports you've been bitten? If any, does rebuilding / reinstalling them help? Anyway, www/chromium and www/firefox are running fine for me among ports you mentioned. (I'm not using mail/thunderbird and others you've mentioned.) Note that I'm on Mate DE (in-tree) with Compiz (of overlay provided by Ken DEGUCHI at [1]) for its Mag plugin. [1] https://github.com/kdeguchi/compiz-reloaded-ports
(In reply to Tomoaki AOKI from comment #11) > So are there any dependencies (regardless direct or indirect) common to ALL ports you've been bitten? If any, does rebuilding / reinstalling them help? Gtk4, Gtk3 are common dependencies depending on the group. I didn't rebuild them, I installed them from the central package repo. > Anyway, www/chromium and www/firefox are running fine for me among ports you mentioned. (I'm not using mail/thunderbird and others you've mentioned.) Do you use graphics/nvidia-drm-66-kmod ? ------- This might be dependent on the hardware. This card worked fine for me on another MB w/out graphics/nvidia-drm-66-kmod.
(In reply to Yuri Victorovich from comment #12) > Gtk4, Gtk3 are common dependencies depending on the group. > I didn't rebuild them, I installed them from the central package repo. These are basically NOT common, as Gtk4 and Gtk3 are NOT used at the same time IN SINGLE APPLICATION (should hesitate to run). What could be the cause would be that linked against ALL affected ports but NOT linked against sanely running ports. In my experience, when almost all apps (including Mate DE) stopped working, rebuilding (not rebuilt) devel/glib20 helped. (Many years passed already, though.) > Do you use graphics/nvidia-drm-66-kmod ? No. I'm using graphics/nvidia-drm-612-kmod-devel on Minisforum MS-01 with RTX A400 and graphics/nvidia-drm-612-kmod-580 on ThinkPad P52 having Quadro P1000.