Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to add custom screen resolution in wayland?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Tue Sep 07, 2021 6:30 am    Post subject: how to add custom screen resolution in wayland? Reply with quote

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
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Tue Sep 07, 2021 8:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Tue Sep 07, 2021 9:17 am    Post subject: Reply with quote

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
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Tue Sep 07, 2021 11:24 am    Post subject: Reply with quote

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
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Tue Sep 07, 2021 11:45 am    Post subject: Reply with quote

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
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Tue Sep 07, 2021 12:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Tue Sep 07, 2021 1:41 pm    Post subject: Reply with quote

CaptainBlood wrote:


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
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Tue Sep 07, 2021 3:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Tue Sep 07, 2021 4:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Wed Sep 08, 2021 12:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Wed Sep 08, 2021 3:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Thu Sep 09, 2021 2:38 am    Post subject: Reply with quote

Anon-E-moose wrote:


the monitor is SAMSUNG SyncMaster SA300;

i have made it work and here are some screenshots, not in the order of operation though : https://gitee.com/guyuming76/personal/commit/bf5d040634282cc3ee7775bf017bd3c5c8e04fb6

By the way, the modeline name issue gave me a lot of trouble: https://github.com/akatrevorjay/edid-generator/issues/11
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum