Bug 298090 - Gtk3 apps like Firefox, Thunderbird, Chromium, and Gtk4 apps don't get mouse/keyboard input and hang when Xorg works through graphics/nvidia-drm-66-kmod
Summary: Gtk3 apps like Firefox, Thunderbird, Chromium, and Gtk4 apps don't get mouse/...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-09-01 06:10 UTC by Yuri Victorovich
Modified: 2026-09-02 22:39 UTC (History)
2 users (show)

See Also:
arrowd: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2026-09-01 06:10:54 UTC
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.
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2026-09-01 07:35:02 UTC
(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

?
Comment 2 Tomoaki AOKI 2026-09-01 12:22:28 UTC
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?
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2026-09-01 15:56:01 UTC
(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
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2026-09-01 16:12:37 UTC
(In reply to Yuri Victorovich from comment #3)
pkg install xf86-input-libinput
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2026-09-01 16:26:33 UTC
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.
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2026-09-01 16:31:01 UTC
(In reply to Gleb Popov from comment #4)

I just installed xf86-input-libinput, but nautilus and curtail Gtk4 apps still don't work.
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2026-09-01 16:31:31 UTC
(In reply to Yuri Victorovich from comment #6)

That is after restarting Xorg of course.
Comment 8 Gleb Popov freebsd_committer freebsd_triage 2026-09-01 16:32:40 UTC
(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.
Comment 9 Yuri Victorovich freebsd_committer freebsd_triage 2026-09-01 16:37:59 UTC
(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.
Comment 10 Yuri Victorovich freebsd_committer freebsd_triage 2026-09-01 17:03:32 UTC
Workaround for Chromium:
$ chrome --disable-gpu --disable-software-rasterizer --disable-gpu-sandbox
Comment 11 Tomoaki AOKI 2026-09-02 09:11:31 UTC
(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
Comment 12 Yuri Victorovich freebsd_committer freebsd_triage 2026-09-02 13:59:09 UTC
(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.
Comment 13 Tomoaki AOKI 2026-09-02 22:39:16 UTC
(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.