ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
632 stars 74 forks source link

HL2 beta (with gamepad UI enabled & using Vulkan) messes with monitors' configuration #3834

Open dsalt opened 2 years ago

dsalt commented 2 years ago

On launch, the monitor modes are messed with.

✓ The right (primary) monitor is used for displaying the game. This is as I want it.

✗ The display settings are altered. The right monitor is effectively disabled: the pointer is locked to the left monitor, and remains there after exiting the game. I have to reconfigure via xrandr to restore things.

Since the pointer is locked to the left monitor (and the game and Steam windows are on the right monitor) I have to close the window via the window manager or use the in-game console to exit the game – keyboard (and controller?) navigation of HL2's exit dialogue appears to be missing.

This happens only with the gamepad UI and Vulkan in use.

Xfce 4.16 on Devuan stable; current Steam beta (as of report date); amdgpu DDX 21.0.0; Mesa 21.3.5 (but also observed with various 21.2.x).

Monitors are both 1080p: left at 60Hz, right at 120Hz.

dsalt commented 2 years ago

HL2 is setting the monitor to 144Hz for the Valve logo clip then to either 48Hz or 60Hz. However, xrandr still reports 120Hz.

It also seems to be triggering the following, though not consistently:

[670606.206813] [drm:dal_irq_service_dummy_ack] *ERROR* dal_irq_service_dummy_ack: called for non-implemented irq source
[670606.206828] [drm:dal_irq_service_dummy_set] *ERROR* dal_irq_service_dummy_set: called for non-implemented irq source
[670631.816563] ------------[ cut here ]------------
[670631.816566] amdgpu 0000:28:00.0: drm_WARN_ON(atomic_read(&vblank->refcount) == 0)
[670631.816574] WARNING: CPU: 2 PID: 0 at drm_vblank_put+0xe2/0xf0
[670631.816581] Modules linked in: snd_usb_audio uvcvideo snd_usbmidi_lib videobuf2_vmalloc videobuf2_memops snd_hwdep videobuf2_v4l2 snd_rawmidi videobuf2_common snd_seq_device btusb btbcm btintel bnep bluetooth cpufreq_conservative md4 efivarfs vfat fat nct6775 hwmon_vid pktcdvd em28xx_rc em28xx_dvb si2157 si2168 i2c_mux snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi em28xx snd_hda_intel dvb_usb_dvbsky tveeprom joydev snd_intel_dspcfg snd_hda_codec snd_hda_core snd_pcm_oss snd_mixer_oss snd_pcm snd_timer k10temp sg sp5100_tco
[670631.816609] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G        W         5.15.22 #1
[670631.816612] Hardware name: Micro-Star International Co., Ltd MS-7C02/B450 TOMAHAWK MAX (MS-7C02), BIOS 3.C3 09/27/2021
[670631.816614] RIP: 0010:drm_vblank_put+0xe2/0xf0
[670631.816617] Code: 8b 78 08 4c 8b 67 50 4d 85 e4 74 22 e8 87 34 3f 00 48 c7 c1 e8 04 a6 82 4c 89 e2 48 c7 c7 db 7e a5 82 48 89 c6 e8 5e 7f 6c 00 <0f> 0b eb c3 4c 8b 27 eb d9 0f 1f 44 00 00 8b b7 90 00 00 00 48 8b
[670631.816620] RSP: 0018:ffffc90000220de8 EFLAGS: 00010082
[670631.816622] RAX: 0000000000000000 RBX: ffff8881029e2800 RCX: 0000000000000000
[670631.816623] RDX: 0000000000010004 RSI: ffffffff82a2a43b RDI: 00000000ffffffff
[670631.816624] RBP: ffff8881028a0000 R08: 40000000ffffe4ea R09: 0000000083346164
[670631.816625] R10: ffffffffffffffff R11: 000000002d2d2d2d R12: ffff8881012371e0
[670631.816627] R13: ffff8881028a0170 R14: ffff8881696ab700 R15: ffff8881028b4e00
[670631.816628] FS:  0000000000000000(0000) GS:ffff88842ec80000(0000) knlGS:0000000000000000
[670631.816630] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[670631.816631] CR2: 000034080238c000 CR3: 0000000149809000 CR4: 0000000000350ee0
[670631.816632] Call Trace:
[670631.816634]  <IRQ>
[670631.816635]  dm_pflip_high_irq+0xa0/0x1d0
[670631.816641]  amdgpu_dm_irq_handler+0x84/0x1c0
[670631.816643]  amdgpu_irq_dispatch+0xa5/0x150
[670631.816647]  amdgpu_ih_process+0x7b/0xf0
[670631.816650]  amdgpu_irq_handler+0x1c/0x90
[670631.816652]  __handle_irq_event_percpu+0x2f/0xc0
[670631.816656]  handle_irq_event+0x50/0xb0
[670631.816659]  handle_edge_irq+0x9e/0x200
[670631.816661]  __common_interrupt+0x64/0x100
[670631.816664]  common_interrupt+0x9f/0xc0
[670631.816668]  </IRQ>
[670631.816668]  <TASK>
[670631.816669]  asm_common_interrupt+0x1e/0x40
[670631.816672] RIP: 0010:cpuidle_enter_state+0xc0/0x2a0
[670631.816676] Code: e8 55 7a 6a ff 31 ff 49 89 c5 e8 fb 8e 6a ff 45 84 f6 74 12 9c 58 f6 c4 02 0f 85 d1 01 00 00 31 ff e8 e4 f5 6e ff fb 45 85 ff <0f> 88 c8 00 00 00 49 63 c7 4c 2b 2c 24 48 8d 14 40 48 8d 0c 90 48
[670631.816678] RSP: 0018:ffffc90000157ea8 EFLAGS: 00000202
[670631.816679] RAX: ffff88842ec80000 RBX: ffff88810280bc00 RCX: 000000000000001f
[670631.816680] RDX: 0000000000000000 RSI: ffffffff82a2a43b RDI: ffffffff82a3e47e
[670631.816682] RBP: 0000000000000002 R08: 0000000000000002 R09: 0002620ee7f910a6
[670631.816683] R10: 00000000000052c8 R11: 000000000000151f R12: ffffffff82d32b00
[670631.816684] R13: 000261efa3326c86 R14: 0000000000000000 R15: 0000000000000002
[670631.816686]  ? cpuidle_enter_state+0xa5/0x2a0
[670631.816689]  cpuidle_enter+0x24/0x40
[670631.816692]  do_idle+0x1cb/0x220
[670631.816695]  cpu_startup_entry+0x14/0x20
[670631.816697]  secondary_startup_64_no_verify+0xb0/0xbb
[670631.816701]  </TASK>
[670631.816702] ---[ end trace 2ef1e841890e3024 ]---
purplebar0 commented 1 year ago

I will add that for me, fullscreen mode completely blanks out my monitor unless I launch with windowed mode, but closing thereafter blanks my display again. Even ending X then starting it again doesn't restore it for me, I needed to fully reboot.

Mesa: mesa-tkg-git 23.0.0_devel.163520.8d3c96a49cf-1 GPU: AMD Radeon RX 6600 XT Monitor (over HDMI): AOC 24G2U/BK 24" 1920x1080 144 Hz