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

VT problem with mpv and links #49

Open
alex3kov opened this issue Nov 27, 2019 · 1 comment
Open

VT problem with mpv and links #49

alex3kov opened this issue Nov 27, 2019 · 1 comment

Comments

@alex3kov
Copy link

alex3kov commented Nov 27, 2019

I'm on Parabola (Arch). Links = this browser http://links.twibright.com/, it's in Arch repos.
In console:
Running mpv --gpu-context=drm video.mp4 and xlinks -g both work fine, without warnings.
In yaft:
Running mpv --gpu-context=drm video.mp4 prints out this warning (I can provide verbose log as well) but otherwise works fine:

[vo/gpu] VT_GETMODE failed: Inappropriate ioctl for device
[vo/gpu/opengl] Failed to set up VT switcher. Terminal switching will be unavailable.

When I tried xlinks -g first time it printed some warning about VT as well. Every time I tried after that it just completely locks up yaft - I can't switch to another TTY with Ctrl-Alt-Fx, Ctrl-C/Q/Esc doesn't work. The only way out is hard reset.

@misutoneko
Copy link

misutoneko commented Jun 13, 2021

Yup, that seems like a bug alright! Here's a clip from valgrind/gdb session:

Program received signal SIGSEGV, Segmentation fault.
0x000000000010cadc in erase_cell (term=0x1ffef44c70, y=-9952, x=0) at /home/arch/tmp/yaft/terminal.h:7
7 cellp->glyphp = term->glyph[DEFAULT_CHAR];

...so, y is -9952? Doesn't seem right to me. The value is set in the scroll() function, line 105.
Seems like it's missing a bounds check.

EDIT: Do note that the Links fb init problem is a separate issue. VT_GETMODE bombs out with ENOTTY (I don't know why).
Links can be patched to ignore the return value of VT_GETMODE and VT_SETMODE (framebuf.c, just use ioctl() without the EINTRLOOP bit).
That doesn't fix the underlying issue, but at least Links gets a chance to run.

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

2 participants