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

X11 errors when blurring #14

Open
elonus opened this issue Apr 30, 2017 · 6 comments
Open

X11 errors when blurring #14

elonus opened this issue Apr 30, 2017 · 6 comments

Comments

@elonus
Copy link

elonus commented Apr 30, 2017

When I do "i3lock -f" it will show a blurred screenshot as expected. However it seems to stop workin after that. It will just show the screenshot and not any lock symbol. And when I try to type my password to unlock the screen nothing happens. Neither any indication on the lockscreen that it registered me typing nor unlocking the screen. I have to go to another tty to kill the process. When I run "i3lock -f --debug" I get these errors:
scaling factor = 7.680000 radius = 3 sigma = 3.840000 X11 Error received! sequence 0x11c, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x11d, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x11e, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x11f, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x120, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x121, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x123, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x124, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x126, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x128, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x12a, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x12b, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x12d, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2e5, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2e6, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2e7, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2e8, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2e9, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2ea, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2ec, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2ed, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2ef, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2f1, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2f3, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2f4, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x2f6, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x371, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x372, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x373, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x374, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x375, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x376, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x378, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x379, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x37b, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x37d, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x37f, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x380, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x382, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x3fd, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x3fe, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x3ff, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x400, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x401, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x402, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x404, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x405, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x407, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x409, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x40b, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x40c, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x40e, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x489, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x48a, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x48b, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x48c, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x48d, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x48e, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x490, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x491, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x493, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x495, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x497, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x498, error_code = 8, major = 0x3e, minor = 0x0 X11 Error received! sequence 0x49a, error_code = 8, major = 0x3e, minor = 0x0 [i3lock-debug] device = 3 [i3lock-debug] found Xinerama screen: 1366 x 768 at 0 x 0 [i3lock-debug] device = 3 [i3lock-debug] redraw_screen(unlock_state = 0, pam_state = 0) [i3lock-debug] redraw_screen(unlock_state = 0, pam_state = 0) [i3lock-debug] redraw_screen(unlock_state = 0, pam_state = 0) [i3lock-debug] redraw_screen(unlock_state = 0, pam_state = 0)
I have not been able to figure out what the X11 errors mean. I am running Arch Linux with an Intel CPU and ATI Radeon graphics card. When I use it without the -f option it works fine.

@bheadmaster
Copy link

bheadmaster commented Jul 10, 2017

I am running Arch Linux with i3wm, with an Intel CPU and Intel integrated graphics card, and while I don't get the same glitches as elonus, i3lock-blur does makes my screen glitch for a few seconds when started over certain windows, like qutebrowser.

Also, regardless of the glitch, using plain i3lock --debug works fine, no output on stderr, no errors, no glitches, but using i3lock --fuzzy --debug gives a bunch of error messages, virtually the same as posted by Elonus:

X11 Error received! sequence 0x106, error_code = 8, major = 0x3e, minor = 0x0
X11 Error received! sequence 0x107, error_code = 8, major = 0x3e, minor = 0x0
X11 Error received! sequence 0x108, error_code = 8, major = 0x3e, minor = 0x0
[...]
X11 Error received! sequence 0x[NUM], error_code = 8, major = 0x3e, minor = 0x0

...where [NUM] goes higher (up to 5000 and beyond) the longer I leave the i3lock running.

So, even if it the error above was a local issue, I believe it should be worthwhile to look into these error messages, as they aren't happening on vanilla i3lock, and they could indicate some deeper error.

Here's the full log from i3lock --fuzzy --debug 2> debug-log.txt:
debug-log.txt

EDIT:
AUR package version:
i3lock-blur 2.9-1
i3lock: version 2.9 (2017-02-03) © 2010 Michael Stapelberg

@tmlrbgfz
Copy link

tmlrbgfz commented Jul 19, 2017

@elonus

When I do "i3lock -f" it will show a blurred screenshot as expected. However it seems to stop workin after that. It will just show the screenshot and not any lock symbol. And when I try to type my password to unlock the screen nothing happens. Neither any indication on the lockscreen that it registered me typing nor unlocking the screen. I have to go to another tty to kill the process. When I run "i3lock -f --debug" I get these errors:

I have the same problem. Using the option "--nofork" as suggested in #6 solves this problem for me.

@karulont
Copy link
Owner

@tmlrbgfz do you think --fuzzy should imply --nofork?

As for others, if you still have problems even with using --nofork, let me know. We also have an option to blur only once called --once.

@tmlrbgfz
Copy link

@karulont I'd consider that bad style. I too am running an AMD GPU, so that change would unnecessarily break the forking feature when using the --fuzzy option for people not running AMD GPUs.

From #6

Probably the driver does something funky with the process ID. And after a fork the process ID changes.
To be more accurate: parent process will open up a connection to Xserver and does some stuff. Then a fork happens and the child remains. However child has a different Process ID than the parent, which opened the connection to Xserver.

Could you try to do all interaction with the Xserver after forking?

@karulont
Copy link
Owner

karulont commented Aug 2, 2017

@tmlrbgfz Doing all interactions with the Xserver from the child process defeats the purpose of forking.

The forking feature:

i3lock forks, so you can combine it with an alias to suspend to RAM (run "i3lock && echo mem > /sys/power/state" to get a locked screen after waking up your computer from suspend to RAM)

i3lock should fork only when the screen is locked. Screen cannot be locked without interacting with the Xserver.

However, it might be possible to lock the screen from the parent process, then fork, and from the child process, initialize the blurring and OpenGL context. That way the process ID should stay the same for the OpenGL context.

@tmlrbgfz
Copy link

tmlrbgfz commented Aug 3, 2017

@karulont That sounds like a good idea!

i3lock should fork only when the screen is locked. Screen cannot be locked without interacting with the Xserver.

True, but using IPC the child could signal successful screen locking to the parent. I forked this project and hacked something like that using System V semaphores. Not beautiful but does the job.
Your idea seems more elegant, however, so that should be investigated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants