You are not logged in.

#1 2016-08-19 08:58:11

svenper
Member
Registered: 2015-04-15
Posts: 28

xmonad does not react to keyboard shortcuts after long use / sleep

I’m trying to set up xmonad with xmobar, dmenu and slock. My current config works for some time, then stops responding to keyboard shortcuts to switch workspaces, open new windows, etc. The keyboard otherwise works as usual, e.g. I am writing this post in a chromium window, and can open and close tabs with the keyboard.

I am unsure if the issue is caused by long running code degrading in some way (?) or if it has to do with sleep. My initial thought was that the mod key somehow reverted from my setting it to mod4Mask, but neither key works.

~/.xmonad/xmonad.errors

xmonad.hs:20:12: warning: [-Wdeprecations]
    In the use of ‘defaultConfig’
    (imported from XMonad, but defined in XMonad.Config):
    Deprecated: "Use def (from Data.Default, and re-exported by XMonad and XMonad.Config) instead."

I am unsure what to change based on above info.

~/.xmonad/xmonad.hs

import XMonad
import XMonad.Config.Desktop
import XMonad.Hooks.DynamicLog
import System.Exit
import XMonad.Layout.NoBorders

main = xmonad =<< statusBar myBar myPP toggleStrutsKey myConfig
myBar = "xmobar"
myPP = xmobarPP { ppCurrent = xmobarColor "#55FF55" "" }
toggleStrutsKey XConfig {XMonad.modMask = modMask} = (modMask, xK_b)

myConfig = defaultConfig
    { modMask            = mod4Mask 
    , borderWidth        = 0
    , terminal           = "urxvtc" }

I tried commenting some of the imports I was unsure about, leaving only XMonad and XMonad.Hooks.DynamicLog, but this produced the same issue as well.

~/.xmobarrc

Config { font = "xft:Sans-serif:size=12"
       , additionalFonts = []
       , borderColor = "#000000"
       , border = TopB
       , bgColor = "#000000"
       , fgColor = "#FFFFFF"
       , alpha = 0
       , position = Top
       , textOffset = -1
       , iconOffset = -1
       , lowerOnStart = True
       , pickBroadest = False
       , persistent = True
       , hideOnStart = False
       , iconRoot = "."
       , allDesktops = True
       , overrideRedirect = True
       , commands = 
             [ Run Date "%a %d %b %H:%M" "date" 10
             , Run BatteryP ["BAT1"]
                ["-t", "<acstatus><watts> (<left>%)",
                 "-L", "10", "-H", "80", "-p", "3",
                 "--", "-O", "<fc=green>On</fc> - ", "-i", "",
                 "-L", "-15", "-H", "-5",
                 "-l", "red", "-m", "blue", "-h", "green"] 60
             , Run StdinReader ]
       , sepChar = "%"
       , alignSep = "}{"
       , template = "}%date%{%battery%"
       }

Are there any other logs that could be relevant? Is this maybe better suited to a dedicated xmonad forum / ML?

Offline

#2 2016-08-19 13:41:47

nocko
Member
Registered: 2016-08-19
Posts: 2

Re: xmonad does not react to keyboard shortcuts after long use / sleep

Can confirm this behaviour started for me last week. There are no error messages in xmonad.errors, nor Xorg.0.log, nor the journal. It doesn't seem to be related to slock and I've disabled unclutter. I installed xmonad via cabal, but the problem persists. I also reverted to the default xmobarConfig (to ensure my config wasn't stalling the logHook pipe).

I am now looking through pacman cache for updates to revert.

Shawn

Offline

#3 2016-08-19 14:16:33

nocko
Member
Registered: 2016-08-19
Posts: 2

Re: xmonad does not react to keyboard shortcuts after long use / sleep

I tried reverting to kernel 4.6.5 with no change. Suspending and waking the machine is a fairly reliable way to trigger the bug (but it will occur after an hour or two of normal usage).

*NEWS*: The xmonad process is being suspended (somehow), xmonad starts responding normally if you run:

pkill -CONT xmonad

Last edited by nocko (2016-08-19 14:18:16)

Offline

#4 2016-08-19 19:37:46

svenper
Member
Registered: 2015-04-15
Posts: 28

Re: xmonad does not react to keyboard shortcuts after long use / sleep

pkill -CONT xmonad

did nothing for me?

Since upgrading tlp and switching to the the linux-lts kernel, it seems to be working again. I have used the computer for a few hours and put it to sleep several times. If it acts up again I will update.

Nope. It just froze again, after letting it sleep all night and about an hour of use.

Last edited by svenper (2016-08-20 10:17:37)

Offline

#5 2016-08-20 16:40:48

svenper
Member
Registered: 2015-04-15
Posts: 28

Re: xmonad does not react to keyboard shortcuts after long use / sleep

To find out if the problem is even xmonad, I replaced the entire contents of .xmonad/xmonad.hs with

import XMonad

main = xmonad $ defaultConfig

and it has been running the entire day with several sleep sessions without freezing, which makes me assume there is an error somewhere in my actual config.

Offline

#6 2016-08-21 16:07:32

svenper
Member
Registered: 2015-04-15
Posts: 28

Re: xmonad does not react to keyboard shortcuts after long use / sleep

I investigated the error message from the OP a bit more, and tried XMonad.Config.Desktop from the xmonad-contrib package. It included the xmobar stuff I tried to hack together by myself earlier by default, and it was easy to set the only variables I used in it.

This is the full contents of .xmonad/xmonad.hs now, which is satisfyingly minimal as well:

import XMonad
import XMonad.Config.Desktop

main = xmonad $ desktopConfig
    { modMask            = mod4Mask 
    , borderWidth        = 0
    , terminal           = "urxvtc" }

Last edited by svenper (2016-08-21 16:07:57)

Offline

#7 2016-09-01 21:43:18

illis
Member
Registered: 2013-09-23
Posts: 14

Re: xmonad does not react to keyboard shortcuts after long use / sleep

Hi Svenper,

I seem to have a similar issue to you with xmonad locking up and not responding - while the actual window I'm currently in is ok.
Did the Xmonad.Config.Desktop config end up working ok for you?

Also seems to be another post over here with the issue:
https://bbs.archlinux.org/viewtopic.php?id=216293


Cheers,

Last edited by illis (2016-09-03 11:32:20)

Offline

#8 2016-09-01 22:34:20

svenper
Member
Registered: 2015-04-15
Posts: 28

Re: xmonad does not react to keyboard shortcuts after long use / sleep

To be honest, I don’t remember now, but I think it didn’t. After this incident I switched to the very similar dwm, which xmonad was originally a clone of, and I am very happy with it. I don't remember if I made the switch because the xmonad freeze happened again or simply because I didn’t want to take the risk.

Offline

#9 2016-09-01 23:55:27

illis
Member
Registered: 2013-09-23
Posts: 14

Re: xmonad does not react to keyboard shortcuts after long use / sleep

Thats all good; thanks for quick update anyway smile

Offline

#10 2016-09-02 09:23:44

xiliyi
Member
Registered: 2011-05-14
Posts: 57

Re: xmonad does not react to keyboard shortcuts after long use / sleep

svenper wrote:

My current config works for some time, then stops responding to keyboard shortcuts to switch workspaces, open new windows, etc.

Same behaviour here, and same, or very similar behaviour in the case of Illis. What hardware are you using? Illis and I both happen to use a ThinkPad (X201 for me, X220 for Illis). Could it be hardware specific?

Offline

#11 2016-09-02 11:25:18

xiliyi
Member
Registered: 2011-05-14
Posts: 57

Re: xmonad does not react to keyboard shortcuts after long use / sleep

svenper wrote:

My current config works for some time, then stops responding to keyboard shortcuts to switch workspaces, open new windows, etc.

Same behaviour here, and same, or very similar behaviour in the case of Illis. What hardware are you using? Illis and I both happen to use a ThinkPad (X201 for me, X220 for Illis). Could it be hardware specific?

edit: I see from your previous message that you use tlp, so you’re using a ThinkPad. I run tlp, too. It might have to do with that.

illis wrote:

Thats all good; thanks for quick update anyway smile

Illis, are you using tlp?

Offline

#12 2016-09-02 14:09:44

svenper
Member
Registered: 2015-04-15
Posts: 28

Re: xmonad does not react to keyboard shortcuts after long use / sleep

I’m using a ThinkPad Edge E135, also with tlp. This sounds suspicious. Maybe a BIOS update could help?

Offline

#13 2016-09-02 19:10:31

xiliyi
Member
Registered: 2011-05-14
Posts: 57

Re: xmonad does not react to keyboard shortcuts after long use / sleep

My guess: Either this or remove tlp. I'm on the road, can't test right now.

Offline

#14 2016-09-02 21:52:30

illis
Member
Registered: 2013-09-23
Posts: 14

Re: xmonad does not react to keyboard shortcuts after long use / sleep

Dont have tlp installer here. Do have laptop-mode-tools installed thou.  Also not sure if it makes any difference, but im running the CK kernel.

Offline

#15 2020-11-20 15:23:16

kiloliuton
Member
Registered: 2019-03-08
Posts: 2

Re: xmonad does not react to keyboard shortcuts after long use / sleep

I believe the problem is in your xmobarrc file, where you have `Run StdinReader` command but no corresponding `%StdinReader%` in the template. See https://wiki.haskell.org/Xmonad/Frequen … ds_to_keys

Offline

#16 2020-11-20 15:51:09

seth
Member
Registered: 2012-09-03
Posts: 17,220

Re: xmonad does not react to keyboard shortcuts after long use / sleep

Please don't necrobump - the thread is more than 4 years old.

Online

#17 2020-11-20 15:56:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 11,183

Re: xmonad does not react to keyboard shortcuts after long use / sleep

Closing this old thread.

Offline

Board footer

Powered by FluxBB