Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] (not really) sway-1.6.1-r1 - mouse input issues
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
blakamaka
n00b
n00b


Joined: 02 Aug 2021
Posts: 14

PostPosted: Thu Aug 05, 2021 9:26 pm    Post subject: [SOLVED] (not really) sway-1.6.1-r1 - mouse input issues Reply with quote

just emerged firefox and it crashes for me every time i use my cusor (when i move using only keyboard it does not crash). also, when i launch firefox it spits this message:
Code:

$ firefox

(firefox-wayland:3129) Gdk-WARNING **: 23:19:19:272: Failed to load cursor theme Adwaita

(/usr/lib64/firefox/firefox:3213): Gdk-WARNING **: 23:19:19:469: Failed to load cusor theme Adwaita

(/usr/lib64/firefox/firefox:3274): Gdk-WARNING **: 23:19:19:588: Failed to load cusor theme Adwaita

(/usr/lib64/firefox/firefox:3331): Gdk-WARNING **: 23:19:20:469: Failed to load cusor theme Adwaita


i have Adwaita cursor theme installed in /usr/share/icons/Adwaita, tried changing permissions but it did not fix the issue


Last edited by blakamaka on Sun Aug 08, 2021 7:24 pm; edited 2 times in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Thu Aug 05, 2021 10:17 pm    Post subject: Reply with quote

  1. Which desktop environment do you use?

  2. Which graphics card/chip do you have?

  3. Please show us the output of
    Code:
    emerge --info
Back to top
View user's profile Send private message
blakamaka
n00b
n00b


Joined: 02 Aug 2021
Posts: 14

PostPosted: Thu Aug 05, 2021 10:42 pm    Post subject: Reply with quote

mike155 wrote:
  1. Which desktop environment do you use?

  2. Which graphics card/chip do you have?

  3. Please show us the output of
    Code:
    emerge --info


1. sway
2. nvidia rtx 2070 super with nouveau driver
3. emerge info:
Code:


Portage 3.0.20 (python 3.9.6-final-0, default/linux/amd64/17.1, gcc-10.3.0, glibc-2.33-r1, 5.10.52-gentoo x86_64)
=================================================================
System uname: Linux-5.10.52-gentoo-x86_64-Intel-R-_Core-TM-_i9-9900K_CPU_@_3.60GHz-with-glibc2.33
KiB Mem:    32817032 total,  31948216 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Thu, 05 Aug 2021 11:00:01 +0000
Head commit of repository gentoo: 31b107dd7a2163ed38636d88555bf86272f53916
sh bash 5.1_p8
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0::gentoo
dev-lang/python:          3.9.6::gentoo
dev-lang/rust:            1.53.0::gentoo
dev-util/cmake:           3.18.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            10.3.0-r2::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4 -l4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 bzip2 cli crypt dri elogind fortran gdbm iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd unicode wayland xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS



actually it seems like it is not firefox related issue beacuse i noticed that sway also crashes if i try to realod config via button when i get popup message at the top about some errors
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Thu Aug 05, 2021 11:01 pm    Post subject: Reply with quote

A couple of USE flags are missing... "X", for example.

If I were you, I would switch to a desktop profile:
Code:
eselect profile set "default/linux/amd64/17.1/desktop"

Run
Code:
emerge --update --deep --changed-use -av @world

afterwards.

I'm surprised to see
Code:
ACCEPT_KEYWORDS="amd64 ~amd64"

because
Code:
gcc-10.3.0, glibc-2.33-r1

shows that you are on stable...?

Did you add ~amd64 recently?

I recommend to stay on stable - so remove "~amd64" if you added "~amd64" only for testing purposes.
Code:
VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l"

You may also wish to set VIDEO_CARDS to "nouveau" in your make.conf. See: https://wiki.gentoo.org/wiki/Nouveau.
Back to top
View user's profile Send private message
blakamaka
n00b
n00b


Joined: 02 Aug 2021
Posts: 14

PostPosted: Thu Aug 05, 2021 11:11 pm    Post subject: Reply with quote

mike155 wrote:
A couple of USE flags are missing - "X", for example

If I were you, I would switch to a desktop profile
Code:
eselect profile set "default/linux/amd64/17.1/desktop"

Run
Code:
emerge --update --deep --changed-use -av @world

afterwards.

I'm surprised to see
Code:
ACCEPT_KEYWORDS="amd64 ~amd64"

because
Code:
gcc-10.3.0, glibc-2.33-r1

shows that you are on stable...?

Did you add ~amd64 recently?

I recommend to stay on stable - so remove "~amd64" if you added "~amd64" only for testing purposes.
Code:
VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l"

You may also wish to set VIDEO_CARDS in your make.conf.


ill try to change my profile but not right now, ill probably do it in few days beacuse i wont have access to my machine since tommorow. ill let you know if it fixed my issue. and yes, i added ~amd64 recently, it is gone now
thanks for generous help
Back to top
View user's profile Send private message
blakamaka
n00b
n00b


Joined: 02 Aug 2021
Posts: 14

PostPosted: Sun Aug 08, 2021 8:34 am    Post subject: Reply with quote

okay i have tried everything mike155 mentioned and it did not fix my issue. (except adding X flag to my USE variable cause to my knowledge it is not necessary to get anything running well if using only wayland, right?) the only thing that has changed is that firefox now does not complain about being unable to load cursor theme but the problem is not gone.

as i observed earlier it is not firefox related issue so i changed the title of the post to something more relevant. sway sometimes crashes too when for example reloading config file via button that shows when something is wrong with config file, similar to i3. im starting to guess that it is problem with swaywm itself.

also i found another issue - i cant set my pointer speed in sway config
Code:


input 1133:50489:Logitech_USB_Receiver_Mouse {
         accel_profile flat
         pointer_accel -0.3
}



does not work on gentoo where it worked well under my artix build. also in artix when i use
Code:
$ swaymsg -t get_inputs
it lists identifier like "1133:16505:Logitech_G_Pro" when on gentoo it lists few identifiers ( maybe on artix it shows few identifiers too, but i do not rember to be any more than one that i used to set my pointer speed; 1133:16505:Logitech_G_Pro ) which one of them is 1133:50489:Logitech_USB_Receiver_Mouse.

quick edit:
it seems that every package i have on my system is installed with X flag anyway;

adding "X" flag to my make.conf and then running
Code:
$ emerge --ask --newuse @world
Nothing to merge; quitting.


adding "-X" flag to my make.conf and then running
Code:
$ emerge --ask --newuse @world
( some packages to merge (with -X flag), including swaywm )
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1171
Location: /run/user/1000

PostPosted: Sun Aug 08, 2021 11:41 am    Post subject: Reply with quote

Try to run firefox-wayland instead of just firefox

Also, you should load this script every time on startup

Code:
#!/bin/sh

# usage: import-gsettings
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi

gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(grep 'gtk-theme-name' "$config" | cut -d'=' -f2)"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | cut -d'=' -f2)"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | cut -d'=' -f2)"
font_name="$(grep 'gtk-font-name' "$config" | cut -d'=' -f2)"
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
gsettings set "$gnome_schema" font-name "$font_name"
Back to top
View user's profile Send private message
blakamaka
n00b
n00b


Joined: 02 Aug 2021
Posts: 14

PostPosted: Sun Aug 08, 2021 12:11 pm    Post subject: Reply with quote

The Main Man wrote:
Try to run firefox-wayland instead of just firefox

Also, you should load this script every time on startup

Code:
#!/bin/sh

# usage: import-gsettings
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi

gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(grep 'gtk-theme-name' "$config" | cut -d'=' -f2)"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | cut -d'=' -f2)"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | cut -d'=' -f2)"
font_name="$(grep 'gtk-font-name' "$config" | cut -d'=' -f2)"
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
gsettings set "$gnome_schema" font-name "$font_name"


thanks for your reply

unfortunately, none of these solve the issue. also,
Code:
$ firefox
should work just fine (never had problems before on my artix build).
and, btw, you do not have to create a separate script to load gtk theme and everything, you can do it in .config/sway/config. see https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland (i have tried both - editing config and your bash script)

however alacritty works great even if i do craziest stuff with my mouse pointer on it. maybe it is gtk related problem? as far as i know alacritty does not rely on gtk and firefox, waybar and maybe sway error message do?
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


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

PostPosted: Sun Aug 08, 2021 12:59 pm    Post subject: Reply with quote

firefox and waybar use gtk, AFAIK sway does not use gtk.

What version of wayland, sway, wlroots, mesa, libdrm and firefox?
_________________
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
blakamaka
n00b
n00b


Joined: 02 Aug 2021
Posts: 14

PostPosted: Sun Aug 08, 2021 1:24 pm    Post subject: Reply with quote

Anon-E-moose wrote:
firefox and waybar use gtk, AFAIK sway does not use gtk.

What version of wayland, sway, wlroots, mesa, libdrm and firefox?

sway - 1.6.1-r1, wlroots 0.14.0, mesa 21.1.4, libdrm 2.4.106, firefox 90.0.2
all packages should be the newest stable ones, except firefox - but it is not only firefox problem so i think it should be ignored
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1171
Location: /run/user/1000

PostPosted: Sun Aug 08, 2021 1:35 pm    Post subject: Reply with quote

Hmm, well it must be nvidia related then, I guess, could be something else though but I fail to see what's that.
Because I run Sway as well as Firefox, it doesn't crash at all and I didn't have cursor problems, using amd gpu.

I'm on stable, but I've unmasked Waybar, Sway, wlroots, xwayland , basically everything Wayland I think.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


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

PostPosted: Sun Aug 08, 2021 1:46 pm    Post subject: Reply with quote

blakamaka wrote:
Anon-E-moose wrote:
firefox and waybar use gtk, AFAIK sway does not use gtk.

What version of wayland, sway, wlroots, mesa, libdrm and firefox?

sway - 1.6.1-r1, wlroots 0.14.0, mesa 21.1.4, libdrm 2.4.106, firefox 90.0.2
all packages should be the newest stable ones, except firefox - but it is not only firefox problem so i think it should be ignored


I don't think the problem is exclusive to firefox, I just wanted to know what version you're using, that one should be a wayland compatible version.

The different versions of pkgs should be fine, but I'd probably update mesa to 21.1.6 and libdrm to 2.4.107, just because the wayland landscape changes frequently and I know cursors are one of the things I've seen work on lately.

Edit to add: as far as the original post and the adwaita messages, they're pretty standard, I think everyone sees that message even if they are using adwaita.

ETA2: You could try adding WLR_NO_HARDWARE_CURSORS=1 in front of firefox, in other words start from a terminal with
WLR_NO_HARDWARE_CURSORS=1 firefox
then try and move the cursor to see if it still crashes.
You could also try MOZ_ENABLE_WAYLAND=1 but I would think that with the latest firefox you wouldn't need to do that.
_________________
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
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sun Aug 08, 2021 6:50 pm    Post subject: Reply with quote

blakamaka wrote:
okay i have tried everything mike155 mentioned and it did not fix my issue. (except adding X flag to my USE variable cause to my knowledge it is not necessary to get anything running well if using only wayland, right?) the only thing that has changed is that firefox now does not complain about being unable to load cursor theme but the problem is not gone.

quick edit:
it seems that every package i have on my system is installed with X flag anyway;

adding "X" flag to my make.conf and then running
Code:
$ emerge --ask --newuse @world
Nothing to merge; quitting.


adding "-X" flag to my make.conf and then running
Code:
$ emerge --ask --newuse @world
( some packages to merge (with -X flag), including swaywm )

I didn't say: "USE flag 'X' is missing". I said: a couple of USE flags are missing - and 'X' is one of them.

Option '--deep' is missing in you commands above. If you want to find out which packages have to be rebuilt if you change a USE flag, you should add option '--deep'.
Code:
USE="X" emerge --update --changed-use --deep -av @world

or
Code:
USE="-X" emerge --update --changed-use --deep -av @world
Back to top
View user's profile Send private message
blakamaka
n00b
n00b


Joined: 02 Aug 2021
Posts: 14

PostPosted: Sun Aug 08, 2021 7:21 pm    Post subject: got it to work! Reply with quote

i managed to get it to work - just downgraded sway packaged itself to 1.6-r1 and it works great so far. to be honest i really wanted to get the newest one to work so im kind of dissapointed but i do not want to spend more time on trying to find the source of the issue.

unfortunately upgrading mesa, libdrm and libinput to the newest unstable packages did not fix my issue.

i noticed that it spits these error messages if i exit sway quickly enough so it does not crash the entire system;
Code:
(EE) failed to read Wayland events: Broken pipe
Gdk-Message 20:55:54.402: Error reading events from display: Broken pipe
00:00:08.381 [wlr] [backend/drm/drm.c:1592] drmHandleEvent failed
00:00:00.275 [common/ipc-client.c:87] Unable to receive IPC response


i still get Gdk-Messages like:
Code:
Unable to load hand2 from the cursor theme

but they are not harmful in any way - just what Anon-E-moose mentioned

i think that my problem is solved. kinda atleast. thanks mike155, Anon-E-moose and The Main Man for your help!
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


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

PostPosted: Sun Aug 08, 2021 7:50 pm    Post subject: Reply with quote

If you want to see what's going on behind the scenes, turn on debugging in sway (cmd line option, I believe) and then run firefox and have it crash.

Those few messages in your last post are kind-of-normal when shutting down, debugging would tell you more (sorry didn't think of it earlier)
_________________
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
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