프로그램 사용/vi2022. 7. 28. 11:46

18.04 에서 이상하게 늦게 켜지는 경우가 있는데(3초 정도?)

검색을 해보니 기본이 vim.gtk3 로 연결되어 있어 xwin 체크혹은 timeout 기다리다 늦는것 같다.

$ ls -al /usr/bin/vim
lrwxrwxrwx 1 root root 21  5월 13  2021 /usr/bin/vim -> /etc/alternatives/vim

$ ls -al /etc/alternatives/vim
lrwxrwxrwx 1 root root 17  9월 15  2021 /etc/alternatives/vim -> /usr/bin/vim.gtk3

$ ls -al /usr/bin/vim.
vim.basic  vim.gtk3   vim.tiny

[링크 : https://pinocc.tistory.com/173]

 

아래의 명령어를 이용해서 편리하게 교체가 가능하지만 콘솔에서 느린건 여전했다.

sudo update-alternatives --config editor
대체 항목 editor에 대해 (/usr/bin/editor 제공) 6개 선택이 있습니다.

  선택       경로              우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/vim.gtk3    50        자동 모드
  1            /bin/ed             -100       수동 모드
  2            /bin/nano            40        수동 모드
  3            /usr/bin/mcedit      25        수동 모드
  4            /usr/bin/vim.basic   30        수동 모드
  5            /usr/bin/vim.gtk3    50        수동 모드
  6            /usr/bin/vim.tiny    15        수동 모드

Press <enter> to keep the current choice[*], or type selection number: 4
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in manual mode

$ sudo update-alternatives --config editor
대체 항목 editor에 대해 (/usr/bin/editor 제공) 6개 선택이 있습니다.

  선택       경로              우선순▒ 상태
------------------------------------------------------------
  0            /usr/bin/vim.gtk3    50        자동 모드
  1            /bin/ed             -100       수동 모드
  2            /bin/nano            40        수동 모드
  3            /usr/bin/mcedit      25        수동 모드
* 4            /usr/bin/vim.basic   30        수동 모드
  5            /usr/bin/vim.gtk3    50        수동 모드
  6            /usr/bin/vim.tiny    15        수동 모드

Press <enter> to keep the current choice[*], or type selection number:

[링크 : https://askubuntu.com/questions/891928/]

 

--all 옵션주고 하나하나 조심히 보다가 vim 관련 나오면 vim.basic 으로 전부 설정.

sudo update-alternatives --all
There is only one alternative in link group animate (providing /usr/bin/animate): /usr/bin/animate-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group animate-im6 (providing /usr/bin/animate-im6): /usr/bin/animate-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group aptitude (providing /usr/bin/aptitude): /usr/bin/aptitude-curses
설정할 것이 없습니다.
대체 항목 awk에 대해 (/usr/bin/awk 제공) 2개 선택이 있습니다.

  선택       경로          우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/gawk    10        자동 모드
  1            /usr/bin/gawk    10        수동 모드
  2            /usr/bin/mawk    5         수동 모드

Press <enter> to keep the current choice[*], or type selection number:
There is only one alternative in link group builtins.7.gz (providing /usr/share/man/man7/builtins.7.gz): /usr/share/man/man7/bash-builtins.7.gz
설정할 것이 없습니다.
There is only one alternative in link group c++ (providing /usr/bin/c++): /usr/bin/g++
설정할 것이 없습니다.
There is only one alternative in link group c89 (providing /usr/bin/c89): /usr/bin/c89-gcc
설정할 것이 없습니다.
There is only one alternative in link group c99 (providing /usr/bin/c99): /usr/bin/c99-gcc
설정할 것이 없습니다.
There is only one alternative in link group cc (providing /usr/bin/cc): /usr/bin/gcc
설정할 것이 없습니다.
There is only one alternative in link group compare (providing /usr/bin/compare): /usr/bin/compare-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group compare-im6 (providing /usr/bin/compare-im6): /usr/bin/compare-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group composite (providing /usr/bin/composite): /usr/bin/composite-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group composite-im6 (providing /usr/bin/composite-im6): /usr/bin/composite-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group conjure (providing /usr/bin/conjure): /usr/bin/conjure-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group conjure-im6 (providing /usr/bin/conjure-im6): /usr/bin/conjure-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group convert (providing /usr/bin/convert): /usr/bin/convert-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group convert-im6 (providing /usr/bin/convert-im6): /usr/bin/convert-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group cpp (providing /lib/cpp): /usr/bin/cpp
설정할 것이 없습니다.
There is only one alternative in link group default.plymouth (providing /usr/share/plymouth/themes/default.plymouth): /usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth
설정할 것이 없습니다.
There is only one alternative in link group display (providing /usr/bin/display): /usr/bin/display-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group display-im6 (providing /usr/bin/display-im6): /usr/bin/display-im6.q16
설정할 것이 없습니다.
대체 항목 editor에 대해 (/usr/bin/editor 제공) 6개 선택이 있습니다.

  선택       경로              우선순▒ 상태
------------------------------------------------------------
  0            /usr/bin/vim.gtk3    50        자동 모드
  1            /bin/ed             -100       수동 모드
  2            /bin/nano            40        수동 모드
  3            /usr/bin/mcedit      25        수동 모드
* 4            /usr/bin/vim.basic   30        수동 모드
  5            /usr/bin/vim.gtk3    50        수동 모드
  6            /usr/bin/vim.tiny    15        수동 모드

Press <enter> to keep the current choice[*], or type selection number: 4
There is only one alternative in link group eview (providing /usr/bin/eview): /usr/bin/vim.gtk3
설정할 것이 없습니다.
There is only one alternative in link group evim (providing /usr/bin/evim): /usr/bin/vim.gtk3
설정할 것이 없습니다.
대체 항목 ex에 대해 (/usr/bin/ex 제공) 3개 선택이 있습니다.

  선택       경로              우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/vim.gtk3    50        자동 모드
  1            /usr/bin/vim.basic   30        수동 모드
  2            /usr/bin/vim.gtk3    50        수동 모드
  3            /usr/bin/vim.tiny    15        수동 모드

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in manual mode
대체 항목 fakeroot에 대해 (/usr/bin/fakeroot 제공) 2개 선택이 있습니다.

  선택       경로                  우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/fakeroot-sysv   50        자동 모드
  1            /usr/bin/fakeroot-sysv   50        수동 모드
  2            /usr/bin/fakeroot-tcp    30        수동 모드

Press <enter> to keep the current choice[*], or type selection number:
There is only one alternative in link group from (providing /usr/bin/from): /usr/bin/bsd-from
설정할 것이 없습니다.
There is only one alternative in link group ftp (providing /usr/bin/ftp): /usr/bin/netkit-ftp
설정할 것이 없습니다.
There is only one alternative in link group gcc-arm-none-eabi-include (providing /usr/lib/arm-none-eabi/include): /usr/include/newlib
설정할 것이 없습니다.
There is only one alternative in link group gcc-arm-none-eabi-lib (providing /usr/lib/arm-none-eabi/lib): /usr/lib/arm-none-eabi/newlib
설정할 것이 없습니다.
There is only one alternative in link group gdm3.css (providing /usr/share/gnome-shell/theme/gdm3.css): /usr/share/gnome-shell/theme/ubuntu.css
설정할 것이 없습니다.
There is only one alternative in link group gnome-text-editor (providing /usr/bin/gnome-text-editor): /usr/bin/gedit
설정할 것이 없습니다.
대체 항목 gnome-www-browser에 대해 (/usr/bin/gnome-www-browser 제공) 2개 선택이 있습니다.

  선택       경로                         우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/google-chrome-stable   200       자동 모드
  1            /usr/bin/firefox                40        수동 모드
  2            /usr/bin/google-chrome-stable   200       수동 모드

Press <enter> to keep the current choice[*], or type selection number:
There is only one alternative in link group google-chrome (providing /usr/bin/google-chrome): /usr/bin/google-chrome-stable
설정할 것이 없습니다.
There is only one alternative in link group gstreamer-codec-install (providing /usr/bin/gstreamer-codec-install): /usr/lib/packagekit/pk-gstreamer-install
설정할 것이 없습니다.
There is only one alternative in link group gview (providing /usr/bin/gview): /usr/bin/vim.gtk3
설정할 것이 없습니다.
There is only one alternative in link group gvim (providing /usr/bin/gvim): /usr/bin/vim.gtk3
설정할 것이 없습니다.
There is only one alternative in link group gvimdiff (providing /usr/bin/gvimdiff): /usr/bin/vim.gtk3
설정할 것이 없습니다.
There is only one alternative in link group identify (providing /usr/bin/identify): /usr/bin/identify-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group identify-im6 (providing /usr/bin/identify-im6): /usr/bin/identify-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group import (providing /usr/bin/import): /usr/bin/import-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group import-im6 (providing /usr/bin/import-im6): /usr/bin/import-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group infobrowser (providing /usr/bin/infobrowser): /usr/bin/info
설정할 것이 없습니다.
There is only one alternative in link group libblas.so.3-x86_64-linux-gnu (providing /usr/lib/x86_64-linux-gnu/libblas.so.3): /usr/lib/x86_64-linux-gnu/blas/libblas.so.3
설정할 것이 없습니다.
There is only one alternative in link group liblapack.so.3-x86_64-linux-gnu (providing /usr/lib/x86_64-linux-gnu/liblapack.so.3): /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3
설정할 것이 없습니다.
There is only one alternative in link group locate (providing /usr/bin/locate): /usr/bin/mlocate
설정할 것이 없습니다.
There is only one alternative in link group lzma (providing /usr/bin/lzma): /usr/bin/xz
설정할 것이 없습니다.
There is only one alternative in link group mogrify (providing /usr/bin/mogrify): /usr/bin/mogrify-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group mogrify-im6 (providing /usr/bin/mogrify-im6): /usr/bin/mogrify-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group montage (providing /usr/bin/montage): /usr/bin/montage-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group montage-im6 (providing /usr/bin/montage-im6): /usr/bin/montage-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group mt (providing /bin/mt): /bin/mt-gnu
설정할 것이 없습니다.
대체 항목 my.cnf에 대해 (/etc/mysql/my.cnf 제공) 2개 선택이 있습니다.

  선택       경로                      우선순▒ 상태
------------------------------------------------------------
* 0            /etc/mysql/mariadb.cnf       200       자동 모드
  1            /etc/mysql/mariadb.cnf       200       수동 모드
  2            /etc/mysql/my.cnf.fallback   100       수동 모드

Press <enter> to keep the current choice[*], or type selection number:
There is only one alternative in link group nc (providing /bin/nc): /bin/nc.openbsd
설정할 것이 없습니다.
대체 항목 newt-palette에 대해 (/etc/newt/palette 제공) 2개 선택이 있습니다.

  선택       경로                      우선순▒ 상태
------------------------------------------------------------
* 0            /etc/newt/palette.ubuntu     50        자동 모드
  1            /etc/newt/palette.original   20        수동 모드
  2            /etc/newt/palette.ubuntu     50        수동 모드

Press <enter> to keep the current choice[*], or type selection number:
대체 항목 pager에 대해 (/usr/bin/pager 제공) 2개 선택이 있습니다.

  선택       경로          우선순▒ 상태
------------------------------------------------------------
* 0            /bin/less        77        자동 모드
  1            /bin/less        77        수동 모드
  2            /bin/more        50        수동 모드

Press <enter> to keep the current choice[*], or type selection number:
There is only one alternative in link group pico (providing /usr/bin/pico): /bin/nano
설정할 것이 없습니다.
대체 항목 pinentry에 대해 (/usr/bin/pinentry 제공) 2개 선택이 있습니다.

  선택       경로                    우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/pinentry-gnome3   90        자동 모드
  1            /usr/bin/pinentry-curses   50        수동 모드
  2            /usr/bin/pinentry-gnome3   90        수동 모드

Press <enter> to keep the current choice[*], or type selection number:
There is only one alternative in link group pinentry-x11 (providing /usr/bin/pinentry-x11): /usr/bin/pinentry-gnome3
설정할 것이 없습니다.
There is only one alternative in link group rcp (providing /usr/bin/rcp): /usr/bin/scp
설정할 것이 없습니다.
There is only one alternative in link group rgview (providing /usr/bin/rgview): /usr/bin/vim.gtk3
설정할 것이 없습니다.
There is only one alternative in link group rgvim (providing /usr/bin/rgvim): /usr/bin/vim.gtk3
설정할 것이 없습니다.
There is only one alternative in link group rlogin (providing /usr/bin/rlogin): /usr/bin/slogin
설정할 것이 없습니다.
There is only one alternative in link group rmt (providing /usr/sbin/rmt): /usr/sbin/rmt-tar
설정할 것이 없습니다.
There is only one alternative in link group rsh (providing /usr/bin/rsh): /usr/bin/ssh
설정할 것이 없습니다.
대체 항목 rview에 대해 (/usr/bin/rview 제공) 3개 선택이 있습니다.

  선택       경로              우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/vim.gtk3    50        자동 모드
  1            /usr/bin/vim.basic   30        수동 모드
  2            /usr/bin/vim.gtk3    50        수동 모드
  3            /usr/bin/vim.tiny    15        수동 모드

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in manual mode
대체 항목 rvim에 대해 (/usr/bin/rvim 제공) 2개 선택이 있습니다.

  선택       경로              우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/vim.gtk3    50        자동 모드
  1            /usr/bin/vim.basic   30        수동 모드
  2            /usr/bin/vim.gtk3    50        수동 모드

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in manual mode
There is only one alternative in link group stream (providing /usr/bin/stream): /usr/bin/stream-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group stream-im6 (providing /usr/bin/stream-im6): /usr/bin/stream-im6.q16
설정할 것이 없습니다.
There is only one alternative in link group tdbbackup (providing /usr/bin/tdbbackup): /usr/bin/tdbbackup.tdbtools
설정할 것이 없습니다.
There is only one alternative in link group telnet (providing /usr/bin/telnet): /usr/bin/telnet.netkit
설정할 것이 없습니다.
There is only one alternative in link group text.plymouth (providing /usr/share/plymouth/themes/text.plymouth): /usr/share/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
설정할 것이 없습니다.
There is only one alternative in link group traceroute6 (providing /usr/bin/traceroute6): /usr/bin/traceroute6.iputils
설정할 것이 없습니다.
대체 항목 vi에 대해 (/usr/bin/vi 제공) 3개 선택이 있습니다.

  선택       경로              우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/vim.gtk3    50        자동 모드
  1            /usr/bin/vim.basic   30        수동 모드
  2            /usr/bin/vim.gtk3    50        수동 모드
  3            /usr/bin/vim.tiny    15        수동 모드

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in manual mode
대체 항목 view에 대해 (/usr/bin/view 제공) 4개 선택이 있습니다.

  선택       경로              우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/vim.gtk3    50        자동 모드
  1            /usr/bin/mcview      25        수동 모드
  2            /usr/bin/vim.basic   30        수동 모드
  3            /usr/bin/vim.gtk3    50        수동 모드
  4            /usr/bin/vim.tiny    15        수동 모드

Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in manual mode
대체 항목 vim에 대해 (/usr/bin/vim 제공) 2개 선택이 있습니다.

  선택       경로              우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/vim.gtk3    50        자동 모드
  1            /usr/bin/vim.basic   30        수동 모드
  2            /usr/bin/vim.gtk3    50        수동 모드

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in manual mode
대체 항목 vimdiff에 대해 (/usr/bin/vimdiff 제공) 2개 선택이 있습니다.

  선택       경로              우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/vim.gtk3    50        자동 모드
  1            /usr/bin/vim.basic   30        수동 모드
  2            /usr/bin/vim.gtk3    50        수동 모드

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in manual mode
대체 항목 vtrgb에 대해 (/etc/vtrgb 제공) 2개 선택이 있습니다.

  선택       경로                        우선순▒ 상태
------------------------------------------------------------
* 0            /etc/console-setup/vtrgb       50        자동 모드
  1            /etc/console-setup/vtrgb       50        수동 모드
  2            /etc/console-setup/vtrgb.vga   20        수동 모드

Press <enter> to keep the current choice[*], or type selection number:
There is only one alternative in link group w (providing /usr/bin/w): /usr/bin/w.procps
설정할 것이 없습니다.
There is only one alternative in link group write (providing /usr/bin/write): /usr/bin/bsd-write
설정할 것이 없습니다.
대체 항목 x-cursor-theme에 대해 (/usr/share/icons/default/index.theme 제공) 7개 선택이 있습니다.

  선택       경로                                   우선순▒ 상태
------------------------------------------------------------
* 0            /usr/share/icons/DMZ-White/cursor.theme   100       자동 모드
  1            /etc/X11/cursors/core.theme               30        수동 모드
  2            /etc/X11/cursors/handhelds.theme          20        수동 모드
  3            /etc/X11/cursors/redglass.theme           20        수동 모드
  4            /etc/X11/cursors/whiteglass.theme         20        수동 모드
  5            /usr/share/icons/Adwaita/cursor.theme     90        수동 모드
  6            /usr/share/icons/DMZ-Black/cursor.theme   30        수동 모드
  7            /usr/share/icons/DMZ-White/cursor.theme   100       수동 모드

Press <enter> to keep the current choice[*], or type selection number:
There is only one alternative in link group x-session-manager (providing /usr/bin/x-session-manager): /usr/bin/gnome-session
설정할 것이 없습니다.
There is only one alternative in link group x-terminal-emulator (providing /usr/bin/x-terminal-emulator): /usr/bin/gnome-terminal.wrapper
설정할 것이 없습니다.
There is only one alternative in link group x-window-manager (providing /usr/bin/x-window-manager): /usr/bin/mutter
설정할 것이 없습니다.
대체 항목 x-www-browser에 대해 (/usr/bin/x-www-browser 제공) 2개 선택이 있습니다.

  선택       경로                         우선순▒ 상태
------------------------------------------------------------
* 0            /usr/bin/google-chrome-stable   200       자동 모드
  1            /usr/bin/firefox                40        수동 모드
  2            /usr/bin/google-chrome-stable   200       수동 모드

Press <enter> to keep the current choice[*], or type selection number:
falinux@falinux-730QCJ-730QCR:~/work/lse/wayvnc/src$

 

다시 찬찬히 보니 아래처럼 하면 간단히 해결 되었을 지도?

$ sudo update-alternatives --config vim

 

 

perf  라는 명령어 발견

[링크 : http:// https://velog.io/@mythos/Linux-Tutorial-11-커널-성능-측정-도구-perf]

[링크 : https://kernel.bz/boardPost/118679/8]

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

vi 이전 위치 다음 위치로 이동하기  (0) 2022.08.04
vim 색상 바꾸기(colorscheme)  (0) 2021.01.20
vi 에서 매칭되는 갯수 확인하기  (0) 2019.12.18
vi gg=G와 set ts  (0) 2019.07.04
vi 검색 취소하기  (0) 2019.06.04
Posted by 구차니
프로그램 사용/rtl-sdr2022. 7. 20. 13:23

22.04 시대에 18.04라니.. 긴 한데

아무튼 gqrx 틀어 보니 가짜 출력(fake? dummy?) 라고 나오길래 찾아보니

 

아래의 모듈이 없어서 그렇다는데, 실행하고 나니 아래와 같이 헤드폰으로 잘 나온다.

$ sudo modprobe snd-hda-intel

[링크 : https://www.linuxuprising.com/2018/06/fix-no-sound-dummy-output-issue-in.html]

 

 

 

생각해보니.. rtl-sdr 관련 /dev/dsp 이런거 해보려고 oss 설치했던게 생각이 나네 -_-

젠장 역시나!!

/etc/modprobe.d$ grep -rni intel .
./blacklist-modem.conf:3:# blacklist snd-intel8x0m
./blacklist-framebuffer.conf:13:blacklist intelfb
./alsa-base.conf:31:options snd-intel8x0m index=-2
./oss4-base_noALSA.conf:83:blacklist snd-hda-intel
./oss4-base_noALSA.conf:94:blacklist snd-intel8x0
./oss4-base_noALSA.conf:95:blacklist snd-intel8x0m
./blacklist.conf:21:# snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much
./blacklist.conf:23:blacklist snd_intel8x0m

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

gqrx, gnu radio, rfcat  (0) 2024.08.21
rtl sdr 다중 채널 디코딩  (0) 2022.08.30
RTL-SDR 11시 땡!  (0) 2022.01.07
gqrx 오디오 스트리밍  (0) 2022.01.07
rpi gqrx  (0) 2022.01.07
Posted by 구차니

20.10 에서 테스트 완료.

18.04 에서도 해봐야 하려나? (세션 로그아웃 시기키 귀찮은디..)

 

$ sudo vi /etc/gdm3/custom.conf
# GDM configuration storage
#
# See /usr/share/gdm/gdm.schemas for a list of available options.

[daemon]
# Uncoment the line below to force the login screen to use Xorg
WaylandEnable=false

# Enabling automatic login
#  AutomaticLoginEnable = true
#  AutomaticLogin = user1

# Enabling timed login
#  TimedLoginEnable = true
#  TimedLogin = user1
#  TimedLoginDelay = 10

AutomaticLoginEnable=True
AutomaticLogin=falinux

[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
# More verbose logs
# Additionally lets the X server dump core if it crashes
#Enable=true


[링크 : https://www.answertopia.com/ubuntu/displaying-ubuntu-applications-remotely-x11-forwarding/]

Posted by 구차니

코드 분석하다 보니 아래와 같은 함수를 compositor.c에서 발견함.

weston 에서 호출되는 곳은 3 곳.

 

/** State of the repaint loop */
enum {
REPAINT_NOT_SCHEDULED = 0, /**< idle; no repaint will occur */
REPAINT_BEGIN_FROM_IDLE, /**< start_repaint_loop scheduled */
REPAINT_SCHEDULED, /**< repaint is scheduled to occur */
REPAINT_AWAITING_COMPLETION, /**< last repaint not yet finished */
} repaint_status;

static void
weston_output_schedule_repaint_reset(struct weston_output *output)
{
output->repaint_status = REPAINT_NOT_SCHEDULED;
TL_POINT(output->compositor, "core_repaint_exit_loop",
 TLP_OUTPUT(output), TLP_END);
}

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

wayvnc 0.5 릴리즈  (0) 2022.08.09
capture drm screen  (0) 2022.08.08
weston drm debug  (0) 2022.06.29
libwayland debug 메시지  (0) 2022.06.27
libwayland  (0) 2022.06.27
Posted by 구차니
프로그램 사용/wayland2022. 6. 29. 18:02

 

# echo 0x3 > /sys/module/drm/parameters/debug

[링크 : https://lynxbee.com/how-to-enable-drm-driver-debug-logging-in-linux/#.YrwTKHZBxhE]

 

dmesg 에서 확인이 가능한데.. 0x3 만 해도 dmesg를 넘기는지 금세 라인수 초과..

[28951.482225] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_GET_MAGIC
[28951.482235] [drm:drm_getmagic] 1
[28951.482244] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_AUTH_MAGIC
[28951.482250] [drm:drm_authmagic] 1
[28951.482255] [drm:drm_ioctl] comm="weston", pid=1707, ret=-22
[28951.482263] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_SET_MASTER
[28951.482281] [drm:drm_ioctl] comm="weston" pid=1707, dev=0xe201, auth=1, DRM_IOCTL_MODE_ATOMIC
[28951.482300] [drm:drm_mode_object_get] OBJ ID: 44 (2)
[28951.482308] [drm:drm_mode_object_get] OBJ ID: 46 (2)
[28951.482316] [drm:drm_mode_object_get] OBJ ID: 45 (3)
[28951.482320] [drm:drm_mode_object_put.part.0] OBJ ID: 44 (3)
[28951.482325] [drm:drm_mode_object_put.part.0] OBJ ID: 45 (4)
[28951.482329] [drm:drm_mode_object_put.part.0] OBJ ID: 45 (3)
[28951.482339] [drm:drm_mode_object_put.part.0] OBJ ID: 46 (5)
[28951.482344] [drm:drm_mode_object_put.part.0] OBJ ID: 46 (4)
[28951.482354] [drm:drm_mode_object_get] OBJ ID: 39 (4)
[28951.482358] [drm:drm_mode_object_get] OBJ ID: 39 (5)
[28951.482363] [drm:drm_mode_object_put.part.0] OBJ ID: 39 (6)
[28951.482425] imx-drm display-subsystem: [drm:drm_calc_timestamping_constants] crtc 33: hwmode: htotal 1344, vtotal 806, vdisplay 768
[28951.482433] imx-drm display-subsystem: [drm:drm_calc_timestamping_constants] crtc 33: clock 65000 kHz framedur 16665600 linedur 20676
[28951.485362] imx-drm display-subsystem: [drm:drm_handle_vblank] vblank event on 396086, current 396086
[28951.485368] [drm:drm_mode_object_put.part.0] OBJ ID: 40 (4)
[28951.485379] [drm:drm_mode_object_put.part.0] OBJ ID: 40 (3)
[28951.485385] [drm:drm_mode_object_put.part.0] OBJ ID: 49 (3)
[28951.485394] [drm:drm_mode_object_put.part.0] OBJ ID: 43 (2)

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

capture drm screen  (0) 2022.08.08
weston redraw 취소하기  (0) 2022.07.07
libwayland debug 메시지  (0) 2022.06.27
libwayland  (0) 2022.06.27
weston desktop-shell output destory  (0) 2022.06.08
Posted by 구차니
프로그램 사용/wayland2022. 6. 27. 17:24

export WAYLAND_DEBUG=1 하면 libwayland*.so 들의 디버그 메시지가 출력되는데

대~~~애충 아래와 같은 포맷

[1492172.627] wl_surface@17.leave(wl_output@16)
[1492172.707]  -> wl_surface@17.set_buffer_scale(1)
[1492172.745]  -> wl_surface@17.frame(new id wl_callback@27)
[1492192.837]  -> wl_surface@17.attach(wl_buffer@26, 0, 0)
[1492192.934]  -> wl_surface@17.damage(0, 0, 806, 606)
[1492192.973]  -> wl_surface@17.commit()
[1492208.877] wl_display@1.delete_id(27)
[1492208.938] wl_buffer@26.release()
[1492208.957] wl_callback@27.done(22885913)

 

send와 discard는 상위에서 보내주는 대로 설정되는거고, 해당 내용에 따라 출력이 되는 듯.

@00 식으로 나오는건 인자에 따라 출력되는 값인데.. 함수 인자가 어떤걸 의미하는진 따로 찾아봐야 할 듯..

void wl_closure_print(struct wl_closure *closure, struct wl_object *target,
 int send, int discarded, uint32_t (*n_parse)(union wl_argument *arg))
{
// ...
fprintf(f, "[%7u.%03u] %s%s%s@%u.%s(",
time / 1000, time % 1000,
discarded ? "discarded " : "",
send ? " -> " : "",
target->interface->name, target->id,
closure->message->name);

[링크 : https://gitlab.freedesktop.org/wayland/wayland/-/blob/main/src/connection.c#L1286]

[링크 : https://gitlab.freedesktop.org/wayland/wayland]

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

weston redraw 취소하기  (0) 2022.07.07
weston drm debug  (0) 2022.06.29
libwayland  (0) 2022.06.27
weston desktop-shell output destory  (0) 2022.06.08
weston debug message  (0) 2022.03.18
Posted by 구차니
프로그램 사용/wayland2022. 6. 27. 17:07

도대체.. 넌 또 머냐 -_-

 

[링크 : https://gitlab.freedesktop.org/wayland/wayland]

 

wayland_debug 라고 했듯.. libwayland의  디버깅이지 weston의 디버깅이 아니었나..

To get the logs of the wayland protocol messages, set this environment variable:

 export WAYLAND_DEBUG=1

[링크 : https://wiki.st.com/stm32mpu/wiki/How_to_debug_Weston]

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

weston drm debug  (0) 2022.06.29
libwayland debug 메시지  (0) 2022.06.27
weston desktop-shell output destory  (0) 2022.06.08
weston debug message  (0) 2022.03.18
weston drm atomic  (0) 2022.03.17
Posted by 구차니
프로그램 사용/gnuplot2022. 6. 13. 19:12

그래프 그리는 유틸리티. 써본적이 있던가?

 

$ gnuplot

Command 'gnuplot' not found, but can be installed with:

sudo apt install gnuplot-nox
sudo apt install gnuplot-qt
sudo apt install gnuplot-x11

 

[링크 : https://alvinalexander.com/technology/gnuplot-charts-graphs-examples/]

[링크 : https://stackoverflow.com/questions/30315114/]

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

gnuplot 예제  (0) 2023.06.07
Posted by 구차니

drm 에서 HDMI hotplug를 아래 코드에서 처리하는데 shell로 어떻게 넘겨주는진 발견하지 못했다.

static int
udev_drm_event(int fd, uint32_t mask, void *data)
{
struct drm_backend *b = data;
struct udev_device *event;
uint32_t conn_id, prop_id;

event = udev_monitor_receive_device(b->udev_monitor);

if (udev_event_is_hotplug(b, event)) {
if (udev_event_is_conn_prop_change(b, event, &conn_id, &prop_id))
drm_backend_update_conn_props(b, conn_id, prop_id);
else
drm_backend_update_heads(b, event);
}

udev_device_unref(event);

return 1;
}

static void
drm_backend_update_heads(struct drm_backend *b, struct udev_device *drm_device)
{
/* collect new connectors that have appeared, e.g. MST */
for (i = 0; i < resources->count_connectors; i++) {
uint32_t connector_id = resources->connectors[i];

head = drm_head_find_by_connector(b, connector_id);
if (head) {
drm_head_update_info(head);
} else {
head = drm_head_create(b, connector_id, drm_device);
if (!head)
weston_log("DRM: failed to create head for hot-added connector %d.\n",
   connector_id);
}
}
}

static void
drm_head_update_info(struct drm_head *head)
{
drmModeConnector *connector;

connector = drmModeGetConnector(head->backend->drm.fd,
head->connector_id);
if (!connector) {
weston_log("DRM: getting connector info for '%s' failed.\n",
   head->base.name);
return;
}

if (drm_head_assign_connector_info(head, connector) < 0)
drmModeFreeConnector(connector);

if (head->base.device_changed)
drm_head_log_info(head, "updated");
}

static void
drm_head_log_info(struct drm_head *head, const char *msg)
{
if (head->base.connected) {
weston_log("DRM: head '%s' %s, connector %d is connected, "
   "EDID make '%s', model '%s', serial '%s'\n",
   head->base.name, msg, head->connector_id,
   head->base.make, head->base.model,
   head->base.serial_number ?: "");
} else {
weston_log("DRM: head '%s' %s, connector %d is disconnected.\n",
   head->base.name, msg, head->connector_id);
}
}

 

다만.. 아래의 코드에서 등록되어 output이 파괴될때 트리거 되어 작동하는 녀석만 발견함.

static void
handle_output_destroy(struct wl_listener *listener, void *data);

static void
create_shell_output(struct desktop_shell *shell,
struct weston_output *output)
{
struct shell_output *shell_output;

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

shell_output->output = output;
shell_output->shell = shell;
shell_output->destroy_listener.notify = handle_output_destroy;
wl_signal_add(&output->destroy_signal,
      &shell_output->destroy_listener);
wl_list_insert(shell->output_list.prev, &shell_output->link);

if (wl_list_length(&shell->output_list) == 1)
shell_for_each_layer(shell,
     shell_output_changed_move_layer, NULL);
}

static void
handle_output_create(struct wl_listener *listener, void *data)
{
struct desktop_shell *shell =
container_of(listener, struct desktop_shell, output_create_listener);
struct weston_output *output = (struct weston_output *)data;

create_shell_output(shell, output);
}


static void
setup_output_destroy_handler(struct weston_compositor *ec,
struct desktop_shell *shell)
{
struct weston_output *output;

wl_list_init(&shell->output_list);
wl_list_for_each(output, &ec->output_list, link)
create_shell_output(shell, output);

shell->output_create_listener.notify = handle_output_create;
wl_signal_add(&ec->output_created_signal,
&shell->output_create_listener);

shell->output_move_listener.notify = handle_output_move;
wl_signal_add(&ec->output_moved_signal, &shell->output_move_listener);
}

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

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

libwayland debug 메시지  (0) 2022.06.27
libwayland  (0) 2022.06.27
weston debug message  (0) 2022.03.18
weston drm atomic  (0) 2022.03.17
wayvnc 실행 실패  (0) 2022.02.17
Posted by 구차니
프로그램 사용/gcc2022. 6. 2. 14:47

아래 에러들은 SIMD 명령으로 변환하는데 실패한 녀석들인것 같은데

아래와 같은 유형들이 에러로 발생했다.

 

반복문이 중첩되거나, 반복문 내에서 조건문이 있으면 안되는 것 같고

tt.c:180:3: note: ===== analyze_loop_nest =====
tt.c:180:3: note: === vect_analyze_loop_form ===
tt.c:180:3: note: not vectorized: control flow in loop.
tt.c:180:3: note: bad loop form.


tt.c:61:3: note: ===== analyze_loop_nest =====
tt.c:61:3: note: === vect_analyze_loop_form ===
tt.c:61:3: note: not vectorized: multiple nested loops.
tt.c:61:3: note: bad loop form.

 

아래부터는 어떤 에러인지 감이 안오는 녀석들..

지원하지 않는 패턴

tt.c:83:7: note: Unsupported pattern.
tt.c:83:7: note: not vectorized: unsupported use in stmt.
tt.c:83:7: note: unexpected pattern.

 

지원되지 않는 데이터 타입. 코드를 보니 for문의 비교문에

함수 포인터를 통한 참조(->) 로 보려고 할때는 타입을 추적 못하는 듯?

tt.c:107:5: note: not vectorized: unsupported data-type
tt.c:107:5: note: can't determine vectorization factor.

 

no grouped store가 어떤건지 모르겠다.

val = data[];

out = data / 255;

이런식으로 단순화 가능한 코드인데 배열과 포인터로 배열 인자가 선형으로 분석될수 없기 때문에 그런걸지도?

tt.c:106:3: note: not vectorized: no grouped stores in basic block.
tt.c:106:3: note: ===vect_slp_analyze_bb===
tt.c:106:3: note: ===vect_slp_analyze_bb===
tt.c:108:32: note: === vect_analyze_data_refs ===
tt.c:108:32: note: not vectorized: not enough data-refs in basic block.

 

모르겠고..

tt.c:228:3: note: not vectorized: data ref analysis failed _47 = *_46;
tt.c:228:3: note: bad data references.

 

모르겠다!!!

tt.c:238:5: note: not vectorized: not suitable for gather load _47 = *_46;
tt.c:238:5: note: bad data references.

 

 

아무튼 AVX로도 변환이 안되는데 .. NEON으로 최적화 될만한 코드는 더더욱 아닐 것 같네.

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

gcc tree vectorize  (0) 2023.01.26
gcc fstack-protector-strong  (0) 2022.12.06
gcc / 문자열 선언  (0) 2022.03.17
static link  (0) 2022.02.07
구조체 타입과 변수명은 구분된다?  (0) 2021.11.18
Posted by 구차니