You are not logged in.

#1 2023-05-17 19:59:41

Quardah
Member
Registered: 2014-08-26
Posts: 146

[SOLVED] Get VSync to work on X with amdgpu

Hi all.

I am trying to turn on VSync on my AMD integrated. I found and tried this : https://www.makeuseof.com/fix-screen-tearing-on-linux/

I did add the following file :

[quardah@P16s ~]$ cat /etc/X11/xorg.conf.d/20-amdgpu.conf
Section "Device"
   Identifier "AMD Graphics"
   Driver "amdgpu"
   Option "TearFree" "true"
EndSection

But this breaks X and i have this in the logs :

[quardah@P16s ~]$ cat .local/share/xorg/Xorg.0.log
[   602.173] 
X.Org X Server 1.21.1.8
X Protocol Version 11, Revision 0
[   602.177] Current Operating System: Linux P16s 6.3.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 11 May 2023 16:40:42 +0000 x86_64
[   602.177] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=a0fd536f-70a0-430d-a1ab-96fcb4391d24 rw loglevel=3 quiet splash idle=nomwait
[   602.178]  
[   602.178] Current version of pixman: 0.42.2
[   602.179]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[   602.179] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   602.180] (==) Log file: "/home/jape/.local/share/xorg/Xorg.0.log", Time: Wed May 17 15:22:38 2023
[   602.181] (==) Using config directory: "/etc/X11/xorg.conf.d"
[   602.181] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   602.181] (==) No Layout section.  Using the first Screen section.
[   602.181] (==) No screen section available. Using defaults.
[   602.181] (**) |-->Screen "Default Screen Section" (0)
[   602.181] (**) |   |-->Monitor "<default monitor>"
[   602.181] (==) No device specified for screen "Default Screen Section".
        Using the first device section listed.
[   602.181] (**) |   |-->Device "AMD Graphics"
[   602.181] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[   602.181] (==) Automatically adding devices
[   602.181] (==) Automatically enabling devices
[   602.181] (==) Automatically adding GPU devices
[   602.181] (==) Automatically binding GPU devices
[   602.181] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   602.181] (WW) The directory "/usr/share/fonts/misc" does not exist.
[   602.181]    Entry deleted from font path.
[   602.181] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[   602.181]    Entry deleted from font path.
[   602.181] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[   602.181]    Entry deleted from font path.
[   602.181] (==) FontPath set to:
        /usr/share/fonts/TTF,
        /usr/share/fonts/100dpi,
        /usr/share/fonts/75dpi
[   602.181] (==) ModulePath set to "/usr/lib/xorg/modules"
[   602.181] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[   602.181] (II) Module ABI versions:
[   602.181]    X.Org ANSI C Emulation: 0.4
[   602.181]    X.Org Video Driver: 25.2
[   602.181]    X.Org XInput driver : 24.4
[   602.181]    X.Org Server Extension : 10.0
[   602.182] (++) using VT number 2

[   602.184] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_32
[   602.185] (II) xfree86: Adding drm device (/dev/dri/card0)
[   602.185] (II) Platform probe for /sys/devices/pci0000:00/0000:00:08.1/0000:04:00.0/drm/card0
[   602.185] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 13 paused 0
[   602.187] (--) PCI:*(4@0:0:0) 1002:1681:17aa:50b7 rev 209, Mem @ 0x8b0000000/268435456, 0x8c0000000/2097152, 0x80800000/524288, I/O @ 0x00001000/256
[   602.187] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[   602.187] (II) LoadModule: "glx"
[   602.188] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   602.188] (II) Module glx: vendor="X.Org Foundation"
[   602.188]    compiled for 1.21.1.8, module version = 1.0.0
[   602.188]    ABI class: X.Org Server Extension, version 10.0
[   602.188] (II) LoadModule: "amdgpu"
[   602.188] (WW) Warning, couldn't open module amdgpu
[   602.188] (EE) Failed to load module "amdgpu" (module does not exist, 0)
[   602.188] (EE) No drivers available.
[   602.188] (EE) 
Fatal server error:
[   602.188] (EE) no screens found(EE) 
[   602.188] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
[   602.188] (EE) Please also check the log file at "/home/jape/.local/share/xorg/Xorg.0.log" for additional information.
[   602.188] (EE) 
[   602.240] (EE) Server terminated with error (1). Closing log file.

It's saying there is no amdgpu driver but it's the driver i am using right now according to lshw

[quardah@P16s ~]$ lshw -c video
WARNING: you should run this program as super-user.
  *-display                 
       description: VGA compatible controller
       product: Rembrandt [Radeon 680M]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:04:00.0
       version: d1
       width: 64 bits
       clock: 33MHz
       capabilities: vga_controller bus_master cap_list
       configuration: driver=amdgpu latency=0
       resources: iomemory:80-7f iomemory:80-7f irq:39 memory:8b0000000-8bfffffff memory:8c0000000-8c01fffff ioport:1000(size=256) memory:80800000-8087ffff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

???

When i do `modprobe amdgpu` i get no text output in terminal so i think it's working or probably not doing anything because the driver is there?

Also `modinfo amdgpu` gives me an incredibly long output signaling that the driver is in fact installed.

I do not know what i am doing wrong, really all i want is VSync enabled so youtube videos stop tearing.

Thanks.

Last edited by Quardah (2023-05-22 18:38:04)


ThinkPad P16s AMD / KDE

Offline

#2 2023-05-17 20:05:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,244

Re: [SOLVED] Get VSync to work on X with amdgpu

You're referencing a driver you don't have installed (xf86-video-amdgpu)
The modesetting driver meanwhile should have support for that option as well, https://www.phoronix.com/news/xf86-vide … ing-Fix-TF

Edit:

When i do `modprobe amdgpu` i get no text output in terminal so i think it's working or probably not doing anything because the driver is there?

Also `modinfo amdgpu` gives me an incredibly long output signaling that the driver is in fact installed.

That's not the kernel module and you can/want "lsmod | grep amdgpu" to see whether that is loaded (but again: totally unrelated to the topic at hand)

Last edited by seth (2023-05-17 20:07:11)

Offline

#3 2023-05-17 21:18:51

Quardah
Member
Registered: 2014-08-26
Posts: 146

Re: [SOLVED] Get VSync to work on X with amdgpu

seth wrote:

You're referencing a driver you don't have installed (xf86-video-amdgpu)
The modesetting driver meanwhile should have support for that option as well, https://www.phoronix.com/news/xf86-vide … ing-Fix-TF

Edit:

When i do `modprobe amdgpu` i get no text output in terminal so i think it's working or probably not doing anything because the driver is there?

Also `modinfo amdgpu` gives me an incredibly long output signaling that the driver is in fact installed.

That's not the kernel module and you can/want "lsmod | grep amdgpu" to see whether that is loaded (but again: totally unrelated to the topic at hand)

Indeed, xf86-video-amdgpu is not installed. I recall this is why i removed it (see last post) : https://bbs.archlinux.org/viewtopic.php?id=280164

Now if i understand correctly

1- Either i stick with modesettings and edit the xorg file to use modesettings with the TearFree option (like seen here : https://www.reddit.com/r/archlinux/comm … vailable/)

OR

2- I get xf86-video-amdgpu again and try with it.

Which one would you recommend?


ThinkPad P16s AMD / KDE

Offline

#4 2023-05-18 06:24:44

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,244

Re: [SOLVED] Get VSync to work on X with amdgpu

Generally the one that works best for you.
The trajectory is towards the modesetting driver (cause wayland), but the only thing relevant is the best result for you.

Did the amdgpu driver and tearfree option fix the tearing problem (and is that maybe related to the refresh rate)?

Offline

#5 2023-05-18 07:53:32

Quardah
Member
Registered: 2014-08-26
Posts: 146

Re: [SOLVED] Get VSync to work on X with amdgpu

This :

[quardah@P16s ~]$ cat /etc/X11/xorg.conf.d/20-modesetting.conf 
Section "Device"
   Identifier "AMD Graphics"
   Driver "modesetting"
   Option "TearFree" "true"
EndSection

works perfect with this : https://www.youtube.com/watch?v=MfL_JkcEFbE

I did not test the amdgpu driver with tearfree. I just tried with modesetting and tearfree and i am pleased with the result.

If need be eventually i will revert back to amdgpu.

EDIT : The tearfree option is not documented in the documentation :

https://man.archlinux.org/man/extra/xor … tting.4.en

Maybe this is something to look at.

Last edited by Quardah (2023-05-18 07:55:32)


ThinkPad P16s AMD / KDE

Offline

#6 2023-05-18 08:00:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,244

Re: [SOLVED] Get VSync to work on X with amdgpu

The manpage is from Xorg, it could only be added at https://wiki.archlinux.org/title/AMDGPU or https://wiki.archlinux.org/title/Xorg

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#7 2023-05-22 19:58:07

Quardah
Member
Registered: 2014-08-26
Posts: 146

Re: [SOLVED] Get VSync to work on X with amdgpu

seth wrote:

The manpage is from Xorg, it could only be added at https://wiki.archlinux.org/title/AMDGPU or https://wiki.archlinux.org/title/Xorg

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

I did mark this thread as solved and since then i've encountered another graphical crash. So i swapped modesetting to amdgpu and i'm gonna run it for a moment and see if it works better.

Glad i have options.

I was going to edit the wiki but i think that mentioning that modesetting now supports TearFree on the AMDGPU page is a little silly.


ThinkPad P16s AMD / KDE

Offline

Board footer

Powered by FluxBB