rot8 icon indicating copy to clipboard operation
rot8 copied to clipboard

'Unable to deserialize swaymsg JSON output'

Open enrico223 opened this issue 2 years ago • 4 comments

Distribution: Fedora 36 WM: Sway Problem: it does not work RUST_BACKTRACE=full rot8 output:

thread 'main' panicked at 'Unable to deserialize swaymsg JSON output: Error("missing field `transform`", line: 296, column: 3)', src/main.rs:72:18
stack backtrace:
   0:     0x5611b5279a1c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h572300f0ebfde2a7
   1:     0x5611b529dd5c - core::fmt::write::h9a40954895def713
   2:     0x5611b5275ab1 - std::io::Write::write_fmt::h589135a83419f2d6
   3:     0x5611b527b245 - std::panicking::default_hook::{{closure}}::h619386df4f38a529
   4:     0x5611b527af04 - std::panicking::default_hook::ha87f40e82c315143
   5:     0x5611b527b978 - std::panicking::rust_panic_with_hook::h220e25558f92196d
   6:     0x5611b527b687 - std::panicking::begin_panic_handler::{{closure}}::hffd3696cd0a1a22a
   7:     0x5611b5279eb4 - std::sys_common::backtrace::__rust_end_short_backtrace::hbec50169ea271f2f
   8:     0x5611b527b3a9 - rust_begin_unwind
   9:     0x5611b5178313 - core::panicking::panic_fmt::h5f7f26e7daf91179
  10:     0x5611b5178403 - core::result::unwrap_failed::h8978d5eaf6c8d94c
  11:     0x5611b5184703 - rot8::main::h1c87f8fb115403d5
  12:     0x5611b517da56 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb7cd74be5b415e46
  13:     0x5611b517ebc2 - std::rt::lang_start::{{closure}}::h93dc38bfd0ba8474
  14:     0x5611b52791ce - std::rt::lang_start_internal::hf89834035bdbd4c6
  15:     0x5611b51864e2 - main
  16:     0x7f15518f4550 - __libc_start_call_main
  17:     0x7f15518f4609 - __libc_start_main_impl
  18:     0x5611b5178b45 - _start
  19:                0x0 - <unknown>  

enrico223 avatar Jul 30 '22 16:07 enrico223

what sway version are you using? Also, what is the output of running this command?:

swaymsg -t get_outputs

juanbono avatar Aug 01 '22 12:08 juanbono

Sway version: 1.7 Output for swaymsg -t get_outputs :

Output eDP-1 'Chimei Innolux Corporation 0x1376 0x00000000' (focused)
  Current mode: 1920x1080 @ 60.001 Hz
  Position: 0,0
  Scale factor: 1.300000
  Scale filter: linear
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 3
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    1920x1080 @ 60.001 Hz

enrico223 avatar Aug 01 '22 14:08 enrico223

that's really weird, the transform field is there

juanbono avatar Aug 12 '22 21:08 juanbono

I really have no idea why it happened. I am now on EndeavourOS and I don't have that problem anymore. Could it be a driver issue? Not rot8 fault.

enrico223 avatar Sep 01 '22 09:09 enrico223

I encountered this today because of a "blind" HDMI output on my laptop (worked fine so far, I guess some driver-/kernel-/?- update added this output?)

Click for full output of swaymsg -t get_outputs.

❯ swaymsg -t get_outputs | jq
[
  {
    "id": 3,
    "type": "output",
    "orientation": "none",
    "percent": 1.0,
    "urgent": false,
    "marks": [],
    "layout": "output",
    "border": "none",
    "current_border_width": 0,
    "rect": {
      "x": 5540,
      "y": 2640,
      "width": 1920,
      "height": 1200
    },
    "deco_rect": {
      "x": 0,
      "y": 0,
      "width": 0,
      "height": 0
    },
    "window_rect": {
      "x": 0,
      "y": 0,
      "width": 0,
      "height": 0
    },
    "geometry": {
      "x": 0,
      "y": 0,
      "width": 0,
      "height": 0
    },
    "name": "eDP-1",
    "window": null,
    "nodes": [],
    "floating_nodes": [],
    "focus": [
      16,
      12,
      44,
      5,
      23
    ],
    "fullscreen_mode": 0,
    "sticky": false,
    "primary": false,
    "make": "Sharp Corporation",
    "model": "LQ134N1JW52",
    "serial": "Unknown",
    "modes": [
      {
        "width": 1920,
        "height": 1200,
        "refresh": 120003,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1920,
        "height": 1200,
        "refresh": 96048,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1920,
        "height": 1200,
        "refresh": 72013,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1920,
        "height": 1200,
        "refresh": 60002,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1920,
        "height": 1200,
        "refresh": 60003,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1920,
        "height": 1200,
        "refresh": 50008,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1920,
        "height": 1200,
        "refresh": 48009,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1920,
        "height": 1080,
        "refresh": 120003,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1600,
        "height": 1200,
        "refresh": 120003,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1680,
        "height": 1050,
        "refresh": 120003,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1280,
        "height": 1024,
        "refresh": 120003,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1440,
        "height": 900,
        "refresh": 120003,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1280,
        "height": 800,
        "refresh": 120003,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1280,
        "height": 720,
        "refresh": 120003,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 1024,
        "height": 768,
        "refresh": 120003,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 800,
        "height": 600,
        "refresh": 120003,
        "picture_aspect_ratio": "none"
      },
      {
        "width": 640,
        "height": 480,
        "refresh": 120003,
        "picture_aspect_ratio": "none"
      }
    ],
    "non_desktop": false,
    "active": true,
    "dpms": true,
    "power": true,
    "scale": 1.0,
    "scale_filter": "nearest",
    "transform": "normal",
    "adaptive_sync_status": "disabled",
    "current_workspace": "1",
    "current_mode": {
      "width": 1920,
      "height": 1200,
      "refresh": 60003,
      "picture_aspect_ratio": "none"
    },
    "max_render_time": 0,
    "focused": true,
    "subpixel_hinting": "unknown"
  },
  {
    "primary": false,
    "make": "Unknown",
    "model": "Unknown",
    "serial": "Unknown",
    "modes": [
      {
        "width": 640,
        "height": 480,
        "refresh": 59940
      }
    ],
    "non_desktop": false,
    "type": "output",
    "name": "HDMI-A-1",
    "active": false,
    "dpms": false,
    "power": false,
    "current_workspace": null,
    "rect": {
      "x": 0,
      "y": 0,
      "width": 0,
      "height": 0
    },
    "percent": null
  }
]

grandchild avatar Sep 24 '23 06:09 grandchild

N.B. I'm not trying to rotate that output, but rot8 probably parses all outputs regardless of which is the target?

grandchild avatar Sep 24 '23 06:09 grandchild