Aoki Posted October 16, 2020 Report Share Posted October 16, 2020 Witam, nie wiem gdzie powinienem to wrzucić, mam nadzieję, że dobra kategoria. Mam skrypt do do zmiany rozdzielczości ekranu na drugim monitorze, do rozdzielczości 1440, ponieważ za każdym razem, gdy uruchamiam ponownie komputer, ustawia się rozdzielczość 1080, a 1440 brakuje na liście. Nie wiem co zrobić, aby za każdym uruchomieniem systemu, ta rozdzielczość ustawiała się domyślnie. Kombinowałem coś z uruchomieniem skryptu przy starcie systemu, ale nie zadziałało. Skrypt, który uruchamiam ręcznie przy starcie systemu: #!/bin/bash out = `xrandr` echo ${out} | systemd-cat -p info xrandr --newmode "2560x1440_54.97" 221.00 2560 2608 2640 2720 1440 1443 1447 1478 +HSync -VSync xrandr --addmode HDMI-1 2560x1440_54.97 xrandr --output HDMI-1 --mode 2560x1440_54.97 1 Link to comment Share on other sites More sharing options...
SeeM Posted October 17, 2020 Report Share Posted October 17, 2020 Dzięki, fajne. A z ciekawości: na Waylandzie rozdzielczość również jest nieprawidłowa? Nie wiem na ile brak Xsów cokolwiek pomaga. Link to comment Share on other sites More sharing options...
Aoki Posted October 17, 2020 Author Report Share Posted October 17, 2020 Na Waylandzie w ogóle mi nie poszło, musiałem zmienić na Xy :/ Link to comment Share on other sites More sharing options...
@sunrise Posted October 17, 2020 Report Share Posted October 17, 2020 Możesz pokazać co zwraca polecenie xrandr. Link to comment Share on other sites More sharing options...
Aoki Posted October 22, 2020 Author Report Share Posted October 22, 2020 Polecenie XRANDR bez parametrów, przed wykonaniem skryptu: Cytuj [apcio@tiprogs-dv6 ~]$ xrandr Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 8192 x 8192 LVDS-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm 1366x768 60.03*+ 1280x720 60.00 59.99 59.86 59.74 1024x768 60.04 60.00 960x720 60.00 928x696 60.05 896x672 60.01 1024x576 59.95 59.96 59.90 59.82 960x600 59.93 60.00 960x540 59.96 59.99 59.63 59.82 800x600 60.00 60.32 56.25 840x525 60.01 59.88 864x486 59.92 59.57 700x525 59.98 800x450 59.95 59.82 640x512 60.02 700x450 59.96 59.88 640x480 60.00 59.94 720x405 59.51 58.99 684x384 59.88 59.85 640x400 59.88 59.98 640x360 59.86 59.83 59.84 59.32 512x384 60.00 512x288 60.00 59.92 480x270 59.63 59.82 400x300 60.32 56.34 432x243 59.92 59.57 320x240 60.05 360x202 59.51 59.13 320x180 59.84 59.32 VGA-1 disconnected (normal left inverted right x axis y axis) HDMI-1 connected 1920x1080+1366+0 (normal left inverted right x axis y axis) 597mm x 336mm 1920x1080 60.00* 60.00 50.00 59.94 1680x1050 59.88 1280x1024 75.02 60.02 1440x900 59.90 1280x960 60.00 1280x800 59.91 1152x864 75.00 1280x720 60.00 50.00 59.94 1024x768 75.03 70.07 60.00 832x624 74.55 800x600 72.19 75.00 60.32 56.25 720x576 50.00 720x480 60.00 59.94 640x480 75.00 72.81 66.67 60.00 59.94 720x400 70.08 I po skrypcie: Cytuj [apcio@tiprogs-dv6 ~]$ xrandr Screen 0: minimum 320 x 200, current 3926 x 1440, maximum 8192 x 8192 LVDS-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm 1366x768 60.03*+ 1280x720 60.00 59.99 59.86 59.74 1024x768 60.04 60.00 960x720 60.00 928x696 60.05 896x672 60.01 1024x576 59.95 59.96 59.90 59.82 960x600 59.93 60.00 960x540 59.96 59.99 59.63 59.82 800x600 60.00 60.32 56.25 840x525 60.01 59.88 864x486 59.92 59.57 700x525 59.98 800x450 59.95 59.82 640x512 60.02 700x450 59.96 59.88 640x480 60.00 59.94 720x405 59.51 58.99 684x384 59.88 59.85 640x400 59.88 59.98 640x360 59.86 59.83 59.84 59.32 512x384 60.00 512x288 60.00 59.92 480x270 59.63 59.82 400x300 60.32 56.34 432x243 59.92 59.57 320x240 60.05 360x202 59.51 59.13 320x180 59.84 59.32 VGA-1 disconnected (normal left inverted right x axis y axis) HDMI-1 connected 2560x1440+1366+0 (normal left inverted right x axis y axis) 597mm x 336mm 1920x1080 60.00 60.00 50.00 59.94 1680x1050 59.88 1280x1024 75.02 60.02 1440x900 59.90 1280x960 60.00 1280x800 59.91 1152x864 75.00 1280x720 60.00 50.00 59.94 1024x768 75.03 70.07 60.00 832x624 74.55 800x600 72.19 75.00 60.32 56.25 720x576 50.00 720x480 60.00 59.94 640x480 75.00 72.81 66.67 60.00 59.94 720x400 70.08 2560x1440_54.97 54.97* DP-1 disconnected (normal left inverted right x axis y axis) Link to comment Share on other sites More sharing options...
@sunrise Posted October 23, 2020 Report Share Posted October 23, 2020 Wygląda, że system nie wykrywa rozdzielczości. Spróbuj dodać do argumentów kernela video=HDMI-1:2560x1440@55 Link to comment Share on other sites More sharing options...
Aoki Posted October 23, 2020 Author Report Share Posted October 23, 2020 Dodałem do ustawień GRUBa (sudo gedit /etc/default/grub): Cytuj GRUB_CMDLINE_LINUX="resume=/dev/mapper/luks-519faff4-49be-4369-9f99-bab984cc06e7 rd.luks.uuid=luks-c4ed5c87-f0d7-44c7-ba22-834394971978 rd.luks.uuid=luks-519faff4-49be-4369-9f99-bab984cc06e7 rhgb quiet acpi_backlight=vendor video=HDMI-1:2560x1440@55 Potem przebudowałem: sudo grub2-mkconfig -o /boot/grub2/grub.cfg Ale dalej to samo. Próbowałem z opcją @54.97 i też nie dało. Nawet "video=HDMI-1:2560x1440@55" wrzuciłem "luzem" pod parametrami w pliku konfiguracyjnym Grub'a, ale też nie. No trudno, będę w miarę potrzeby uruchamiał skrypt. Może dodam go do menu aplikacji. Link to comment Share on other sites More sharing options...
@sunrise Posted October 24, 2020 Report Share Posted October 24, 2020 W dniu 23.10.2020 o 05:26, sunrise napisał: Wygląda, że system nie wykrywa rozdzielczości. Spróbuj dodać do argumentów kernela video=HDMI-1:2560x1440@55 Przepraszam, ale się spieszyłem i popełniłem błąd, prawdopodobnie powinno być video=HDMI-A-1:2560x1440@55 Sprawdź co ci wyświetla polecenie ll /sys/class/drm Link to comment Share on other sites More sharing options...
Aoki Posted November 1, 2020 Author Report Share Posted November 1, 2020 Sprawdziłem i dalej maksymalna rozdzielczość po uruchomieniu systemu to 1920X1080. [apcio@tiprogs-dv6 ~]$ ll /sys/class/drm razem 0 lrwxrwxrwx 1 root root 0 11-01 12:55 card0 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 lrwxrwxrwx 1 root root 0 11-01 12:55 card1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1 lrwxrwxrwx 1 root root 0 11-01 12:55 card1-DP-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-1 lrwxrwxrwx 1 root root 0 11-01 12:55 card1-HDMI-A-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-HDMI-A-1 lrwxrwxrwx 1 root root 0 11-01 12:55 card1-LVDS-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-LVDS-1 lrwxrwxrwx 1 root root 0 11-01 12:55 card1-VGA-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-VGA-1 lrwxrwxrwx 1 root root 0 11-01 12:55 renderD128 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/renderD128 lrwxrwxrwx 1 root root 0 11-01 12:55 renderD129 -> ../../devices/pci0000:00/0000:00:02.0/drm/renderD129 lrwxrwxrwx 1 root root 0 11-01 12:55 ttm -> ../../devices/virtual/drm/ttm -r--r--r-- 1 root root 4096 11-01 12:55 version [apcio@tiprogs-dv6 ~]$ ll /sys/class/drm razem 0 lrwxrwxrwx 1 root root 0 11-01 12:55 card0 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 lrwxrwxrwx 1 root root 0 11-01 12:55 card1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1 lrwxrwxrwx 1 root root 0 11-01 12:55 card1-DP-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-1 lrwxrwxrwx 1 root root 0 11-01 12:55 card1-HDMI-A-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-HDMI-A-1 lrwxrwxrwx 1 root root 0 11-01 12:55 card1-LVDS-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-LVDS-1 lrwxrwxrwx 1 root root 0 11-01 12:55 card1-VGA-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-VGA-1 lrwxrwxrwx 1 root root 0 11-01 12:55 renderD128 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/renderD128 lrwxrwxrwx 1 root root 0 11-01 12:55 renderD129 -> ../../devices/pci0000:00/0000:00:02.0/drm/renderD129 lrwxrwxrwx 1 root root 0 11-01 12:55 ttm -> ../../devices/virtual/drm/ttm -r--r--r-- 1 root root 4096 11-01 12:55 version Może problemem jest stary laptop i sterowniki do niego. Może zmiany są wykrywane tylko dla użytkownika root, a nie lokalnego ? A może w momencie wykrywania rozdzielczości nie wykrywa poprawnie monitora i dlatego działa skrypt po zalogowaniu, a przed logowaniem już nie ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now