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

conemu-cyg-64.exe conflict with WIN10 1903 and Cygwin 3.1.1 (needs confirmation) (title updated) #2035

Closed
userdocs opened this issue Dec 19, 2019 · 33 comments

Comments

@userdocs
Copy link

@userdocs userdocs commented Dec 19, 2019

Edit - The cause of this issue has been identified. See this comment - #2035 (comment)

Versions

ConEmu build: 191012 x64 Installer
OS version: Windows 10 x64 1903
Used shell version - Cygwin bash - Cygwin 3.1.1

Problem description

When using the connector as described here CygwinMsysConnector with the current Cygwin 3.1.1 release certain keys stop working - like the arrow keys and delete.

This configuration does not work:

set CHERE_INVOKING=1
 & set "PATH=C:\cygwin64\bin;%PATH%"
 & %ConEmuBaseDirShort%\conemu-cyg-64.exe /usr/bin/bash.exe --login -i -new_console:p:C:"C:\cygwin64\Cygwin.ico"

This will work: (removed - %ConEmuBaseDirShort%\conemu-cyg-64.exe)

set CHERE_INVOKING=1
 & set "PATH=C:\cygwin64\bin;%PATH%"
 &  /usr/bin/bash.exe --login -i -new_console:p:C:"C:\cygwin64\Cygwin.ico"

Steps to reproduce

  1. Windows 10 1903 x64 (possibly related to this specific build, i will try a VM of an older edition)
  2. Install Cygwin x64
  3. Install ConEmu x64

Note: I had an older version of Cygwin on WIN10 1903 x64 and it worked fine. I updated Cygwin to 3.1.1 and rebooted and then experienced the described issue.

Actual results

You can type but arrow keys and delete doe not work (possibly more keys are affected)

Expected results

That these keys work as they did previously.

@userdocs userdocs changed the title conemu-cyg-64.exe conflict with WIN10 1809 and Cygwin 3.1.1 (needs confirmation) conemu-cyg-64.exe conflict with WIN10 1903 and Cygwin 3.1.1 (needs confirmation) (title updated) Dec 19, 2019
@9numbernine9
Copy link

@9numbernine9 9numbernine9 commented Dec 19, 2019

Thanks for posting this issue - I think I'm running into the same problem and I thought I was starting to go crazy. I'm running Windows 10 1809 with Cygwin 3.1.0 but the behaviour is otherwise the same.

Looking at the release notes for Cygwin 3.1.0, they've added a feature that adds support for pseudo consoles in PTY: Pseudo console is a new feature in Windows 10 1809, which provides console APIs on virtual terminal. With this patch, native console applications can work in PTYs such as mintty, ssh, gnu screen or tmux.

I think this new feature might be related to the issue; if you explicitly disable pseudo console support in Windows by changing the registry value HKEY_CURRENT_USER\Console\ForceV2 from 1 to 0 and open a new {Cygwin bash} shell, everything should work fine (or at least it does for me). Note that I don't recommend this is a permanent solution - this might break some other app on your machine that expects this feature to be enabled!

@userdocs
Copy link
Author

@userdocs userdocs commented Dec 19, 2019

Which is why when i look at the description of the conemu-cyg connector:

This helper tool is an attempt to create the symbiont of POSIX enabled pty and WinAPI full-featured terminal.

I wonder what the best temporary fix is and i if need the connector any more? Number 1 seems to work for me and what i need.

1: Disable the connector in the Startup/Tasks by removing the command.

2: A registry edit described here #2035 (comment)

edit - No - Option 1 will cause the loss of functionality and generally cause odd stuff to happen and is not a solution.

@zouhair
Copy link

@zouhair zouhair commented Dec 21, 2019

I ended up using this line in the startfile and it seem to fix most of the problem, but I don't think it's still a total fix:

set CHERE_INVOKING=1 & set "PATH=C:\cygwin\bin;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe -new_console:p C:\cygwin\bin\bash.exe --login -i -cur_console:p1 -new_console:d:C:\cygwin\home\poboxy -new_console:C:"C:\cygwin\Cygwin.ico"

@userdocs
Copy link
Author

@userdocs userdocs commented Dec 21, 2019

If i debug my active process i get this over and over on Cygwin 3.1.1

{6612.1408} MS_VC_THREADNAME_EXCEPTION at 0x00007FF87BD9A839 flags 0x00000000 FC=1
@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Dec 21, 2019

If i debug my active process i get this over and over on Cygwin 3.1.1

{6612.1408} MS_VC_THREADNAME_EXCEPTION at 0x00007FF87BD9A839 flags 0x00000000 FC=1

This exception is not a "real" exception. It's used to set a name for a thread, which is useful during debugging.
This type of exception should be skipped manually.

@Maximus5
Copy link
Owner

@Maximus5 Maximus5 commented Dec 21, 2019

I need reanimate my work on pty definitely. As not only wsl requires it...

@userdocs
Copy link
Author

@userdocs userdocs commented Dec 21, 2019

Ok, thanks for clarifying that. Is there any info I can provide like the dumps that will help or is that not necessary with this particular issue?

@amartinr
Copy link

@amartinr amartinr commented Dec 26, 2019

I'm experiencing the same problem. I also used a similar solution like you used, @userdocs. I'm using TERM=xterm-256color, if that matters. The thing is that I'm missing a line feed every time I hit the tab key for autocompletion or the enter key.

amartinr@myhost /
$ ls
     bin/                 Cygwin.ico           etc/                 proc/                usr/
                                                                                             cygdrive/
        Cygwin-Terminal.ico  home/                sbin/                var/
                                                                           Cygwin.bat           dev/
           lib/                 tmp/

amartinr@myhost /
$ ls
     bin          Cygwin.bat  Cygwin-Terminal.ico  etc   lib   sbin  usr
cygdrive  Cygwin.ico  dev                  home  proc  tmp   var

I found out that I don't have this problem if I use mintty, but mintty hijacks many keybindings...

set CHERE_INVOKING=1 & set "PATH=%ConEmuDrive%\cygwin64\bin;%PATH%" & C:\cygwin64\bin\mintty.exe
@anenviousguest
Copy link

@anenviousguest anenviousguest commented Dec 27, 2019

If that helps, I noticed that in the ANSI log file the arrows and Del keystrokes do not even appear.

@Bokonon-ONI
Copy link

@Bokonon-ONI Bokonon-ONI commented Dec 28, 2019

Same specs here as posted above and I am also experiencing this issue. One thing to add that I didn't see posted, not sure it's relevant, I ran cygwin's bash.exe from both powershell and the regular Windows command prompt and they both behave as expected, the arrow keys work just fine.

@tyan0
Copy link
Contributor

@tyan0 tyan0 commented Dec 29, 2019

Hello.

I looked into this problem and found the cause is the patch I proposed on April 2019 for cygwin console handler. I will propose revised patch for cygwin shortly.

FYI: This is not related to pseudo console support in cygwin.

@userdocs
Copy link
Author

@userdocs userdocs commented Dec 29, 2019

3kp5h8

Thanks! I was just guessing as all i knew was that by updating Cygwin it broke the ConEmu integration but I had no idea why. I'll update the main comment to link to yours and wait for it to be fixed.

Do you have a rough estimate how long that process take might take?

@tyan0
Copy link
Contributor

@tyan0 tyan0 commented Dec 29, 2019

Do you have a rough estimate how long that process take might take?

I'm not sure. I plan to submit the patch in a few days. After that, the maintainer will determine whether the patch is appropriate. If they accept the patch, it will be pushed to git repositry. However, it might not released soon. The timing of new release is decided by maintainer.

The release dates of cygwin in the past were:
3.0.0-1: Feb. 17, 2019
3.0.1-1: Feb. 20, 2019
3.0.2-1: Mar. 6, 2019
3.0.3-1: Mar. 10, 2019
3.0.4-1: Mar. 16, 2019
3.0.5-1: Mar. 31, 2019
3.0.6-1: Apr. 7, 2019
3.0.7-1: May.1, 2019
3.1.0-1: Dec. 17, 2019
3.1.1-1: Dec. 18, 2019
3.1.2-1: Dec. 22, 2019

@Bokonon-ONI
Copy link

@Bokonon-ONI Bokonon-ONI commented Dec 29, 2019

So @tyan0 are you saying the fix is on the cygwin side? Thanks for the quick reply. By any chance, do have a link to a changeset/checkin/PR with either the fix or the code that broke, I'm a developer but haven't worked on this kind of stuff and am just curious. Thanks again!

@tyan0
Copy link
Contributor

@tyan0 tyan0 commented Jan 1, 2020

By any chance, do have a link to a changeset/checkin/PR with either the fix or the code that broke, I'm a developer but haven't worked on this kind of stuff and am just curious. Thanks again!

The old patch which causes the issue was:
https://www.cygwin.com/ml/cygwin-patches/2019-q2/msg00013.html

The revised patch is:
https://www.cygwin.com/ml/cygwin-patches/2020-q1/msg00004.html

@tyan0
Copy link
Contributor

@tyan0 tyan0 commented Jan 15, 2020

A new cygwin has not yet been released, but a developer snapshot that fixes this problem is ready.
https://cygwin.com/snapshots/
Please test.

@vehovsky
Copy link

@vehovsky vehovsky commented Jan 15, 2020

@tyan0 thanks! I can confirm it's working.

@mooninite
Copy link

@mooninite mooninite commented Jan 15, 2020

Yes, thanks. The Jan 14th snapshot fixed the issue for me, too.

@tyan0
Copy link
Contributor

@tyan0 tyan0 commented Jan 17, 2020

Thanks for testing!

@userdocs
Copy link
Author

@userdocs userdocs commented Jan 17, 2020

@tyan0 snapshot 20200114 fixed it for me as well. Thanks.

@GameDr04
Copy link

@GameDr04 GameDr04 commented Jan 22, 2020

I wasn't able to get the patch to work but considering the many successes before me, it's probably user error.

Instead, I removed and reinstalled Cygwin, but explicitly chose version 3.0.7 at install-time.
That worked for me.

@pccasto
Copy link

@pccasto pccasto commented Jan 26, 2020

I had issues with the 2020-01-24. Not sure if they were due to my method of install, or what.
However the 2020-01-14 installed cleanly and fixed this issue.

@ravermeister
Copy link

@ravermeister ravermeister commented Jan 26, 2020

for me the 2020-01-24 works too:

[ravermeister@virusmaster 24.01.2020]$ md5sum.exe cygwin1-20200124.dll
0f481acb062a24d0b503eb1b47776234 *cygwin1-20200124.dll
[ravermeister@virusmaster 24.01.2020]$ md5sum.exe /usr/bin/cygwin1.dll
0f481acb062a24d0b503eb1b47776234 */usr/bin/cygwin1.dll
[ravermeister@virusmaster 24.01.2020]$
@chrisbanm
Copy link

@chrisbanm chrisbanm commented Feb 13, 2020

I downloaded cygwin1-20200212.dll for 64 bit and it also fixed the arrow key functionality. I haven't done enough testing to see if it broke anything else, but the arrows work just fine.

@userdocs
Copy link
Author

@userdocs userdocs commented Feb 19, 2020

They have release update 3.1.4-1

https://cygwin.com/ml/cygwin-announce/2020-02/msg00006.html

Can people test and confirm please.

Edit: seems to be working as expected for me.

@lokeshgovindu
Copy link

@lokeshgovindu lokeshgovindu commented Feb 19, 2020

@pccasto
Copy link

@pccasto pccasto commented Feb 19, 2020

Second confirmation - 3.1.4-1 installed and works for me as well.
$ uname -a
CYGWIN_NT-10.0 <my_hostname> 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin

Thanks again!

@chrisbanm
Copy link

@chrisbanm chrisbanm commented Feb 19, 2020

Confirmed. I have also updated to CygWin 3.1.4 x86_64 and the arrow key issues are fixed. The arrow keys work correctly with ConEmu 191012[64] on Win 10 1909.

@flyser
Copy link

@flyser flyser commented Feb 19, 2020

Unfortunately cygwin 3.1.4 did not fix this issue for me on Windows 10 1903. Do I need a special conemu version or setting?

@userdocs
Copy link
Author

@userdocs userdocs commented Feb 19, 2020

The test would work or fail with the documentation example:

set CHERE_INVOKING=1
 & set "PATH=C:\cygwin64\bin;%PATH%"
 & %ConEmuBaseDirShort%\conemu-cyg-64.exe /usr/bin/bash.exe --login -i -new_console:p:C:"C:\cygwin64\Cygwin.ico"

It may sound silly, but try restarting your OS. Please see my note in the original issue:

Note: I had an older version of Cygwin on WIN10 1903 x64 and it worked fine. I updated Cygwin to 3.1.1 and rebooted and then experienced the described issue.

@cy18
Copy link

@cy18 cy18 commented Mar 2, 2020

My problem has been fixed with cygwin 3.1.4 on Windows 10 1909.

@Inlight-by
Copy link

@Inlight-by Inlight-by commented May 29, 2020

My problem has been fixed with cygwin 3.1.4 on Windows 10 1909.

Same thing, the issue was gone after updating cygwin to 3.1.4 version

@cebaa
Copy link

@cebaa cebaa commented Jul 10, 2020

Working for me as well on cygwin 3.1.5 and ConEmu 200615.

@userdocs Probably worth closing this if it's fixed for you, just so others are aware (and so Maximus5 has one less bug to track, I assume that's helpful to him).

@userdocs userdocs closed this Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet