[GH-ISSUE #1271] Terminal output issues on Windows #652

Closed
opened 2026-04-12 10:20:40 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @clebio on GitHub (Nov 25, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1271

Originally assigned to: @dhiltgen on GitHub.

I saw that #1262 was merged, so I pulled main and regenerated and built the binary. It runs great, and definitely uses the GPU, now:

ggml_init_cublas: CUDA_USE_TENSOR_CORES: yes
ggml_init_cublas: found 1 CUDA devices:
  Device 0: NVIDIA GeForce RTX 4090, compute capability 8.9

However, the terminal interface is broken in a way that I don't understand.

Using Git Bash, it doesn't show output:

$ ./ollama.exe run orca-mini

Whereas if I add winpty:

$ winpty ./ollama.exe run orca-mini
←[?25l←[?25l←[?25h←[2K←[1G←[?25h←[?25l←[?25h←[?2004h>>> ←[38;5;245mSend a message (/? for help)←[28D←[0mwhy is the sky blue
←[Kwhy is the sky blue
←[?25l⠙ ←[?25h←[?25l←[2K←[1G⠹ ←[?25h←[?25l←[2K←[1G⠸ ←[?25h←[?25l←[?25l←[2K←[1G←[?25h←[2K←[1G←[?25h The←[?25l←[?25h sky←[?25l←[?25h appears←[?25l←[?25h blue←[?25l←[?25h b
ecause←[?25l←[?25h of←[?25l←[?25h a←[?25l←[?25h phenomenon←[?25l←[?25h called←[?25l←[?25h Ray←[?25l←[?25hleigh←[?25l←[?25h scattering←[?25l←[?25h.←[?25l←[?25h When←[?25l
←[?25h sunlight←[?25l←[?25h enters←[?25l←[?25h the←[?25l←[?25h Earth←[?25l←[?25h'←[?25l←[?25hs←[?25l←[?25h atmosphere←[?25l←[?25h,←[?25l←[?25h it←[?25l←[?25h encounters←
[?25l←[?25h tiny←[?25l←[?25h particles←[?25l←[?25h such←[?25l←[?25h as←[?25l←[?25h oxygen←[?25l←[?25h and←[?25l←[?25h nitrogen←[?25l←[?25h molecules←[?25l←[?25h.←[?25l←[
?25h These←[?25l←[?25h particles←[?25l←[?25h sc←[?25l←[?25hatter←[?25l←[?25h the←[?25l←[?25h light←[?25l←[?25h in←[?25l←[?25h all←[?25l←[?25h directions←[?25l←[?25h,←[?2
5l←[?25h but←[?25l←[?25h they←[?25l←[?25h sc←[?25l←[?25hatter←[?25l←[?25h more←[?25l←[?25h easily←[?25l←[?25h towards←[?25l←[?25h the←[?25l←[?25h longer←[?25l←[?25h wave
length←[?25l←[?25hs←[?25l←[?25h of←[?25l←[?25h light←[?25l←[?25h such←[?25l←[?25h as←[?25l←[?25h the←[?25l←[?25h v←[?25l←[?25hiolet←[?25l←[?25h and←[?25l←[?25h ind←[?25l
←[?25higo←[?25l←[?25h parts←[?25l←[?25h of←[?25l←[?25h the←[?25l←[?25h spectrum←[?25l←[?25h.←[?25l←[?25h This←[?25l←[?25h means←[?25l←[?25h that←[?25l←[?25h more←[?25l←[
?25h blue←[?25l←[?25h light←[?25l←[?25h is←[?25l←[?25h scattered←[?25l←[?25h towards←[?25l←[?25h the←[?25l←[?25h observer←[?25l←[?25h,←[?25l←[?25h making←[?25l←[?25h the
←[?25l←[?25h sky←[?25l←[?25h appear←[?25l←[?25h more←[?25l←[?25h blue←[?25l←[?25h than←[?25l←[?25h it←[?25l←[?25h would←[?25l←[?25h be←[?25l←[?25h if←[?25l←[?25h all←[?2
5l←[?25h the←[?25l←[?25h colors←[?25l←[?25h of←[?25l←[?25h light←[?25l←[?25h were←[?25l←[?25h equally←[?25l←[?25h scattered←[?25l←[?25h.←[?25l←[?25h

←[?25l←[?25h>>> ←[38;5;245mSend a message (/? for help)←[28D←[0m←[K←[38;5;245mSend a message (/? for help)←[28D←[0m←[K
←[?2004l

Using Command Prompt doesn't fare much better:

ollama.exe run orca-mini
←[?25l←[?25l←[?25h←[2K←[1G←[?25h←[?25l←[?25h←[?2004h>>> ←[38;5;245mSend a message (/? for help)←[28D←[0m^D
←[K
←[?2004l
Originally created by @clebio on GitHub (Nov 25, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1271 Originally assigned to: @dhiltgen on GitHub. I saw that #1262 was merged, so I pulled main and regenerated and built the binary. It runs great, and definitely uses the GPU, now: ``` ggml_init_cublas: CUDA_USE_TENSOR_CORES: yes ggml_init_cublas: found 1 CUDA devices: Device 0: NVIDIA GeForce RTX 4090, compute capability 8.9 ``` However, the terminal interface is broken in a way that I don't understand. Using Git Bash, it doesn't show output: ``` $ ./ollama.exe run orca-mini ``` Whereas if I [add `winpty`](https://stackoverflow.com/questions/32597209/python-not-working-in-the-command-line-of-git-bash): ``` $ winpty ./ollama.exe run orca-mini ←[?25l←[?25l←[?25h←[2K←[1G←[?25h←[?25l←[?25h←[?2004h>>> ←[38;5;245mSend a message (/? for help)←[28D←[0mwhy is the sky blue ←[Kwhy is the sky blue ←[?25l⠙ ←[?25h←[?25l←[2K←[1Gâ ¹ ←[?25h←[?25l←[2K←[1Gâ ¸ ←[?25h←[?25l←[?25l←[2K←[1G←[?25h←[2K←[1G←[?25h The←[?25l←[?25h sky←[?25l←[?25h appears←[?25l←[?25h blue←[?25l←[?25h b ecause←[?25l←[?25h of←[?25l←[?25h a←[?25l←[?25h phenomenon←[?25l←[?25h called←[?25l←[?25h Ray←[?25l←[?25hleigh←[?25l←[?25h scattering←[?25l←[?25h.←[?25l←[?25h When←[?25l ←[?25h sunlight←[?25l←[?25h enters←[?25l←[?25h the←[?25l←[?25h Earth←[?25l←[?25h'←[?25l←[?25hs←[?25l←[?25h atmosphere←[?25l←[?25h,←[?25l←[?25h it←[?25l←[?25h encounters← [?25l←[?25h tiny←[?25l←[?25h particles←[?25l←[?25h such←[?25l←[?25h as←[?25l←[?25h oxygen←[?25l←[?25h and←[?25l←[?25h nitrogen←[?25l←[?25h molecules←[?25l←[?25h.←[?25l←[ ?25h These←[?25l←[?25h particles←[?25l←[?25h sc←[?25l←[?25hatter←[?25l←[?25h the←[?25l←[?25h light←[?25l←[?25h in←[?25l←[?25h all←[?25l←[?25h directions←[?25l←[?25h,←[?2 5l←[?25h but←[?25l←[?25h they←[?25l←[?25h sc←[?25l←[?25hatter←[?25l←[?25h more←[?25l←[?25h easily←[?25l←[?25h towards←[?25l←[?25h the←[?25l←[?25h longer←[?25l←[?25h wave length←[?25l←[?25hs←[?25l←[?25h of←[?25l←[?25h light←[?25l←[?25h such←[?25l←[?25h as←[?25l←[?25h the←[?25l←[?25h v←[?25l←[?25hiolet←[?25l←[?25h and←[?25l←[?25h ind←[?25l ←[?25higo←[?25l←[?25h parts←[?25l←[?25h of←[?25l←[?25h the←[?25l←[?25h spectrum←[?25l←[?25h.←[?25l←[?25h This←[?25l←[?25h means←[?25l←[?25h that←[?25l←[?25h more←[?25l←[ ?25h blue←[?25l←[?25h light←[?25l←[?25h is←[?25l←[?25h scattered←[?25l←[?25h towards←[?25l←[?25h the←[?25l←[?25h observer←[?25l←[?25h,←[?25l←[?25h making←[?25l←[?25h the ←[?25l←[?25h sky←[?25l←[?25h appear←[?25l←[?25h more←[?25l←[?25h blue←[?25l←[?25h than←[?25l←[?25h it←[?25l←[?25h would←[?25l←[?25h be←[?25l←[?25h if←[?25l←[?25h all←[?2 5l←[?25h the←[?25l←[?25h colors←[?25l←[?25h of←[?25l←[?25h light←[?25l←[?25h were←[?25l←[?25h equally←[?25l←[?25h scattered←[?25l←[?25h.←[?25l←[?25h ←[?25l←[?25h>>> ←[38;5;245mSend a message (/? for help)←[28D←[0m←[K←[38;5;245mSend a message (/? for help)←[28D←[0m←[K ←[?2004l ``` Using Command Prompt doesn't fare much better: ``` ollama.exe run orca-mini ←[?25l←[?25l←[?25h←[2K←[1G←[?25h←[?25l←[?25h←[?2004h>>> ←[38;5;245mSend a message (/? for help)←[28D←[0m^D ←[K ←[?2004l ```
GiteaMirror added the bugwindows labels 2026-04-12 10:20:40 -05:00
Author
Owner

@clebio commented on GitHub (Nov 26, 2023):

Just occurred to me to try VSCode's built-in terminal (on the same computer) and it works fine. So terminal emulation issues of some sort, but I don't know what, as of yet.

<!-- gh-comment-id:1826447311 --> @clebio commented on GitHub (Nov 26, 2023): Just occurred to me to try VSCode's built-in terminal (on the same computer) and it works fine. So terminal emulation issues of _some sort_, but I don't know what, as of yet.
Author
Owner

@dhiltgen commented on GitHub (Mar 12, 2024):

I'm pretty sure we've already fixed this. There are still some glitches in the repl we're working on hammering out (e.g., arrows don't work), but we shouldn't see all these control characters any more.

<!-- gh-comment-id:1992077388 --> @dhiltgen commented on GitHub (Mar 12, 2024): I'm pretty sure we've already fixed this. There are still some glitches in the repl we're working on hammering out (e.g., arrows don't work), but we shouldn't see all these control characters any more.
Author
Owner

@fastrocket commented on GitHub (Sep 14, 2024):

Whatever you did, it's no longer working. On gitbash alone (Windows box), it hangs. It does work using Visual Studio Code githbash. The cursor blinks a lot when it is downloading, but the emulation works there.

<!-- gh-comment-id:2351210572 --> @fastrocket commented on GitHub (Sep 14, 2024): Whatever you did, it's no longer working. On gitbash alone (Windows box), it hangs. It does work using Visual Studio Code githbash. The cursor blinks a lot when it is downloading, but the emulation works there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#652