Valheim on steam

The mouse cursor is not locked in the center of the screen so when I press any menu that requires the mouse, it takes a second or two to locate the mouse, it is BAD in stressful situations.

I have accepted the bug as “a thing that will probably be fixed down the line” but now I have died to many times because of not finding the mouse when pressing tab hence not being able to click hp pot in time. Why is this happening? Could it be a KDE thing or something?
The cursor should be locked in the center until menu is accessed.

Not sure if the behavior is present in other games, I mostly play strategy games and such.

Running game natively without proton from steam (steam-runtime)
Tried with both x11 and wayland, same behaviour.

inxi --admin --verbosity=7 --filter --no-host --width                                                                                                                                                ✔ 

System:
  Kernel: 6.1.31-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-6.1-x86_64
    root=UUID=700d034d-b99a-482b-880b-9060acf3a6b3 rw rootflags=subvol=@
    nvidia_drm.modeset=1 quiet splash udev.log_priority=3
  Desktop: KDE Plasma v: 5.27.4 tk: Qt v: 5.15.9 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: X670 AORUS ELITE AX v: -CF
    serial: <superuser required>
  Mobo: Gigabyte model: X670 AORUS ELITE AX v: x.x
    serial: <superuser required> UEFI: American Megatrends LLC. v: F8d
    date: 05/05/2023
Battery:
  Message: No system battery data found. Is one present?
Memory:
  System RAM: available: 31.09 GiB used: 5.45 GiB (17.5%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: AMD Ryzen 9 7900X bits: 64 type: MT MCP arch: Zen 4 gen: 5
    level: v4 note: check built: 2022+ process: TSMC n5 (5nm) family: 0x19 (25)
    model-id: 0x61 (97) stepping: 2 microcode: 0xA601203
  Topology: cpus: 1x cores: 12 tpc: 2 threads: 24 smt: enabled cache:
    L1: 768 KiB desc: d-12x32 KiB; i-12x32 KiB L2: 12 MiB desc: 12x1024 KiB
    L3: 64 MiB desc: 2x32 MiB
  Speed (MHz): avg: 3068 high: 4700 min/max: 3000/5733 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 3057 2: 3000
    3: 3000 4: 3000 5: 3000 6: 3000 7: 4700 8: 3000 9: 3000 10: 3000 11: 2883
    12: 3000 13: 3000 14: 3000 15: 3000 16: 3000 17: 3000 18: 3000 19: 3000
    20: 3000 21: 3000 22: 3000 23: 3000 24: 3000 bogomips: 225274
  Flags: 3dnowprefetch abm adx aes amd_lbr_v2 aperfmperf apic arat avic avx
    avx2 avx512_bf16 avx512_bitalg avx512_vbmi2 avx512_vnni avx512_vpopcntdq
    avx512bw avx512cd avx512dq avx512f avx512ifma avx512vbmi avx512vl bmi1
    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
    constant_tsc cpb cppc cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total
    cqm_occup_llc cr8_legacy cx16 cx8 de decodeassists erms extapic
    extd_apicid f16c flush_l1d flushbyasid fma fpu fsgsbase fsrm fxsr fxsr_opt
    gfni ht hw_pstate ibpb ibrs ibs invpcid irperf lahf_lm lbrv lm mba mca mce
    misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc nopl npt
    nrip_save nx ospke osvw overflow_recov pae pat pausefilter pclmulqdq
    pdpe1gb perfctr_core perfctr_llc perfctr_nb perfmon_v2 pfthreshold pge pku
    pni popcnt pse pse36 rapl rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good
    sep sha_ni skinit smap smca smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3
    stibp succor svm svm_lock syscall tce topoext tsc tsc_scale umip
    v_spec_ctrl v_vmsave_vmload vaes vgif vmcb_clean vme vmmcall vpclmulqdq
    wbnoinvd wdt x2apic x2avic xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves
  Vulnerabilities:
  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_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: NVIDIA GA102 [GeForce RTX 3090] vendor: eVga.com. driver: nvidia
    v: 530.41.03 alternate: nouveau,nvidia_drm non-free: 530.xx+
    status: current (as of 2023-05) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s ports: active: none off: HDMI-A-1
    empty: DP-1,DP-2,DP-3 bus-ID: 01:00.0 chip-ID: 10de:2204 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1
    compositor: kwin_x11 driver: X: loaded: nvidia gpu: nvidia,nvidia-nvswitch
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 81 s-size: 602x343mm (23.70x13.50")
    s-diag: 693mm (27.28")
  Monitor-1: HDMI-A-1 mapped: HDMI-0 note: disabled model: Asus VX279
    serial: <filter> built: 2015 res: 1920x1080 hz: 60 dpi: 79 gamma: 1.2
    size: 621x341mm (24.45x13.43") diag: 690mm (27.2") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  API: OpenGL v: 4.6.0 NVIDIA 530.41.03 renderer: NVIDIA GeForce RTX
    3090/PCIe/SSE2 direct-render: Yes
Audio:
  Device-1: NVIDIA GA102 High Definition Audio vendor: eVga.com.
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:1aef class-ID: 0403
  Device-2: AMD Family 17h/19h HD Audio vendor: Gigabyte
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 15:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.1.31-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 0.3.70 status: off with: wireplumber status: active
    tools: pw-cli,wpctl
  Server-3: PulseAudio v: 16.1 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl
Network:
  Device-1: Realtek RTL8125 2.5GbE vendor: Gigabyte driver: r8169 v: kernel
    pcie: gen: 2 speed: 5 GT/s lanes: 1 port: e000 bus-ID: 0e:00.0
    chip-ID: 10ec:8125 class-ID: 0200
  IF: enp14s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  Device-2: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter
    driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 bus-ID: 0f:00.0
    chip-ID: 14c3:0616 class-ID: 0280
  IF: wlp15s0 state: down mac: <filter>
  WAN IP: <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-7:5 chip-ID: 0e8d:0616
    class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 4.09 TiB used: 1.45 TiB (35.4%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 980 PRO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 5B2QGXA7 temp: 48.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 4B6Q scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Western Digital
    model: WD30EFRX-68EUZN0 size: 2.73 TiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s tech: HDD rpm: 5400 serial: <filter>
    fw-rev: 0A80 scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 128 GiB size: 128 GiB (100.00%) used: 47.11 GiB (36.8%)
    fs: btrfs dev: /dev/sda7 maj-min: 8:7 label: N/A
    uuid: 700d034d-b99a-482b-880b-9060acf3a6b3
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 608 KiB (0.1%) fs: vfat dev: /dev/sda5 maj-min: 8:5 label: N/A
    uuid: AC73-C072
  ID-3: /home raw-size: 104.53 GiB size: 104.53 GiB (100.00%)
    used: 9.4 GiB (9.0%) fs: btrfs dev: /dev/sda8 maj-min: 8:8 label: N/A
    uuid: 2a875645-5701-4450-bd08-adf1f966a07c
  ID-4: /media/diverse raw-size: N/A size: 3.56 TiB used: 1.72 TiB (48.5%)
    fs: cifs dev: /dev/diverse
  ID-5: /media/fil-fitt raw-size: 2.73 TiB size: 2.73 TiB (100.00%)
    used: 1.27 TiB (46.7%) fs: ntfs dev: /dev/sdb2 maj-min: 8:18
    label: Lilla Fil-fitt disken uuid: CE8C0EC38C0EA655
  ID-6: /media/games raw-size: 250 GiB size: 245.02 GiB (98.01%)
    used: 123.07 GiB (50.2%) fs: ext4 dev: /dev/nvme0n1p4 maj-min: 259:4
    label: Games uuid: ccfef3ee-65e0-45e4-aac2-4604ad2e696d
  ID-7: /var/cache raw-size: 128 GiB size: 128 GiB (100.00%)
    used: 47.11 GiB (36.8%) fs: btrfs dev: /dev/sda7 maj-min: 8:7 label: N/A
    uuid: 700d034d-b99a-482b-880b-9060acf3a6b3
  ID-8: /var/log raw-size: 128 GiB size: 128 GiB (100.00%)
    used: 47.11 GiB (36.8%) fs: btrfs dev: /dev/sda7 maj-min: 8:7 label: N/A
    uuid: 700d034d-b99a-482b-880b-9060acf3a6b3
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 32 GiB used: 256 KiB (0.0%) priority: -2
    dev: /dev/sda6 maj-min: 8:6 label: N/A
    uuid: 5ae8fbf5-a704-41ea-be6d-bf26b38325ed
Unmounted:
  ID-1: /dev/nvme0n1p1 maj-min: 259:1 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-2: /dev/nvme0n1p2 maj-min: 259:2 size: 480 GiB fs: ntfs label: Games
    uuid: 68A4C531A4C50294
  ID-3: /dev/nvme0n1p3 maj-min: 259:3 size: 201.5 GiB fs: ext4 label: backup
    uuid: 2b1e42bb-fe37-4fa1-991e-aab694b6b16f
  ID-4: /dev/sda1 maj-min: 8:1 size: 100 MiB fs: vfat label: WIN-BOOT
    uuid: 5483-0EFB
  ID-5: /dev/sda2 maj-min: 8:2 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-6: /dev/sda3 maj-min: 8:3 size: 200 GiB fs: ntfs label: windows
    uuid: 6654845D5484323B
  ID-7: /dev/sda4 maj-min: 8:4 size: 633 MiB fs: ntfs label: windows-extra
    uuid: E61A49731A4941B3
  ID-8: /dev/sdb1 maj-min: 8:17 size: 128 MiB fs: <superuser required>
    label: N/A uuid: N/A
USB:
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-2: 2-0:1 info: super-speed hub ports: 5 rev: 3.1
    speed: 20 Gb/s (2.33 GiB/s) lanes: 2 mode: 3.2 gen-2x2 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-3: 3-0:1 info: hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Device-1: 3-2:2 info: Areson USB Device type: mouse,HID
    driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 12 Mb/s (1.4 MiB/s)
    lanes: 1 mode: 1.1 power: 100mA chip-ID: e0ff:0005 class-ID: 0300
  Device-2: 3-3:3 info: Microsoft Sidewinder X4 type: keyboard,HID
    driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s)
    lanes: 1 mode: 1.1 power: 500mA chip-ID: 045e:0768 class-ID: 0300
  Device-3: 3-6:4 info: Integrated Express RGB LED Controller type: HID
    driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s)
    lanes: 1 mode: 1.1 power: 100mA chip-ID: 048d:5702 class-ID: 0300
  Device-4: 3-7:5 info: MediaTek Wireless_Device type: bluetooth
    driver: btusb interfaces: 3 rev: 2.1 speed: 480 Mb/s (57.2 MiB/s) lanes: 1
    mode: 2.0 power: 100mA chip-ID: 0e8d:0616 class-ID: e001 serial: <filter>
  Hub-4: 4-0:1 info: super-speed hub ports: 5 rev: 3.1
    speed: 20 Gb/s (2.33 GiB/s) lanes: 2 mode: 3.2 gen-2x2 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-5: 5-0:1 info: hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-6: 6-0:1 info: super-speed hub ports: 2 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-7: 7-0:1 info: hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-8: 8-0:1 info: super-speed hub ports: 2 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-9: 9-0:1 info: hi-speed hub with single TT ports: 1 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-10: 9-1:2 info: Genesys Logic Hub ports: 4 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 100mA
    chip-ID: 05e3:0608 class-ID: 0900
  Hub-11: 10-0:1 info: Linux Foundation 3.0 root hub ports: N/A rev: 3.0
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 59.8 C mobo: N/A gpu: nvidia temp: 54 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
  Processes: 444 Uptime: 3h 15m wakeups: 0 Init: systemd v: 252
  default: graphical tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7
  Packages: pm: pacman pkgs: 1384 libs: 388 tools: pamac pm: flatpak pkgs: 0
  Shell: Zsh v: 5.9 default: Bash v: 5.1.16 running-in: yakuake inxi: 3.3.27

Even if the game runs natively on Linux, I have to use Proton. In full screen, the cursor click does not match the displayed position on the screen. But with Proton the game runs without problems.

https://www.protondb.com/app/892970#vUU4-tCVix

Wait what??

From that link:

Game performance and connection issues are too rough for an average user to enjoy. Unless you REALLY want to play Valheim, not recommened.

I don’t agree to that at all, the game runs like butter on my computer, exactly like it runs on windows with this only exception (mouse).
I can join other servers, both on xbox and pc and vice versa. I have no clue what that dude is talking about.

But, sure, I’ll try, it just seems, very unnecessary to use a layer on a game that runs natively.
But ill try and see if it fixes the problem and doesn’t hurt gpu or cpu load too much.

Keep in mind quite a few “native” games are actually the Windows version using a Wine wrapper. Since Proton is a custom, optimized version of Wine that is newer than any wrapper, there’s no surprise it works better.

Well.

I forced it to run with proton8.

Game runs, no problem but the framerate definitely takes a hit, I noticed it immediately (feels more sluggish) and by using mangohud.
Running it with vulcan improves it marginally by a few frames, but yeah, the mouse is fixed but fps gets hurt in the process.

I’ll play a session today and see if it works good enough or if I have to keep looking for another solution.

Perhaps also try Proton Experimental or GE-Proton.

To me, the obvious choice is to make the cursor stick on the method that runs best and consumes less resources, witch is without a doubt native.

I made these observations while playing for a few hours.

Starting the game with vulkan runs best, but even though the load of the gpu is usually only around 45-55% it can not keep up the locked in fps of 120 (in manghud), it usually stays around 80-95fps. This does not happen natively, its dead locked at 120fps with about the same load on gpu and cpu.
If I switch to 60fps, it’s stable.

So yeah, I will not play around with something that clearly is not “better for the game”. I will keep running with the 90fps I get from using proton 8 for now and keep searching for a solution, you kinda get used to it after a while. 90fps is better than dying from a stupid bug.