From nobody Thu May 30 02:01:39 2024 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VqTyH1xnKz5LnSh for ; Thu, 30 May 2024 02:01:43 +0000 (UTC) (envelope-from jguojun@gmail.com) Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VqTyG6QZJz4NnL for ; Thu, 30 May 2024 02:01:42 +0000 (UTC) (envelope-from jguojun@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-62a0849f5a8so3355747b3.2 for ; Wed, 29 May 2024 19:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717034502; x=1717639302; darn=freebsd.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=dG8oIpOdIuqJMYb6svBdLdvUkgpnG4cl74uQPUqd0KI=; b=elZ5m7Vc6EawOf+1SCktBRO7NnFKYalmM5aXDlfMUXC3/MOLtMMqS4z+Q/SWcpO4wT 2/OrdkRfPR6cidjBYIbTiW4kQAW0aLK5wxhVzQDPsUYY6Rrmg8E5iNTYX8lRdG6XZvvI xKbPCoKNz3WtAJs8VKUqa5R+psKJaxtk730/DhcCOO1uG/fNoUeNnJoT1oROTaFqYACR LYZbHU+Rm9GkvyHzZB9RxNAKAj/RET6snQJx2l+nsca0APu1mRGoJI44JJgB2O++h8kS zbmThuHp7yHCWgMS3vOoHtyIAOTuxsSKVqsrc8z8Q3ebtwo3dUlfDnvtKNG4GP2UuXn4 Y3tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717034502; x=1717639302; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=dG8oIpOdIuqJMYb6svBdLdvUkgpnG4cl74uQPUqd0KI=; b=N1z3nmkLZg8zJMjAEu5G0QdHob8RsZIDa4g1cHOdfp6CWmtqoGp7VTy640gJ59jVld pdHp03YkWC++KQcr6kg/9dm4moRedW1kBSTuv6dwCYwwX+kd96xCuLqRt0vAMJI5+12Z 5Qg25na0gTbo8rUwEpZ7MX4At9hvavBp4kX+z+mSd6lBLBHB12z+Zm+alKxCd4fSbjQv izMJy05dGM/S0afGccXYpMT4P2+QQErk3QQh8KWcg6MZlZCkEXh1+fel32Ps0RlWTX5s ldBxU0ryZ6DWVT3/C/ZqtcpwkOluN6qYTrOywStXjDi6+f7tEDgZNKdxduoxlP9ClRZz JlqA== X-Gm-Message-State: AOJu0YzRaQOwXQcQHTj+UxQOlgyi+m1IWAPgTmhOHwPrJie0kEtOihS4 pJJjBaNeeeCwkTb+iUbP+hIFtRognZnLmrKq69I1+bnEKL7OZd5kFmf7 X-Google-Smtp-Source: AGHT+IFApRaMqut+/JZ6MTAmbTt9m/nt/tTzLhm2HEmIMECO1FaQHtiTBPiX1NBsYWC4YfpDZH81Aw== X-Received: by 2002:a81:d403:0:b0:627:d23a:4505 with SMTP id 00721157ae682-62c6bbca651mr9015777b3.3.1717034501515; Wed, 29 May 2024 19:01:41 -0700 (PDT) Received: from [192.168.1.82] (76-218-103-166.lightspeed.sntcca.sbcglobal.net. [76.218.103.166]) by smtp.gmail.com with ESMTPSA id 00721157ae682-62a0a534cf7sm26488197b3.115.2024.05.29.19.01.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 May 2024 19:01:41 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------sKky1z5YrfhCKjfOC2u6ggAr" Message-ID: <96733402-7546-40fa-bf7f-d6d860a756a1@gmail.com> Date: Wed, 29 May 2024 19:01:39 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: mplayer screws up colormap as cursor moved into the video window To: Polytropon Cc: freebsd-questions References: <20240529132054.0a2b2bfa.freebsd@edvax.de> Content-Language: en-US From: "Jin Guojun[VFF]" In-Reply-To: <20240529132054.0a2b2bfa.freebsd@edvax.de> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4VqTyG6QZJz4NnL This is a multi-part message in MIME format. --------------sKky1z5YrfhCKjfOC2u6ggAr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/29/24 04:20, Polytropon wrote: > On Tue, 28 May 2024 22:21:09 -0700, Jin Guojun[VFF] wrote: >> When upgraded to 13.3-R, I have experienced a problem that Mplayer can >> cause system colormap distorted when the cursor moved into the video window. >> >> [...] >> >> On this 13.3 machine, one thing have been changed -- the video device. >> X.org is no longer supporting older video cards, such as Radeon 370, >> NV210, etc., so I used AMD APU video (Radeon HD 8570D). xf86-video-ati >> driver does not support it, therefore no /etc/X11/xorg.conf is created, >> and X is started with default configuration (VESA?), not sure if mplayer >> does not like it. > The mplayer program uses the specified output, and it is > preferring direct rendering if your graphics card and driver > supports it, which in case of a Radeo HD should absolutely > be no problem. However, it seems that your X currently uses > VESA, and that's why you're seeing this problem. > > Sadly, graphics configuration has become quite complicated > on FreeBSD, and you need to check several things: > > 1. Is the correct KMS kernel module loaded? > > 2. Is the correct X driver loaded? > > 3. What output is mplayer configured to use? > > You can check "kldstat" and "dmesg" output for question 1, > /var/log/Xorg.0.log for question 2, and the mplayer configuration > directory, whererever it might be today, for question 3. You > can also manually check: > > $ mplayer -vo x11 test.avi > > for VESA (should always work), and > > $ mplayer -vo gl test.avi > > for direct rendering (works if question 1 and 2 have been > answered with "yes"). > > I have a reference system (HP mini-laptop) with AMD graphics > that I can check a working configuration for. Thanks for the information. The output was configured to x11. Changing to gl solved the problem. No KMS is loaded. Loading drm-510-kmod-5.10.163_8 and xf86-video-ati-19.1.0_6,1 will cause system crash.  1   33 0xffffffff80200000  21430f0 kernel  2    1 0xffffffff82520000     3378 acpi_wmi.ko  3    1 0xffffffff82524000     3218 intpm.ko  4    1 0xffffffff82528000     2180 smbus.ko  5    1 0xffffffff8252b000     3340 uhid.ko  6    1 0xffffffff8252f000     3380 usbhid.ko  7    1 0xffffffff82533000     32b0 hidbus.ko  8    1 0xffffffff82537000     3320 wmt.ko  9    1 0xffffffff8253b000     4350 ums.ko 10    1 0xffffffff82540000     3538 fdescfs.ko X driver is VESA [  2016.900] (II) LoadModule: "ati" [  2016.900] (WW) Warning, couldn't open module ati [  2016.900] (EE) Failed to load module "ati" (module does not exist, 0) [  2016.900] (II) LoadModule: "modesetting" [  2016.900] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so [  2016.900] (II) Module modesetting: vendor="X.Org Foundation" [  2016.900]    compiled for 1.21.1.11, module version = 1.21.1 [  2016.900]    Module class: X.Org Video Driver [  2016.900]    ABI class: X.Org Video Driver, version 25.2 [  2016.900] (II) LoadModule: "scfb" [  2016.900] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so [  2016.900] (II) Module scfb: vendor="X.Org Foundation" [  2016.900]    compiled for 1.21.1.11, module version = 0.0.5 [  2016.900]    ABI class: X.Org Video Driver, version 25.2 [  2016.900] (II) LoadModule: "vesa" [  2016.900] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so [  2016.901] (II) Module vesa: vendor="X.Org Foundation" [  2016.901]    compiled for 1.21.1.11, module version = 2.5.0 [  2016.901]    Module class: X.Org Video Driver [  2016.901]    ABI class: X.Org Video Driver, version 25.2 [  2016.901] (II) modesetting: Driver for Modesetting Kernel Drivers: kms [  2016.901] (II) scfb: driver for wsdisplay framebuffer: scfb [  2016.901] (II) VESA: driver for VESA chipsets: vesa [  2016.901] (--) Using syscons driver with X support (version 2.0) [  2016.901] (--) using VT number 9 [  2016.907] (EE) open /dev/dri/card0: No such file or directory -Jin --------------sKky1z5YrfhCKjfOC2u6ggAr Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 5/29/24 04:20, Polytropon wrote:
On Tue, 28 May 2024 22:21:09 -0700, Jin Guojun[VFF] wrote:
When upgraded to 13.3-R, I have experienced a problem that Mplayer can
cause system colormap distorted when the cursor moved into the video window.

[...]

On this 13.3 machine, one thing have been changed -- the video device.
X.org is no longer supporting older video cards, such as Radeon 370,
NV210, etc., so I used AMD APU video (Radeon HD 8570D). xf86-video-ati
driver does not support it, therefore no /etc/X11/xorg.conf is created,
and X is started with default configuration (VESA?), not sure if mplayer
does not like it.
The mplayer program uses the specified output, and it is
preferring direct rendering if your graphics card and driver
supports it, which in case of a Radeo HD should absolutely
be no problem. However, it seems that your X currently uses
VESA, and that's why you're seeing this problem.

Sadly, graphics configuration has become quite complicated
on FreeBSD, and you need to check several things:

1. Is the correct KMS kernel module loaded?

2. Is the correct X driver loaded?

3. What output is mplayer configured to use?

You can check "kldstat" and "dmesg" output for question 1,
/var/log/Xorg.0.log for question 2, and the mplayer configuration
directory, whererever it might be today, for question 3. You
can also manually check:

	$ mplayer -vo x11 test.avi

for VESA (should always work), and

	$ mplayer -vo gl test.avi

for direct rendering (works if question 1 and 2 have been
answered with "yes").

I have a reference system (HP mini-laptop) with AMD graphics
that I can check a working configuration for.
Thanks for the information. The output was configured to x11. Changing to gl solved the problem.

No KMS is loaded. Loading drm-510-kmod-5.10.163_8 and xf86-video-ati-19.1.0_6,1 will cause system crash.

 1   33 0xffffffff80200000  21430f0 kernel
 2    1 0xffffffff82520000     3378 acpi_wmi.ko
 3    1 0xffffffff82524000     3218 intpm.ko
 4    1 0xffffffff82528000     2180 smbus.ko
 5    1 0xffffffff8252b000     3340 uhid.ko
 6    1 0xffffffff8252f000     3380 usbhid.ko
 7    1 0xffffffff82533000     32b0 hidbus.ko
 8    1 0xffffffff82537000     3320 wmt.ko
 9    1 0xffffffff8253b000     4350 ums.ko
10    1 0xffffffff82540000     3538 fdescfs.ko

X driver is VESA

[  2016.900] (II) LoadModule: "ati"
[  2016.900] (WW) Warning, couldn't open module ati
[  2016.900] (EE) Failed to load module "ati" (module does not exist, 0)
[  2016.900] (II) LoadModule: "modesetting"
[  2016.900] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[  2016.900] (II) Module modesetting: vendor="X.Org Foundation"
[  2016.900]    compiled for 1.21.1.11, module version = 1.21.1
[  2016.900]    Module class: X.Org Video Driver
[  2016.900]    ABI class: X.Org Video Driver, version 25.2
[  2016.900] (II) LoadModule: "scfb"
[  2016.900] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
[  2016.900] (II) Module scfb: vendor="X.Org Foundation"
[  2016.900]    compiled for 1.21.1.11, module version = 0.0.5
[  2016.900]    ABI class: X.Org Video Driver, version 25.2
[  2016.900] (II) LoadModule: "vesa"
[  2016.900] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
[  2016.901] (II) Module vesa: vendor="X.Org Foundation"
[  2016.901]    compiled for 1.21.1.11, module version = 2.5.0
[  2016.901]    Module class: X.Org Video Driver
[  2016.901]    ABI class: X.Org Video Driver, version 25.2
[  2016.901] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  2016.901] (II) scfb: driver for wsdisplay framebuffer: scfb
[  2016.901] (II) VESA: driver for VESA chipsets: vesa
[  2016.901] (--) Using syscons driver with X support (version 2.0)
[  2016.901] (--) using VT number 9

[  2016.907] (EE) open /dev/dri/card0: No such file or directory

-Jin

--------------sKky1z5YrfhCKjfOC2u6ggAr--