View previous topic :: View next topic |
Author |
Message |
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 235
|
Posted: Tue Sep 07, 2021 6:30 am Post subject: how to add custom screen resolution in wayland? |
|
|
i use xorg before and now i am trying wayland.
i added wayland to USE in make.conf and run emerge. After that i can enter kde plasma with
XDG_SESSION_TYPE=wayland dbus-run-session startplasma-wayland
However, my screen resolution is default to 1024*768 now, the 1920*1080 won't appear in the dropdown list.
I used to add custom resolution with xrandr, but xrandr does not work for wayland.
I think the "kanshi" might work. but "kanshi" returns the following message:
"compositor doesn't support wlr-output-management-unstable-v1"
And if i try to run xorg with startx as before, the mouse and keyboard won't response after entering kde plasma
[url] https://pastebin.com/HKUj5kJc [/url] is the xorg.0.log
and what follows is the make.conf
Code: | # These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-O2 -pipe -fno-omit-frame-pointer"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
GENTOO_MIRRORS="http://mirrors.163.com/gentoo"
MAKEOPTS="-j4"
CPU_FLAGS_X86="avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
GRUB_PLATFORMS="efi-64"
INPUT_DEVICES="keyboard mouse"
VIDEO_CARDS="intel i965"
FEATURES="nostrip"
USE="X wayland gles2 systemd user-session gtk gtk2 gtk3 qt5 kde pulseaudio -webengine"
ACCEPT_KEYWORDS="~amd64"
|
|
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3628
|
Posted: Tue Sep 07, 2021 8:57 am Post subject: |
|
|
IIRC monitor resolution isn't to be set at wayland level, but window manager, e.g. sway, wayfire, gnome, kde, etc...
[EDIT] Code: | XDG_SESSION_TYPE=wayland dbus-run-session startplasma-wayland
Launching kwin
kwin_wayland: symbol lookup error: kwin_wayland: undefined symbol: _ZNK20QPlatformIntegration28createPlatformVulkanInstanceEP15QVulkanInstance, version Qt_5_PRIVATE_API
Kwin exited with code 127
startplasmacompositor: Shutting down...
startplasmacompositor: Done | both from console & terminal.
Not ready here to help you any further.
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Tue Sep 07, 2021 9:17 am Post subject: |
|
|
No, xrandr doesn't work in wayland ... use wlr-randr, although wdisplays is a better alternative, with visual layout, though it doesn't seem to have an ebuild.
proper call for dbus is
Code: | dbus-run-session -- startplasma-wayland |
set your vars ahead of calling wayland,
XDG_SESSION_TYPE=wayland
you may need one or more of these
QT_QPA_PLATFORM=wayland
QT_QPA_PLATFORMTHEME=qt5ct ----- if you use qt5ct for setting desktop look
several other QT_* vars but they're not normally needed
you also need XDG_RUNTIME_DIR set (should be automatically set) _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 235
|
Posted: Tue Sep 07, 2021 11:24 am Post subject: |
|
|
Anon-E-moose wrote: | No, xrandr doesn't work in wayland ... use wlr-randr, |
but what is wlr-randr? and how to use it?
e-file wlr-randr
returns nothing and nor does
emerge --search wlr-randr |
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3628
|
Posted: Tue Sep 07, 2021 11:45 am Post subject: |
|
|
Code: | eix wlr-randr
* gui-apps/wlr-randr [1]
Available versions: ~0.1.0 ~0.2.0 **9999*l
Homepage: https://github.com/emersion/wlr-randr
Description: xrandr clone for wlroots compositors
[1] "guru" /var/db/repos/guru | so you have to add guru repository, i.e. Code: | eselect repository enable guru | Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Tue Sep 07, 2021 12:39 pm Post subject: |
|
|
Guru repo has wdisplays as well as wlr-randr, and some other interesting wayland pkgs. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 235
|
Posted: Tue Sep 07, 2021 1:41 pm Post subject: |
|
|
I just emerged wlr-randr as you suggest, however, it prompt the same error message as kanshi
Code: |
gym@gymDeskGentoo ~ $ wlr-randr
compositor doesn't support wlr-output-management-unstable-v1 |
And wdisplays give the same message.
in htop, i can see process name such as startplasma-wayland , kwin_wayland, Xwayland. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Tue Sep 07, 2021 3:17 pm Post subject: |
|
|
Since you're on plasma, try kscreen _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 235
|
Posted: Tue Sep 07, 2021 4:28 pm Post subject: |
|
|
Anon-E-moose wrote: | Since you're on plasma, try kscreen | \
what follows is kscreen-console results, how can i add 1920*1080 resolution?
Code: |
gym@gymDeskGentoo ~ $ kscreen-console
START: Requesting Config
kscreen.kwayland: Loading Wayland backend.
Received config. Took 16 milliseconds
Screen:
maxSize: QSize(64000, 64000)
minSize: QSize(0, 0)
currentSize: QSize(1024, 768)
-----------------------------------------------------
Id: 1
Name: "未知 VGA-1-未知"
Type: "VGA"
Connected: true
Enabled: true
Primary: true
Rotation: KScreen::Output::None
Pos: QPoint(0,0)
MMSize: QSize(0, 0)
FollowPreferredMode: false
Size: QSize(1024, 768)
Scale: 1
Clones: None
Mode: "0"
Preferred Mode: "0"
Preferred modes: ()
Modes:
"0" "1024x768@60" QSize(1024, 768) 60.004
"1" "800x600@60" QSize(800, 600) 60.317
"2" "800x600@56" QSize(800, 600) 56.25
"3" "848x480@60" QSize(848, 480) 60
"4" "640x480@60" QSize(640, 480) 59.94
EDID Info:
Unavailable
|
|
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 235
|
Posted: Wed Sep 08, 2021 12:35 pm Post subject: |
|
|
maybe i should try adding a drm.edid_firmware kernel parameter.
but i am using efibootmgr instead of grub. how to add this kernel parameter? are there any way to just append this parameter instead of deleting the existing efibootmgr entry and creating a new one? i don't even remember the command line to create a new efibootmgr entry!
maybe i could try "set CONFIG_CMDLINE_BOOL=y and then set CONFIG_CMDLINE" : https://stackoverflow.com/questions/22035110/passing-parameter-to-builtin-kernel-module-at-compile-time
i would rather recompile the kernel than touch those efibootmgr entry. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Wed Sep 08, 2021 3:06 pm Post subject: |
|
|
What monitor is it? name, model, etc
How did you get X to work without the edid?
If it can't see the edid then, it doesn't know how make the monitor work with more than standard vesa modes. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 235
|
|
Back to top |
|
|
|