codehenry / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

X.H.DynamicBars call to xrrSelectInput has no effect #538

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Use attached xmonad.hs (vanilla + minimal DynamicBars).
2. Turn second display off and on:

   xrandr --output VGA1 --off
   xrandr --output VGA1 --preferred --right-of LVDS1

Bonus:

3. Apply select_input_fix.dpatch, rebuild and restart xmonad.
4. Turn second display off and on.
5. Undo previous patch, apply select_input_not_fix.dpatch, rebuild and restart 
xmonad.
6. Turn second display off and on.

What is the expected output? What do you see instead?

Expected: In steps 2, 4, and 6: see "DESTROYING"/"CREATING" messages in xmonad 
output.

Actual: Only step 4 produces the expected messages. Steps 2 and 6 produce no 
output.

What version of the product are you using? On what operating system?

xmonad 0.11 (darcs)
xmonad-contrib 0.11 (darcs)
xorg 1.14.0
xrandr 1.4.0
X11 (Haskell binding) 1.6.1.1

Are you using an xmonad.hs?  Please attach it and the output of "xmonad
--recompile".

"xmonad --recompile" produces no output.

Please provide any additional information below.

I'm expecting step 2 to work because dynStatusBarStartup calls xrrSelectInput. 
This apparently doesn't do what it's supposed to do for me, possibly for the 
same reason that step 6 doesn't work.

Original issue reported on code.google.com by johnnysp...@gmail.com on 27 Mar 2013 at 4:23

Attachments:

GoogleCodeExporter commented 8 years ago
Finally getting back to this. I'm running with:

ghc-xmonad-contrib-devel-0.11.2-5.fc22.x86_64
xmonad-core-0.11-12.fc21.x86_64
ghc-X11-1.6.1.1-5.fc22.x86_64
xorg-x11-server-Xorg-1.16.1-1.fc22.x86_64
% xrandr --version
xrandr program version       1.4.3
Server reports RandR version 1.4

and I can't reproduce the first 1./2. step failure:

% pgrep -c xmobar 2 % xrandr --output HDMI3 --primary --mode 1920x1080 --output HDMI1 --off % pgrep -c xmobar 1 % xrandr --output HDMI3 --primary --mode 1920x1080 --output HDMI1 --left-of HDMI3 --mode 1440x900 % pgrep -c xmobar 2


Can you still reproduce this?

Original comment by MathStuf@gmail.com on 18 Nov 2014 at 3:13

GoogleCodeExporter commented 8 years ago
I have roughly the same versions as you (slightly newer where different):

xmonad-contrib-0.11.3-1
xmonad-0.11-9
haskell-x11-1.6.1.2-1
xorg-server-1.16.2-1
xrandr program version       1.4.3
Server reports RandR version 1.4

I can still reproduce this:

1. Run xmonad with the attached xmonad.hs. Two xmobars are started, so 
barCreator works.
2. Kill the xmobars.
3. Toggle the external display off and on. No new xmobars are spawned, so 
barCreator isn't being called.

In other words:

$ pgrep -c xmobar 2 $ killall xmobar $ pgrep -c xmobar 0 $ xrandr --output HDMI1 --off $ pgrep -c xmobar 0 $ xrandr --output HDMI1 --preferred --right-of LVDS1 $ pgrep -c xmobar 0


Any suggestions for what to try next? Is there something that I overlooked in 
the attached minimal xmonad.hs?

Original comment by johnnysp...@gmail.com on 24 Nov 2014 at 1:58

GoogleCodeExporter commented 8 years ago
MathStuf, your xorg is buggy. Selecting input only applies to the current 
connection; you create a new connection, select on it, and immediately close 
it, which in a non-buggy xorg has no net effect.

Original comment by allber...@gmail.com on 10 Dec 2014 at 5:18

GoogleCodeExporter commented 8 years ago
This problem was due to DynamicBars not receiving the randr events because it 
opened its own connection instead of asking XConf, so DynamicBars was buggy all 
along.
A hypothesis on IRC was that it used to rely on a bug in Xorg that went away, 
which exposed the bug.
Fix attached, credit geekosaur.

Original comment by aka....@gmail.com on 10 Dec 2014 at 5:31

Attachments: