wayland 에서 output 버퍼를 뒤집는거라

정상적으로 작동하는 느낌이 아니라

데스크 탑 셀 부분까지 강제로 뒤집어서 오작동 하는 느낌?

fullscreen 예제에서는 정상작동하지만 데스크 탑 셀이 없다보니

데스크탑 셀이 있으면 정상적으로 작동 안하는 걸지도?

 

int
window_get_buffer_transform(struct window *window);

void
window_set_buffer_transform(struct window *window,
    enum wl_output_transform transform);

 

normal
0 - no transform
90
1 - 90 degrees counter-clockwise
180
2 - 180 degrees counter-clockwise
270
3 - 270 degrees counter-clockwise
flipped
4 - 180 degree flip around a vertical axis
flipped_90
5 - flip and rotate 90 degrees counter-clockwise
flipped_180
6 - flip and rotate 180 degrees counter-clockwise
flipped_270
7 - flip and rotate 270 degrees counter-clockwise

[링크 : https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_output-enum-transform]

'프로그램 사용 > wayland' 카테고리의 다른 글

wayland buffer  (0) 2022.01.13
wayland client example  (0) 2022.01.06
weston-screenshooter 실행에러  (0) 2022.01.05
weston 단축키  (0) 2022.01.04
weston.ini same-as on output section  (0) 2022.01.03
Posted by 구차니

weston-screenshooter를 이용하여 직접 명령어 라인에서 캡쳐를 해보려하면 아래와 같이 에러가 발생한다.

$ weston-screenshooter
weston_screenshooter@5: error 0: screenshooter failed: permission denied. Debug protocol must be enabled

 

weston --debug를 통해 실행하라는데

$ weston --debug

[링크 : https://blog.lancitou.net/build-and-run-weston-on-ubuntu/]

[링크 : https://www.collabora.com/news-and-blog/blog/2019/04/24/weston-debugging-and-tracing-on-the-fly/]

 

시리얼 콘솔을 통해 접속을 해서 그런지 실행이 안된다.

# weston --debug
Date: 2022-01-13 KST
[11:49:13.239] weston 9.0.0
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: lf-5.10.35-2.0.0-rc2+
[11:49:13.239] Command line: weston --debug
[11:49:13.239] OS: Linux, 5.10.35-lts-5.10.y+g6369370afcb5, #1 SMP PREEMPT Tue Dec 14 09:29:50 UTC 2021, aarch64
[11:49:13.239] Using config file '/etc/xdg/weston/weston.ini'
WARNING: debug protocol has been enabled. This is a potential denial-of-service attack vector and information leak.
[11:49:13.239] Output repaint window is 16 ms maximum.
[11:49:13.240] Loading module '/usr/lib/libweston-9/drm-backend.so'
[11:49:13.244] initializing drm backend
[11:49:13.244] logind: failed to get session seat
[11:49:13.245] logind: cannot setup systemd-logind helper (-61), using legacy fallback
[11:49:13.245] <stdin> not a vt
[11:49:13.245] if running weston from ssh, use --tty to specify a tty
[11:49:13.245] fatal: drm backend should be run using weston-launch binary, or your system should provide the logind D-Bus API.
[11:49:13.245] fatal: failed to create compositor backend
Internal warning: debug scope 'drm-backend' has not been destroyed.

 

weston 실행 스크립트 에서

(내가 가진 시스템에서는 다음 경로에 존재함. /etc/systemd/system/graphical.target.wants/weston.service)

 Service 섹션 ExecStart 의 가장 마지막에 --debug를 추가해주면 문제없이 실행된다.

 

다만.. 경고가 무시무시 하구만.

 

 

+

의외로 별 내용이 없는 함수인데 얘를 실행하면 debug protol must be enabled 에러가 발생한다.

wl_display_roundtrip - Block until all pending request are processed by the server.
int wl_display_roundtrip(struct wl_display *display)
display
The display context object
Returns:
The number of dispatched events on success or -1 on failure
This function blocks until the server has processed all currently issued requests by sending a request to the display server and waiting for a reply before returning.

This function uses wl_display_dispatch_queue() internally. It is not allowed to call this function while the thread is being prepared for reading events, and doing so will cause a dead lock.

Note: This function may dispatch other events being received on the default queue.

[링크 : https://wayland.freedesktop.org/docs/html/apb.html]

[링크 : https://www.systutorials.com/docs/linux/man/3-wl_display_roundtrip/]

 

compositor/weston-screenshooter.c 에서 bind_shooter() 에서 해당 에러를 출력하고

bind_shooter()는 screenshooter_create() 에서 호출이 되고

static void
bind_shooter(struct wl_client *client,
     void *data, uint32_t version, uint32_t id)
{
struct screenshooter *shooter = data;
struct wl_resource *resource;
bool debug_enabled =
weston_compositor_is_debug_protocol_enabled(shooter->ec);

resource = wl_resource_create(client,
      &weston_screenshooter_interface, 1, id);

if (!debug_enabled && !shooter->client) {
wl_resource_post_error(resource, WL_DISPLAY_ERROR_INVALID_OBJECT,
       "screenshooter failed: permission denied. "\
       "Debug protocol must be enabled");
return;
} else if (!debug_enabled && client != shooter->client) {
wl_resource_post_error(resource, WL_DISPLAY_ERROR_INVALID_OBJECT, "screenshooter failed: permission denied.");
return;
}

wl_resource_set_implementation(resource, &screenshooter_implementation, data, NULL);
}

WL_EXPORT void
screenshooter_create(struct weston_compositor *ec)
{
struct screenshooter *shooter;

shooter = zalloc(sizeof *shooter);
if (shooter == NULL)
return;

shooter->ec = ec;

shooter->global = wl_global_create(ec->wl_display,  &weston_screenshooter_interface, 1,   shooter, bind_shooter);
weston_compositor_add_key_binding(ec, KEY_S, MODIFIER_SUPER,  screenshooter_binding, shooter);
weston_compositor_add_key_binding(ec, KEY_R, MODIFIER_SUPER,  recorder_binding, shooter);

shooter->destroy_listener.notify = screenshooter_destroy;
wl_signal_add(&ec->destroy_signal, &shooter->destroy_listener);
}

 

screenshooter_create() 는 desktop-shell/shell.c의 init 함수에서 호출하는데

WL_EXPORT int
wet_shell_init(struct weston_compositor *ec,
       int *argc, char *argv[])
{
screenshooter_create(ec);

shell_add_bindings(ec, shell);

shell_fade_init(shell);

clock_gettime(CLOCK_MONOTONIC, &shell->startup_time);

return 0;
}

 

이미 등록되어 있어서 새로 등록할 수 없다고 나오는 건진 애매하네..

위에서 wl_create() 하면서 이미 생성된 것에 bind 하려고 하다 보니 에러가 나는 것 같은데

bind 여부를 wl_display_roundtrip() 에서 하진 않을 것 같고 지연된 에러라고 보기에는

딜레이를 주고 실행해도 딱 그 위치에서 나오니 애매하네..

static void
handle_global(void *data, struct wl_registry *registry,
      uint32_t name, const char *interface, uint32_t version)
{
static struct screenshooter_output *output;
struct screenshooter_data *sh_data = data;

if (strcmp(interface, "wl_output") == 0) {
output = xmalloc(sizeof *output);
output->output = wl_registry_bind(registry, name,
  &wl_output_interface, 1);
wl_list_insert(&sh_data->output_list, &output->link);
wl_output_add_listener(output->output, &output_listener, output);
} else if (strcmp(interface, "wl_shm") == 0) {
sh_data->shm = wl_registry_bind(registry, name, &wl_shm_interface, 1);
} else if (strcmp(interface, "weston_screenshooter") == 0) {
sh_data->screenshooter = wl_registry_bind(registry, name,  &weston_screenshooter_interface,  1);
}
}

static const struct wl_registry_listener registry_listener = {
handle_global,
handle_global_remove
};

'프로그램 사용 > wayland' 카테고리의 다른 글

wayland client example  (0) 2022.01.06
weston window transform  (0) 2022.01.06
weston 단축키  (0) 2022.01.04
weston.ini same-as on output section  (0) 2022.01.03
weston-image 와 cairo  (0) 2021.12.08
Posted by 구차니

super(win) + R은 녹화한다는데

wcap이 16byte짜리만 생겨서 정상적으로 작동하는질 모르겠다..

 

[링크 : https://stackoverflow.com/questions/23856154/how-to-take-screenshot-under-wayland]

[링크 : https://wiki.archlinux.org/title/Weston]

'프로그램 사용 > wayland' 카테고리의 다른 글

weston window transform  (0) 2022.01.06
weston-screenshooter 실행에러  (0) 2022.01.05
weston.ini same-as on output section  (0) 2022.01.03
weston-image 와 cairo  (0) 2021.12.08
rpi3b 64bit weston  (0) 2021.12.03
Posted by 구차니

되는게 없냐 -_-

 

[링크 : https://man.archlinux.org/man/weston-drm.7.en]

 

it looks like you are doing the right thing with weston.ini. I'm guessing that your hardware does not support what you want though. Support for shared CRTC clone mode in hardware is rare and might be limited to just two very particular connectors.

[링크 : https://www.mail-archive.com/wayland-devel@lists.freedesktop.org/msg41071.html]

[링크 : https://www.mail-archive.com/wayland-devel@lists.freedesktop.org/msg41078.html]

 

[링크 : https://community.nxp.com/.../Dual-display-extended-mode-with-weston-and-IMX8MQEVK-board/.../1207565]

'프로그램 사용 > wayland' 카테고리의 다른 글

weston-screenshooter 실행에러  (0) 2022.01.05
weston 단축키  (0) 2022.01.04
weston-image 와 cairo  (0) 2021.12.08
rpi3b 64bit weston  (0) 2021.12.03
wayland screen share  (0) 2021.12.02
Posted by 구차니
프로그램 사용/rtl-sdr2021. 12. 27. 21:30

/dev/dsp는 OSS의 일부인데

해당 기능을 활성화 하려면 아래의 모듈을 불러오면 된다고

# modprobe snd-pcm-oss

 

아래처럼 하면 소리가 난다는 것 같다.

sudo sh -c 'cat file.wav > /dev/dsp'

[링크 : https://unix.stackexchange.com/questions/103746/why-wont-linux-let-me-play-with-dev-dsp]

 

+

2022.01.03

xwxtoimg 에서 해보려고 찾아두고는 얼마나 안해보고 있는거냐..

 

+

2022.06.08

ubuntu 18.04에서 시도해보았으나 동일한 모듈은 없고.

비슷한걸 찾아서 넣어봐도 /dev/dsp나 sound 등이 생성되진 않았다.

$ grep -rni oss  /lib/modules/5.4.0-113-generic/
/lib/modules/5.4.0-113-generic/modules.alias:26312:alias sound-service-?-0 snd_mixer_oss
/lib/modules/5.4.0-113-generic/modules.order:1161:kernel/drivers/net/ethernet/alacritech/slicoss.ko
/lib/modules/5.4.0-113-generic/modules.order:4550:kernel/sound/core/oss/snd-mixer-oss.ko

$ sudo modprobe snd_mixer_oss

$ lsmod | grep oss
snd_mixer_oss          24576  0
snd                    86016  18 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm,snd_hda_codec_idt,snd_rawmidi,snd_mixer_oss

 

+
pulseaudio와 osspd 라는 녀석을 설치하니 뜬다!

$ sudo apt-get install pulseaudio libpulse-dev osspd
$ ls -al /dev/dsp
crw-rw-rw- 1 root root 14, 3  6월  8 12:14 /dev/dsp

[링크 : https://askubuntu.com/questions/1025532/initaudi-cannot-open-oss-audio-device-dev-dsp]

'프로그램 사용 > rtl-sdr' 카테고리의 다른 글

rpi gqrx  (0) 2022.01.07
rtl sdr am  (0) 2022.01.07
rtl-sdr noaa 안테나 만들어서 재시도  (0) 2021.12.27
부품 도착! + 공짜 도착!  (2) 2021.12.27
wxtoimg linux  (0) 2021.12.26
Posted by 구차니
프로그램 사용/rtl-sdr2021. 12. 27. 20:47

흐음.. 여전하네 머가 문제일까?

이번 변경사항

1. 안테나 만듦

2. hardware gain off / gain 34dB 정도로 고정

 

 

 

 

여긴 윈도우 버전 (2.11.2 beta)

 

 

 

아 몰라 귀찮아 안할래!!!

'프로그램 사용 > rtl-sdr' 카테고리의 다른 글

rtl sdr am  (0) 2022.01.07
/dev/dsp snd pcm  (0) 2021.12.27
부품 도착! + 공짜 도착!  (2) 2021.12.27
wxtoimg linux  (0) 2021.12.26
multiple rtl-sdr 사용하기  (0) 2021.12.26
Posted by 구차니
프로그램 사용/rtl-sdr2021. 12. 27. 20:43

오늘은 크리스마스에 맞춰 산게 죄다 밀려서 오늘 우르르 온 날!

 

BNC / MCX / SMA 커넥터들

orange pi 3

 

'프로그램 사용 > rtl-sdr' 카테고리의 다른 글

/dev/dsp snd pcm  (0) 2021.12.27
rtl-sdr noaa 안테나 만들어서 재시도  (0) 2021.12.27
wxtoimg linux  (0) 2021.12.26
multiple rtl-sdr 사용하기  (0) 2021.12.26
rtl-sdr rpi 와 윈도우 드라이버 차이?  (0) 2021.12.25
Posted by 구차니
프로그램 사용/rtl-sdr2021. 12. 26. 19:52

우분투용 패키지로 wxtoimg/xwxtoimg를 설치했는데

장치(사운드카드)로 /dev/padsp, /dev/dsp, /dev/adsp 등으로만 나와서 찾아보는 중.

 

[링크 : https://forums.opensuse.org/.../512322-WXtoIMG-program-for-APT-satellites-no-dev-dsp-Opensuse-13-2]

[링크 : https://community.libre.space/t/wxtoimg-not-able-to-find-soundcard/7883]

 

Posted by 구차니
프로그램 사용/rtl-sdr2021. 12. 26. 18:36

grc 파일을 받아서 화살표 왼쪽의 것을 누르면 파이썬 파일로 저장되고

화살표를 누르면 실행되는 척 하다가 바로 Done이 뜬다.

 

아무튼 혹시나 해서 스크립트를 직접 실행하니 먼가 되는 것 같긴한데

$ ./multi_dongle_s4_8_gqrx_fifo.py 
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.8.1.0
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp 
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
[R82XX] PLL not locked!
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.8.1.0
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp 
Using device #1 Realtek RTL2838UHIDIR SN: 00000001
Found Fitipower FC0012 tuner
Press Enter to quit: 

 

gqrx에서 아래의 명령어를 넣어서 하라는데,

홈페이지의 인자와 생성된 파일이 변수가 달라서 재생이 2배속을 되거나 1/2배속이 되어서

아래처럼 rate의 값과 config에서의 input rate를 맞춰주면되고, freq는 고정되서 gqrx에서 변경이 불가능 하니 주의해야 한다.

file=/tmp/fifo_gqrx,freq=951e5,rate=4.8e6,repeat=false,throttle=false

몇번 해보는데 작동하다가 부하가 걸리면 죽고

파이썬 자체에서 fifo로 내보내야 하는데 fifo가 이상해지는지

다시 gqrx를 실행하면 아까 나온대로 나오다가 죽는걸 보면..

gqrx를 통해 생성한 스크립트가 문제가 있는걸지도 모르겠다.

 

그게 아니라면 CPU 성능이 후달리는게 아닐까 의심이..

파이썬 스크립트 돌리는데 cpu 살살 녹네 -_ㅠ

 

[링크 : https://blog.fusionimage.at/2016/01/update-4-rtl-sdrs-8-4-mhz-bandwidth-gqrx/]

[링크 : https://www.rtl-sdr.com/combining-the-bandwidth-of-multiple-rtl-sdrs-now-working-in-gqrx/]

'프로그램 사용 > rtl-sdr' 카테고리의 다른 글

부품 도착! + 공짜 도착!  (2) 2021.12.27
wxtoimg linux  (0) 2021.12.26
rtl-sdr rpi 와 윈도우 드라이버 차이?  (0) 2021.12.25
ISS(국제우주정거장) 궤도  (0) 2021.12.25
gnu radio  (0) 2021.12.23
Posted by 구차니
프로그램 사용/rtl-sdr2021. 12. 25. 22:30

공통조건

3.2 MSPS / RTL AGC ON

 

라즈베리는  arm / linux / tcp 전송

pc는 x86 / window / usb 전송

 

특이하게 대역폭이 차이가 난다.

sdr# 버그는 아닌것 같고.. 아무래도 libusb를 통해 설치된 드라이버가 윈도우용 버그가 있는지

3.2MSPS 하면 2.6(2.56MSPS) 정도로 설정되는 것 같다.

의도한 것과 다르게 설정 되는 듯?

 

rpi RF Gain 0dB

104MHz ~ 106.6MHz

 

rpi RF Gain  49.6 dB(최대)

 

pc RF Gain 0dB

103.7MHz ~ 106.9MHz

 

pc RF Gain 49.6dB

'프로그램 사용 > rtl-sdr' 카테고리의 다른 글

wxtoimg linux  (0) 2021.12.26
multiple rtl-sdr 사용하기  (0) 2021.12.26
ISS(국제우주정거장) 궤도  (0) 2021.12.25
gnu radio  (0) 2021.12.23
NEO-6M GPS 안테나  (0) 2021.12.23
Posted by 구차니