Bug 277558 - graphics/drm-61-kmod: VRR/FreeSync doesn't work correctly
Summary: graphics/drm-61-kmod: VRR/FreeSync doesn't work correctly
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: 2024-03-07 20:22 UTC by Alexander Vereeken
Modified: 2024-04-15 04:41 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Vereeken 2024-03-07 20:22:40 UTC
With 5.15 and 5.10 VRR works without problems, every fullscreen window was recognized and FreeSynced.

Now it only works occasionally or not at all.

I use Wine to play games but its also possible to reproduce this very well with native games.

Minetest_game is a good example, as soon as you start the game in fullscreen as it should be, the refresh rate changes and stays frozen.. This remains until you restart Xorg or the system.

OS FreeBSD 14.0-STABLE #0 stable/14-n266911
GPU: RX 6700 XT
Comment 1 Sérgio Siegrist 2024-03-16 19:49:25 UTC
I'd like to help testing it. But I need help to build it.
I have a fresh install of FreeBSD 14.0-STABLE updated with freebsd-update.
/usr/src and /usr/ports cloned from Github.
Building drm-61-kmod I get the message that my kernel version does not support it.
How can I get such a kernel? Should I build a kernel with my current sources? Will it be enough?
Thanks in advance.
Comment 2 Alastair Hogge 2024-03-17 00:41:32 UTC
(In reply to Sérgio Siegrist from comment #1)

Hey Sérgio,

The -STABLE mailing list, or an instant messaging platform may provide greater support than here for building -STABLE, none-the-less, I will make an attempt.

Please provide commands used to generate the error (including the git commands to clone the source), and attach the build log to the report, or trim what you may think is relevant, and post in a message (tho terminal output with long lines can stuff the formatting/rendering in the browser). You may need to familiarise yourself with Section 26.6, Updating FreeBSD from Source[1]. What is the contents of /etc/make.conf? Have you added ${PORT_MODULES} to it? Have a look in man 7 ports, for PORT_MODULES. I populate it with graphics/drm-61-kmod, and graphics/gpu-firmware-kmod on my 15-CURRENT host, example:

> PORTS_MODULES+=         graphics/drm-61-kmod
> PORTS_MODULES+=         graphics/gpu-firmware-kmod

I personally would have started with building world and kernel with the src tarball packaged with the distribution, in other words, the /usr/src that cames with your current install, then once I have replicated a working system from the current /usr/src, move on to using Git and updating /usr/src.

1: https://docs.freebsd.org/en/books/handbook/book/#makeworld
Comment 3 Alexander Vereeken 2024-03-17 22:55:55 UTC
(In reply to Sérgio Siegrist from comment #1)

Thank you for your participation.

Are you sure you are not confusing -STABLE with -RELEASE?

If you want to use -STABLE then you can get an weekly 14-STABLE image from here: https://download.freebsd.org/snapshots/amd64/amd64/ISO-IMAGES/14.0/ 

or you follow "26.6. Updating FreeBSD from Source" from the Handbook which was mentioned by Alastair before.

As far as I know you only need the new kernel for the DRM part and not the whole userland if you don't want to dirty up your current running -RELEASE version.

To install an new kernel aside just specify INSTKERNNAME at the make installkernel part and when compiling and installing the drm drivers do specify KMODDIR and OSVERSION from your new compiled kernel.
Comment 4 Sérgio Siegrist 2024-03-21 15:12:58 UTC
(In reply to Alexander Vereeken from comment #3)
You are correct. I confused -STABLE with -RELEASE.
I updated my system to -STABLE from sources, and managed to compile drm-61-kmod. I have a working desktop environment now.
Thanks very much you all.
My microphone was not detected. So I cannot use this system regularly. But I'll let you know how it goes with testing drm-61-kmod.
For instance, no problem with fullscreen in Chromium so far.
Comment 5 Alexander Vereeken 2024-03-21 20:08:55 UTC
(In reply to Sérgio Siegrist from comment #4)

> For instance, no problem with fullscreen in Chromium so far.

Unfortunately not helpful as normal desktop activities are not triggered by VRR and should also not.
Comment 6 Alexander Vereeken 2024-03-21 20:11:11 UTC
Also forgot to tell (for people who dont know) that to get VRR working in general an tiny configuration is needed.

This, further hints and similar are noted here https://wiki.freebsd.org/AlexanderVereeken/FreeSync