xorg / amd freesync / xrdp problem  [Solved]

Message
Author
User avatar
Magister
Posts: 184
Joined: Thu Apr 25, 2019 4:39 pm

xorg / amd freesync / xrdp problem

#1 Post by Magister »

inxi info

Code: Select all

System:
  Kernel: 6.6.9-amd64 [6.6.9-1~mx23ahs] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 clocksource: hpet
    available: acpi_pm parameters: BOOT_IMAGE=/vmlinuz-6.6.9-amd64 root=UUID=<filter> ro
    rootflags=subvol=@ quiet splash
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23.1_ahs_x64 Libretto July 31  2023 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Mini-pc System: AZW product: SER v: N/A serial: <superuser required> Chassis: type: 35
    serial: <superuser required>
  Mobo: AZW model: SER v: V01 serial: <superuser required> UEFI: American Megatrends LLC.
    v: 1.16_P4C7M43_Blink date: 01/07/2023
Battery:
  Device-1: hid-0003:17EF:60EE.0004-battery model: Lenovo TrackPoint Keyboard II serial: N/A
    charge: N/A status: N/A
CPU:
  Info: model: AMD Ryzen 5 5600H with Radeon Graphics bits: 64 type: MT MCP arch: Zen 3 gen: 4
    level: v3 note: check built: 2021-22 process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80)
    stepping: 0 microcode: 0xA50000F
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache: L1: 384 KiB
    desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 2100 high: 4167 min/max: 400/4280 scaling: driver: amd-pstate-epp
    governor: powersave cores: 1: 2297 2: 2398 3: 3062 4: 400 5: 400 6: 400 7: 2395 8: 1944 9: 2395
    10: 3521 11: 4167 12: 1827 bogomips: 79050
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow mitigation: Safe RET
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: always-on, RSB
    filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series] driver: amdgpu v: kernel
    arch: GCN-5 code: Vega process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s ports: active: HDMI-A-1,HDMI-A-2 empty: DP-1,DP-2
    bus-ID: 04:00.0 chip-ID: 1002:1638 class-ID: 0300 temp: 41.0 C
  Device-2: Microdia USB 2.0 Camera driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-1.4:11 chip-ID: 0c45:636b class-ID: 0102
    serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X: loaded: amdgpu
    dri: radeonsi gpu: amdgpu display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 7680x2160 s-dpi: 96 s-size: 2032x571mm (80.00x22.48") s-diag: 2111mm (83.1")
  Monitor-1: HDMI-A-1 mapped: HDMI-A-0 pos: primary,left model: Dell S2721QS serial: <filter>
    built: 2023 res: 3840x2160 hz: 60 dpi: 163 gamma: 1.2 size: 597x336mm (23.5x13.23")
    diag: 685mm (27") ratio: 16:9 modes: max: 3840x2160 min: 720x400
  Monitor-2: HDMI-A-2 mapped: HDMI-A-1 pos: right model: Dell S2721QS serial: <filter>
    built: 2023 res: 3840x2160 hz: 60 dpi: 163 gamma: 1.2 size: 597x336mm (23.5x13.23")
    diag: 685mm (27") ratio: 16:9 modes: max: 3840x2160 min: 720x400
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi device: 1 drv: swrast
    gbm: drv: kms_swrast surfaceless: drv: radeonsi x11: drv: radeonsi inactive: wayland
  API: OpenGL v: 4.6 vendor: amd mesa v: 23.1.2-1~mx23ahs glx-v: 1.4 es-v: 3.2 direct-render: yes
    renderer: AMD Radeon Graphics (renoir LLVM 15.0.6 DRM 3.54 6.6.9-amd64) device-ID: 1002:1638
    memory: 2.93 GiB unified: no
  API: Vulkan v: 1.3.250 layers: 3 device: 0 type: integrated-gpu name: AMD Radeon Graphics
    (RADV RENOIR) driver: mesa radv v: 23.1.2-1~mx23ahs device-ID: 1002:1638 surfaces: xcb,xlib
    device: 1 type: cpu name: llvmpipe (LLVM 15.0.6 256 bits) driver: mesa llvmpipe
    v: 23.1.2-1~mx23ahs (LLVM 15.0.6) device-ID: 10005:0000 surfaces: xcb,xlib
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio driver: snd_hda_intel v: kernel pcie: gen: 3
    speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.1 chip-ID: 1002:1637
    class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor driver: N/A alternate: snd_pci_acp3x,
    snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x, snd_rpl_pci_acp6x, snd_pci_ps,
    snd_sof_amd_rembrandt pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s
    bus-ID: 04:00.5 chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Realtek driver: snd_hda_intel v: kernel pcie:
    gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.6 chip-ID: 1022:15e3
    class-ID: 0403
  Device-4: Microdia USB 2.0 Camera driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-1.4:11 chip-ID: 0c45:636b class-ID: 0102
    serial: <filter>
  API: ALSA v: k6.6.9-amd64 status: kernel-api tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 v: kernel pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 01:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: MEDIATEK MT7921K Wi-Fi 6E 80MHz driver: mt7921e v: kernel modules: wl pcie: gen: 2
    speed: 5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 14c3:0608 class-ID: 0280
  IF: wlan0 state: down mac: <filter>
Bluetooth:
  Device-1: MediaTek Wireless_Device driver: btusb v: 0.8 type: USB rev: 2.1 speed: 480 Mb/s
    lanes: 1 mode: 2.0 bus-ID: 3-3:2 chip-ID: 0e8d:0608 class-ID: e001 serial: <filter>
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.2 lmp-v: 11
    sub-v: 2305 hci-v: 11 rev: 2613 class-ID: 6c0104
  Info: acl-mtu: 1021:6 sco-mtu: 240:8 link-policy: rswitch sniff link-mode: peripheral accept
    service-classes: rendering, capturing, audio, telephony
Drives:
  Local Storage: total: 1.39 TiB used: 314.4 GiB (22.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Kingston model: SNVS500G size: 465.76 GiB block-size:
    physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: S8H40105 temp: 27.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Timetec model: SD09 size: 953.87 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s tech: SSD serial: <filter> fw-rev: 8B0 scheme: GPT
Partition:
  ID-1: / raw-size: 225.48 GiB size: 225.48 GiB (100.00%) used: 74.86 GiB (33.2%) fs: btrfs
    dev: /dev/dm-0 maj-min: 253:0 mapped: luks-<filter>
  ID-2: /boot raw-size: 512 MiB size: 487.2 MiB (95.16%) used: 201.3 MiB (41.3%) fs: ext4
    dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-3: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 27.1 MiB (28.2%) fs: vfat
    dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-4: /home raw-size: 225.48 GiB size: 225.48 GiB (100.00%) used: 74.86 GiB (33.2%) fs: btrfs
    dev: /dev/dm-0 maj-min: 253:0 mapped: luks-<filter>
  ID-5: /var raw-size: 225.48 GiB size: 225.48 GiB (100.00%) used: 74.86 GiB (33.2%) fs: btrfs
    dev: /dev/dm-0 maj-min: 253:0 mapped: luks-<filter>
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: file size: 5 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 50.5 C mobo: 36.0 C gpu: amdgpu temp: 40.0 C
  Fan Speeds (rpm): N/A
Repos:
  Packages: pm: dpkg pkgs: 2395 libs: 1226 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/microsoft-edge.list
    1: deb [arch=amd64] https://packages.microsoft.com/repos/edge/ stable main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://mxrepo.com/mx/repo/ bookworm main non-free
    2: deb http://mxrepo.com/mx/repo/ bookworm ahs
  Active apt repos in: /etc/apt/sources.list.d/vscode.list
    1: deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main
Info:
  Processes: 457 Uptime: 1h 52m wakeups: 0 Memory: total: 28 GiB note: est. available: 28.3 GiB
  used: 4.17 GiB (14.7%) Init: SysVinit v: 3.06 runlevel: 5 default: graphical tool: systemctl
  Compilers: gcc: 12.2.0 alt: 12 Client: shell wrapper v: 5.2.15-release inxi: 3.3.31
Boot Mode: UEFI
A few months ago I bought new 4K monitor, to have AMD Freesync I followed the info from Arch wiki, I created a file /usr/share/X11/xorg.conf.d/20-amdgpu.conf containing:

Code: Select all

Section "Device"
	Identifier "AMD"
	Driver "amdgpu"
	Option "TearFree" "true"
	Option "DRI" "3"
	Option "VariableRefresh" "true"
EndSection
And it worked, I can see in the log that variable fresh rate is enabled.

A few months pass, I forgot about this, and now I tried to remote access this PC with Remmina from another desktop as I did months ago and it was working fine, but it is not working now, I had some error in ~/.xorgxrdp.10.log about /dev/tty0 permission, googling for this it looked like a recuring bug about rootless X and maybe user group or all kind of VT stuff etc, but I didn't changed any of this when I installed MX and it worked. I installed MX on another latop to test and xrdp is working fine, so I needed to investigate.

After a few hours scratching my head, I saw that in the .xorgxrdp.10.log it was loading the GPU hw for remote desktop?

Code: Select all

[  4653.251] (**) ServerLayout "X11 Server"
[  4653.251] (**) |-->Screen "Screen (xrdpdev)" (0)
[  4653.251] (**) |   |-->Monitor "Monitor"
[  4653.251] (**) |   |-->Device "Video Card (xrdpdev)"
[  4653.251] (**) |   |-->GPUDevice "AMD"
It looks odd, so after some googling it looked like the culprit, to test I removed my /usr/share/X11/xorg.conf.d/20-amdgpu.conf file and xrdp is now working, so when it parse the /usr/share/X11/xorg.conf.d/ folder it was loading the GPU because of this.

Now, how can I bypass this to have both VRR working locally, and xrdp working?

I added the "AutoAddGpu" "off" option in /etc/X11/xrdp/xorg.conf but it still load the GPU

Code: Select all

Section "ServerFlags"
    # This line prevents "ServerLayout" sections in xorg.conf.d files
    # overriding the "X11 Server" layout (xrdp #1784)
    Option "DefaultServerLayout" "X11 Server"
    Option "DontVTSwitch" "on"
    Option "AutoAddDevices" "off"
    Option "AutoAddGpu" "off"
EndSection
Any idea?
HP Mini311 - N270@2GHz - 3/120 - Geforce 9400M - MX21.3
Dell Latitude E5470 - i5-6200U - 8/256 - MX23
Bee-link SER5 - Ryzen 5 5600H - 32/1500 - MX23

User avatar
Magister
Posts: 184
Joined: Thu Apr 25, 2019 4:39 pm

Re: xorg / amd freesync / xrdp problem  [Solved]

#2 Post by Magister »

Found it, I need to tell X the name of the GPU so it will not auto load others. I don't need the AutoAddGPU option at all.

in /etc/X11/xrdp/xorg.conf in the Screen section, add the line
GPUDevice ""
like this:

Code: Select all

Section "Screen"
    Identifier "Screen (xrdpdev)"
    Device "Video Card (xrdpdev)"
    GPUDevice ""
    Monitor "Monitor"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "640x480" "800x600" "1024x768" "1280x720" "1280x1024" "1600x900" "1920x1080"
    EndSubSection
EndSection
HP Mini311 - N270@2GHz - 3/120 - Geforce 9400M - MX21.3
Dell Latitude E5470 - i5-6200U - 8/256 - MX23
Bee-link SER5 - Ryzen 5 5600H - 32/1500 - MX23

Post Reply

Return to “Software / Configuration”