Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emacs-GTK freezes system #15911

Closed
Spowmtom opened this issue Oct 29, 2019 · 17 comments
Closed

Emacs-GTK freezes system #15911

Spowmtom opened this issue Oct 29, 2019 · 17 comments
Labels
bug Something isn't working

Comments

@Spowmtom
Copy link

Spowmtom commented Oct 29, 2019

System

  • xuname:
    Void 5.3.7_1 x86_64 GenuineIntel uptodate rFF
  • package:
    emacs-gtk2-26.3_1
    emacs-gtk3-26.3_1

Expected behavior

When launching Emacs GTK with the command emacs, I expect the program to open in a new window and to work like Emacs should.

Actual behavior

When launching Emacs GTK with the command emacs, it freezes up my whole X session. i am unable to start, pause, resume, kill or even use anything. I can move my mouse though, but I've heard that some people can't. I can't kill my window manager (i3) or startx from a new TTY, I need
to kill emacs from a new TTY.
Emacs does work in terminal mode with emacs -nw.

Steps to reproduce the behavior

  1. Get my exact version of Void Linux
  2. Install emacs-gtk2-26.3_1 or emacs-gtk3-26.3_1 with the XBPS package manager
  3. Launch Emacs

Thank you for your time and hard work. ❤️

Edit: I am using i3wm

@Hoshpak
Copy link
Member

Hoshpak commented Oct 30, 2019

I can't reproduce this with LxQT and openbox so it sounds like it is either an issue specific to the window manager or possibly arises with a specific graphics driver. Could you please test with another WM and specify which GPU and graphics driver you are using?

@liz-desartiges
Copy link
Contributor

I have the same issue with both bspwm and dwm. I did replace my emacs-gtk3 with emacs-x11 and had no issue since, I thought it was my config which was broken.

I'm using x86-video-intel

@Spowmtom
Copy link
Author

I have the same issue with both bspwm and dwm. I did replace my emacs-gtk3 with emacs-x11 and had no issue since, I thought it was my config which was broken.

I'm using x86-video-intel

emacs-x11 works for me too.

@leahneukirchen
Copy link
Member

Use dbus-launch emacs.

@Spowmtom
Copy link
Author

Spowmtom commented Nov 8, 2019

Use dbus-launch emacs.

It works! Emacs-gtk3 works flawlessly, now!
I wish that the void team would fix this issue though.

@leahneukirchen
Copy link
Member

I think this is an upstream bug.

@gspe
Copy link
Contributor

gspe commented Feb 7, 2020

This problem happened to me too.
But it was a new clean install of void Linux I've discovered that problem happens just after I've installed Thumar file manager.
Before Thunar I can just run emacs and it start immediately, after installing Thunar the whole system hung.

@gspe
Copy link
Contributor

gspe commented Mar 11, 2020

Use dbus-launch emacs.

I've found that the problem is that emacs-gtk require dbus and if you use a wm instead of dm you should launch your wm of choice with dbus-launch wm like dbus-launch i3 or dbus-launch awesome etc. in this way all other apps works like expected like Thunar or Pacmfm etc.

@gspe
Copy link
Contributor

gspe commented Mar 11, 2020

no it's just a configuration error when someone use a window manager instead of desktop environment.
I'm using awesome wm and I've solved all my problem just changing awesome.desktop to

[Desktop Entry]
Name=awesome dbus
Comment=Highly configurable framework window manager (dbus)
Exec=dbus-launch awesome
Type=Application

So maybe the right thing to do is to add some example to documentation

@ericonr
Copy link
Member

ericonr commented Jan 30, 2021

https://docs.voidlinux.org/config/session-management.html#d-bus tries to cover dbus stuff. Do we need more docs about it?

@gspe
Copy link
Contributor

gspe commented Jan 31, 2021

Correct configuration of D-Bus is not an easy task, information are not very clear and in some case in contradiction this is true in every distribution not only in void, for example look at this long mail from debian mailing list https://lists.debian.org/debian-devel/2016/08/msg00554.html

In my opinion Void D-Bus documentation doesn't provide enough information about how an user have to correctly start an user session bus.
I've taken inspiration from kde, https://github.com/KDE/plasma-workspace/blob/af44f2cc79fb816e31ea125141e75abb66320602/startkde/plasma-dbus-run-session-if-needed, and now I'm starting my sway with a wrapper script, /usr/bin/sway-run.sh with this content:

#!/bin/sh

# Session
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=sway
export XDG_CURRENT_DESKTOP=sway

# D-Bus
# If the session bus is not available it is spawned and wrapper round our program
# Otherwise we spawn our program directly
drs=
if [ -z "${DBUS_SESSION_BUS_ADDRESS}" ]
then
   drs=dbus-run-session
fi

# Environment
# Imports sway desktop enviroments
set -a
. /etc/sway/env
set +a

exec ${drs} sway "$@"

So having some examples on how to start a dbus user session will be very nice.

Another idea would be to have some sane default configuration for window manager in addiction to the standard one, for example add the sway wrapper script so a medium user can easily start a sway session but advanced user can start sway session as he likes.

@ericonr
Copy link
Member

ericonr commented Jan 31, 2021

For general interest, this ties in with #28036

@ericonr
Copy link
Member

ericonr commented Jan 31, 2021

Does the freeze still happen, though? Cause otherwise this should be closed and new issues opened (or discussion moved to #28036)

@gspe
Copy link
Contributor

gspe commented Jan 31, 2021

I think that can be closed.
Since I started to launch window manager with dbus-run-session everything works fine.

@ericonr
Copy link
Member

ericonr commented Jan 31, 2021

If it still freezes the whole system without a running dbus session, that is 100% a bug.

@ericonr
Copy link
Member

ericonr commented Jan 31, 2021

FWIW, I couldn't reproduce it myself.

@gspe
Copy link
Contributor

gspe commented Jan 31, 2021

I've quickly tested without start dbus session in advance with wayland based wm, sway and hikari, and emacs gtk3 is launched correctly.

@ericonr ericonr closed this as completed Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants
@leahneukirchen @gspe @Hoshpak @liz-desartiges @ericonr @Spowmtom and others