π
<-

Screen Issues and more-linux Ti Nspire CX revision Y

Re: Screen Issues and more-linux Ti Nspire CX revision Y

Vogtinator wrote:
Also, it is interesting that my mouse has a LED and my calculator seems to use it as a memory usage indicator, like the LED in my PC that indicates the SSD is in use. I´ll attach a small video with that.

Fun! Normally LED triggers are defined in the device tree, but apparently there's some more logic outside of that.

Good news: Meanwhile I was able to get USB host support on CX II working! It only took a regulator-always-on to force the 5V supply on and removing GMIR_INT_POLARITY (same hack as for the gadget driver) to fix severe performance issues (was ~100KiB/s depending on USB drive). I'm using an externally powered hub here and was able to boot from a USB drive just fine, now with ~7MiB/s read speed reported by hdparm.

The fixes aren't in git yet because for some reason either git or GitHub aren't smart enough to notice that only the diff on top of mainline needs to be transmitted, and not the whole diff between kernel versions...

Due to missing role switch support Vbus is always on, so I recommend to not connect the calc to a PC while Linux is running. It works best when the USB device(s) is/are already connected to the calculator before starting linuxloader anyway, which avoids the Vbus conflict.

zImage.tns
dtb.tns

Ok, I´ve tested the new .dtb and zImage for the CXII and it worked normally with the screen rotated to the right side and even without using a powered USB Hub, just the OTG connected to the USB Pen Drive. Here is a shot of it:

You cant see with that image, but Debian loaded normally.

Now, first of I would like to ask you if you have now someway to fix the screen rotation for the CX, for testing purposes to see if it would work was fine, just take a picture, flip the image and now I can read what´s on screen. Problem is, to try to use it normally it is starting to be a pain in the *ss. I don´t mind having it in this kind of "Portrait Mode" (Sorry, I forgot the screen resolution of the X+ models), but at least having it flipped in the right side so I can read the text would be great. I know you said you can´t just solve it with software like it´s done with Ndless compatibility mode, but isn´t there anyway, at least by installing and running some linux application once it boots up the system?

Talking about my linux experience and issues so far a bit.

I´ve decided to switch the approach and went from Arch to Debian (from this guide: https://ivoah.net/blog/2016/03/20/how-to-install-debian-on-a-ti-nspire/) because the time it would take was really long, sometimes it would be stuck again in the Network Name Resolution thing and it would completely drain the battery of the calculator just to boot up. Yes, even though I have a powered USB Hub, it does not charge the calculator.

First of, I´m having an issue in which Debian on the calculator will not be able to install programs with "apt install" because it somewhat can´t change system files, which doesn´t make sense because on ubuntu I can do it when I enter the filesystem with "chroot /mnt" (/mnt is where the external drive is mounted) but not in the calculator it self even though I´m logged as root.

Secondly, I installed dillo but I´m not being able to make the X11 forward work.
I know this is not Nspire CX specific, it is totally in linux side now, just commenting this here while I still try to solve these but Googling it.

Bisam wrote:I think it's more likely indicating changes of power consumption : the more the calc needs power, the less the LED is lit, isn't it ?

It must be somewhere in the calculator side, as Votignator said.

SuperXX

Niveau 7: EP (Espèce Protégée: geek)
Level up: 43.8%

Posts: 66
Joined: 15 May 2021, 10:25
Gender:
Calculator(s):

Re: Screen Issues and more-linux Ti Nspire CX revision Y

SuperXX wrote:Ok, I´ve tested the new .dtb and zImage for the CXII and it worked normally with the screen rotated to the right side and even without using a powered USB Hub, just the OTG connected to the USB Pen Drive.

As long as it doesn't need too much power, it should indeed work.

Here is a shot of it:

...

You cant see with that image, but Debian loaded normally.

Yay! How long did it take (ignoring the 10s rootdelay) and how is the USB drive speed?

Now, first of I would like to ask you if you have now someway to fix the screen rotation for the CX, for testing purposes to see if it would work was fine, just take a picture, flip the image and now I can read what´s on screen. Problem is, to try to use it normally it is starting to be a pain in the *ss. I don´t mind having it in this kind of "Portrait Mode" (Sorry, I forgot the screen resolution of the X+ models), but at least having it flipped in the right side so I can read the text would be great. I know you said you can´t just solve it with software like it´s done with Ndless compatibility mode, but isn´t there anyway, at least by installing and running some linux application once it boots up the system?

There are several options, in the order of "hard, but clean" to "easy, but hacky":

1. Implement support for the SPI controller used to talk to the LCD and add support for "compat mode" in Linux
2. Implement console mirroring in Linux
3. Have linuxloader configure the LCD controller to only mirror, but not enter full lcd_compat mode
4. Make Linux support the lcd_compat mode enabled by ndless

1. and 4. are not that easy for me to implement because I don't have hardware to test it with.
2 touches the console code which I have no idea about and is unlikely to get accepted upstream.
3 is not that simple because LCD controller access is OS-specific.

Talking about my linux experience and issues so far a bit.

I´ve decided to switch the approach and went from Arch to Debian (from this guide: https://ivoah.net/blog/2016/03/20/how-to-install-debian-on-a-ti-nspire/) because the time it would take was really long, sometimes it would be stuck again in the Network Name Resolution thing and it would completely drain the battery of the calculator just to boot up. Yes, even though I have a powered USB Hub, it does not charge the calculator.

You can probably disable that service.

First of, I´m having an issue in which Debian on the calculator will not be able to install programs with "apt install" because it somewhat can´t change system files, which doesn´t make sense because on ubuntu I can do it when I enter the filesystem with "chroot /mnt" (/mnt is where the external drive is mounted) but not in the calculator it self even though I´m logged as root.

Might be some missing kernel feature, or somehow / is mounted as read-only. What's the exact error message?

Secondly, I installed dillo but I´m not being able to make the X11 forward work.

In which direction? For some reason the keyboard (at least on my CX II) isn't recognized by the X server on the calc, but the touchpad works...

I know this is not Nspire CX specific, it is totally in linux side now, just commenting this here while I still try to solve these but Googling it.

Bisam wrote:I think it's more likely indicating changes of power consumption : the more the calc needs power, the less the LED is lit, isn't it ?

It must be somewhere in the calculator side, as Votignator said.

Niveau 8: ER (Espèce Rare: nerd)
Level up: 96.1%

Posts: 208
Joined: 29 Mar 2014, 15:55
Gender:
Calculator(s):

Re: Screen Issues and more-linux Ti Nspire CX revision Y

Votignator wrote:Yay! How long did it take (ignoring the 10s rootdelay) and how is the USB drive speed?

It takes the CXII to boot, without taking the 10s rootdelay into consideration, around 42seconds, which is SOOOO FAST!! (To boot debian). For comparison, the CX took somewhere around the time my PC took to load GTA Online (for anyone who plays it knows how much that can be) which gives it around 2 minutes and 35 seconds. And the USB Drive speed I didn't run any kind of benchmarks or specific tests, but it seems actually pretty good.

Votignator wrote:There are several options, in the order of "hard, but clean" to "easy, but hacky":

1. Implement support for the SPI controller used to talk to the LCD and add support for "compat mode" in Linux
2. Implement console mirroring in Linux
3. Have linuxloader configure the LCD controller to only mirror, but not enter full lcd_compat mode
4. Make Linux support the lcd_compat mode enabled by ndless

1. and 4. are not that easy for me to implement because I don't have hardware to test it with.
2 touches the console code which I have no idea about and is unlikely to get accepted upstream.
3 is not that simple because LCD controller access is OS-specific.

So those solutions don´t seem to be easy at all. Specially when for the 4th you said that the LCD controller is OS-Specific, which from my understanding would not be easy to implement the closed source one used by the Ti-Nspire OS.

In the mean time, I focused on the 2nd option you gave, because it didn´t require any programming to do if there was already as software to do it.
The thing is, there isn´t.
I saw this askubuntu (https://askubuntu.com/questions/237963/how-do-i-rotate-my-display-when-not-using-an-x-server) article, so I tried this command to see if it would rotate the screen:
Code: Select all
tee /sys/class/graphics/fbcon/rotate

And it rotated it, and it has the possibility to run on boot.
But since the issue is not only screen orientation, is also mirroring/flipping it, I opened and issue myself (https://unix.stackexchange.com/questions/675847/how-to-flip-linux-console/675871#675871) to ask that question. And it seems that for now, that is not possible without making modifications to Linux (Debian in this case), which actually just makes this solution 10x more complicated than what seemed at first.

You can probably disable that service.

I don´t want to do that, because I want to have internet access and make dillo browser work, which is my main objective with running Linux on my calculator. It would be cool to go into Google and show a Rick Astley .gif to my friends with my calculator
But maybe, if there are benefits on using Arch and if it´s better to use in the CXII, I´ll maybe give it a shot again in the future once I either get Debian to work, or give up on Debian. But for now, that´s not my focus, since also Debian is actually for familiar to me then Arch.

Votignator wrote:Might be some missing kernel feature, or somehow / is mounted as read-only. What's the exact error message?

Here is my attempt on trying to install sudo (Debian doesn´t come with it), after doing the on my computer with chroot:
Code: Select all
apt-get install -d

and remounting with
Code: Select all
mount -o remount /dev/sda1

or
Code: Select all
mount -o remount /

as I saw in some places doesn´t solve the problem.

But when this was happening to dillo and I ran the command (apt install dillo) while chroot on ubuntu, it just worked.

In which direction? For some reason the keyboard (at least on my CX II) isn't recognized by the X server on the calc, but the touchpad works...

Oh sorry, I made you think it was an issue with the mousepad. I was talking about the XServer Forwarding. What I mean by that is dillo doesn´t detect any screen. Here is the output when I run it:

Code: Select all
root@ubuntu:/# dillopaths: Cannot open file '/root/.dillo/dillorc': No such file or directorypaths: Using /etc/dillo/dillorcpaths: Cannot open file '/root/.dillo/keysrc': No such file or directorypaths: Using /etc/dillo/keysrcpaths: Cannot open file '/root/.dillo/domainrc': No such file or directorypaths: Using /etc/dillo/domainrcDomain: Default accept.dillo_dns_init: Here we go! (threaded)Disabling cookies.No protocol specifiedCan't open display: :

And I tried following the first and second solutions for this in this article (https://superuser.com/questions/310197/how-do-i-fix-a-cannot-open-display-error-when-opening-an-x-program-after-sshi) with no success. And I ran
Code: Select all
service ssh status

and says it´s working so I can´t see what´s the problem here

SuperXX

Niveau 7: EP (Espèce Protégée: geek)
Level up: 43.8%

Posts: 66
Joined: 15 May 2021, 10:25
Gender:
Calculator(s):

Re: Screen Issues and more-linux Ti Nspire CX revision Y

SuperXX wrote:
Votignator wrote:Yay! How long did it take (ignoring the 10s rootdelay) and how is the USB drive speed?

It takes the CXII to boot, without taking the 10s rootdelay into consideration, around 42seconds, which is SOOOO FAST!! (To boot debian). For comparison, the CX took somewhere around the time my PC took to load GTA Online (for anyone who plays it knows how much that can be) which gives it around 2 minutes and 35 seconds. And the USB Drive speed I didn't run any kind of benchmarks or specific tests, but it seems actually pretty good.

That's indeed fairly quick.

Votignator wrote:There are several options, in the order of "hard, but clean" to "easy, but hacky":

1. Implement support for the SPI controller used to talk to the LCD and add support for "compat mode" in Linux
2. Implement console mirroring in Linux
3. Have linuxloader configure the LCD controller to only mirror, but not enter full lcd_compat mode
4. Make Linux support the lcd_compat mode enabled by ndless

1. and 4. are not that easy for me to implement because I don't have hardware to test it with.
2 touches the console code which I have no idea about and is unlikely to get accepted upstream.
3 is not that simple because LCD controller access is OS-specific.

So those solutions don´t seem to be easy at all. Specially when for the 4th you said that the LCD controller is OS-Specific, which from my understanding would not be easy to implement the closed source one used by the Ti-Nspire OS.

In the mean time, I focused on the 2nd option you gave, because it didn´t require any programming to do if there was already as software to do it.
The thing is, there isn´t.
I saw this askubuntu (https://askubuntu.com/questions/237963/how-do-i-rotate-my-display-when-not-using-an-x-server) article, so I tried this command to see if it would rotate the screen:
Code: Select all
tee /sys/class/graphics/fbcon/rotate

And it rotated it, and it has the possibility to run on boot.
But since the issue is not only screen orientation, is also mirroring/flipping it, I opened and issue myself (https://unix.stackexchange.com/questions/675847/how-to-flip-linux-console/675871#675871) to ask that question. And it seems that for now, that is not possible without making modifications to Linux (Debian in this case), which actually just makes this solution 10x more complicated than what seemed at first.

Yes, it needs to be implemented first.

You can probably disable that service.

I don´t want to do that, because I want to have internet access and make dillo browser work, which is my main objective with running Linux on my calculator. It would be cool to go into Google and show a Rick Astley .gif to my friends with my calculator
But maybe, if there are benefits on using Arch and if it´s better to use in the CXII, I´ll maybe give it a shot again in the future once I either get Debian to work, or give up on Debian. But for now, that´s not my focus, since also Debian is actually for familiar to me then Arch.

Votignator wrote:Might be some missing kernel feature, or somehow / is mounted as read-only. What's the exact error message?

Here is my attempt on trying to install sudo (Debian doesn´t come with it), after doing the on my computer with chroot:
Code: Select all
apt-get install -d

and remounting with
Code: Select all
mount -o remount /dev/sda1

or
Code: Select all
mount -o remount /

as I saw in some places doesn´t solve the problem.

You need to use mount -o remount,rw /, the rw is the crucial part. Or try adding rw to the kernel cmdline. It's also possible that the filesystem was mounted read-only because some errors were found during boot. That should be visible in the logs though.

But when this was happening to dillo and I ran the command (apt install dillo) while chroot on ubuntu, it just worked.

In which direction? For some reason the keyboard (at least on my CX II) isn't recognized by the X server on the calc, but the touchpad works...

Oh sorry, I made you think it was an issue with the mousepad. I was talking about the XServer Forwarding. What I mean by that is dillo doesn´t detect any screen. Here is the output when I run it:

Code: Select all
root@ubuntu:/# dillopaths: Cannot open file '/root/.dillo/dillorc': No such file or directorypaths: Using /etc/dillo/dillorcpaths: Cannot open file '/root/.dillo/keysrc': No such file or directorypaths: Using /etc/dillo/keysrcpaths: Cannot open file '/root/.dillo/domainrc': No such file or directorypaths: Using /etc/dillo/domainrcDomain: Default accept.dillo_dns_init: Here we go! (threaded)Disabling cookies.No protocol specifiedCan't open display: :

And I tried following the first and second solutions for this in this article (https://superuser.com/questions/310197/how-do-i-fix-a-cannot-open-display-error-when-opening-an-x-program-after-sshi) with no success. And I ran
Code: Select all
service ssh status

and says it´s working so I can´t see what´s the problem here

So you're running the X server on the calc and the application on the computer?

Niveau 8: ER (Espèce Rare: nerd)
Level up: 96.1%

Posts: 208
Joined: 29 Mar 2014, 15:55
Gender:
Calculator(s):

Re: Screen Issues and more-linux Ti Nspire CX revision Y

You need to use mount -o remount,rw /, the rw is the crucial part. Or try adding rw to the kernel cmdline. It's also possible that the filesystem was mounted read-only because some errors were found during boot. That should be visible in the logs though.

Ok so the mount -o remount,rw / worked and now I was being able to install sudo (I aborted it in the middle since I dind´t have time), but now since I´m root and the system is mounted as read/write everything is fine I don´t even need sudo so I´m purging the corrupted installation. The rw command is also useful to apply it on boot, so thanks.

So you're running the X server on the calc and the application on the computer?

No, only in my calculator.

Here is a little summary of what I tried:

1.-xhost + gives the error: unable to open display "" or (after setting up the display IP with: export DISPLAY='localhost (or 127.0.0.1)') unable to open display "localhost (or 127.0.0.1)"

2.-Executing the command ssh username@hostname -X,replacing the "username" with "root" and localhost with "ubuntu", which is what appears in the calculator, I get an error with:

Code: Select all
ssh: Could not resolve hostname ubuntu: Temporary Failure in Name Resolution

but if I use "localhost" or "127.0.0.1" as the hostname, here is what appears:

(Sorry forgot to flip it)

3.-Executing ssh username@hostname -Y is pretty similar to what happens in the 2.

4.-Dillo will actually say in the last line Can´t open display: localhost after setting it with export DISPLAY='localhost'

I also should point out that after booting Debian on my calculator for the second time after putting rw in the "cmdline", sometimes when I execute some commands I get these kinds of USB errors and things like that:

But it can also be because there was one time I unplugged the USB cord and forgot to reset the calculator for about 6 mins

SuperXX

Niveau 7: EP (Espèce Protégée: geek)
Level up: 43.8%

Posts: 66
Joined: 15 May 2021, 10:25
Gender:
Calculator(s):

Re: Screen Issues and more-linux Ti Nspire CX revision Y

SuperXX wrote:
So you're running the X server on the calc and the application on the computer?

No, only in my calculator.

Here is a little summary of what I tried:

1.-xhost + gives the error: unable to open display "" or (after setting up the display IP with: export DISPLAY='localhost (or 127.0.0.1)') unable to open display "localhost (or 127.0.0.1)"

2.-Executing the command ssh username@hostname -X,replacing the "username" with "root" and localhost with "ubuntu", which is what appears in the calculator, I get an error with:

Code: Select all
ssh: Could not resolve hostname ubuntu: Temporary Failure in Name Resolution

but if I use "localhost" or "127.0.0.1" as the hostname, here is what appears:

(Sorry forgot to flip it)

Did you actually start an X server? Otherwise there's nothing it can connect to. Try startx.

Even though ubuntu is the system's own hostname, it'll try to connect to it via the "outside" by default, because it's not in /etc/hosts.

3.-Executing ssh username@hostname -Y is pretty similar to what happens in the 2.

4.-Dillo will actually say in the last line Can´t open display: localhost after setting it with export DISPLAY='localhost'

I also should point out that after booting Debian on my calculator for the second time after putting rw in the "cmdline", sometimes when I execute some commands I get these kinds of USB errors and things like that:

But it can also be because there was one time I unplugged the USB cord and forgot to reset the calculator for about 6 mins

That looks like a disconnect happened while it was still mounted. So if you unplugged while it was still booted, that would explain it. It can lead to data corruption.

Niveau 8: ER (Espèce Rare: nerd)
Level up: 96.1%

Posts: 208
Joined: 29 Mar 2014, 15:55
Gender:
Calculator(s):

Re: Screen Issues and more-linux Ti Nspire CX revision Y

Did you actually start an X server? Otherwise there's nothing it can connect to. Try startx.

Oh, I haven´t tried that before.

The command just said it wasn´t installed so I installed it with apt-get install xserver-xorg xserver-xorg-video-fbdev xinit pciutils xinput xfonts-100dpi xfonts-75dpi xfonts-scalable

Now I´m able to go into xserver and open dillo in the CXII

But it is in 240*320 resolution. So I tried to rotate it with xrandr --output None-1 --rotate right (None-1 is the screen name that happears when I type the xrandr command)

But then the calculator crashed and the screen went almost all white:

I tried setting up a costum resolution with this guide:
https://www.tecmint.com/set-display-screen-resolution-in-ubuntu/
But the cvt commmand gives part of the output to outside of the screen, which makes it useless for me

Regarding the CX:
startx gives some errors when trying to initialize.

Here is another screenshot:

That looks like a disconnect happened while it was still mounted. So if you unplugged while it was still booted, that would explain it. It can lead to data corruption.

Ok. I´ve formatted the Drive and debootstraped debian again and it was still giving those errors. Until I´ve putted it into the CXII and ran the startx command and when I got back to the CX it wasn´t happening again, don´t know why. Maybe it was because at that time the CXII dindn´t have the rw in the cmdline at that time (I needed to remout it as read and write for the startx to work)

SuperXX

Niveau 7: EP (Espèce Protégée: geek)
Level up: 43.8%

Posts: 66
Joined: 15 May 2021, 10:25
Gender:
Calculator(s):

Re: Screen Issues and more-linux Ti Nspire CX revision Y

SuperXX wrote:So I tried to rotate it with xrandr --output None-1 --rotate right (None-1 is the screen name that happears when I type the xrandr command)

But then the calculator crashed and the screen went almost all white:

Did you run that in the linux console while X is active on a different VT? I recommend doing that inside the X session.

I don't know what the effect of that xrandr command is, but it might try to do HW rotation instead of software rotation.
You could try using the fbdev X driver instead of modesetting and use its Rotate option.

I tried setting up a costum resolution with this guide:
https://www.tecmint.com/set-display-screen-resolution-in-ubuntu/
But the cvt commmand gives part of the output to outside of the screen, which makes it useless for me

On the CX II, the framebuffer console should be rotated properly though? Is this maybe with the CX DTB?

Regarding the CX:
startx gives some errors when trying to initialize.

Here is another screenshot:

Is there anything relevant in /var/log/Xorg.0.log?

You might want to add the hostname to /etc/hosts here, that should avoid the errors at the start at least.

That looks like a disconnect happened while it was still mounted. So if you unplugged while it was still booted, that would explain it. It can lead to data corruption.

Ok. I´ve formatted the Drive and debootstraped debian again and it was still giving those errors. Until I´ve putted it into the CXII and ran the startx command and when I got back to the CX it wasn´t happening again, don´t know why. Maybe it was because at that time the CXII dindn´t have the rw in the cmdline at that time (I needed to remout it as read and write for the startx to work)

Niveau 8: ER (Espèce Rare: nerd)
Level up: 96.1%

Posts: 208
Joined: 29 Mar 2014, 15:55
Gender:
Calculator(s):

Re: Screen Issues and more-linux Ti Nspire CX revision Y

Did you run that in the linux console while X is active on a different VT? I recommend doing that inside the X session.

Yes, I was inside the XSession. That white screen console is inside the Xserver

You could try using the fbdev X driver instead of modesetting and use its Rotate option.

Ok, I´ll try to see that tomorrow when I can play around with the CXII again

On the CX II, the framebuffer console should be rotated properly though? Is this maybe with the CX DTB?

No, it is using the CXII DTB. And before using the startx command

The linux terminal before that is displayed correctly:

That error with the server only happened once and it was solved by simply resetting the calculator

Is there anything relevant in /var/log/Xorg.0.log?

Yes, there is content in the Xorg.0.log
Sending as an attachment

I´m also sending the .old one. I assume it is the one that happened before the last, so that´s for the successful CXII try

You might want to add the hostname to /etc/hosts here, that should avoid the errors at the start at least.

Attachments
Xorg.0.log
xorg.0.log.old.log
.old (Ti-Planet doesn´t allow .old extension)

SuperXX

Niveau 7: EP (Espèce Protégée: geek)
Level up: 43.8%

Posts: 66
Joined: 15 May 2021, 10:25
Gender:
Calculator(s):

Re: Screen Issues and more-linux Ti Nspire CX revision Y

You could try using the fbdev X driver instead of modesetting and use its Rotate option.

Ok, I´ll try to see that tomorrow when I can play around with the CXII again

Here are the results:

Configuring fbdev to rotate the screen with the "1-fbdev.conf" (sending as an attachment for future reference) file and the line Option "Rotate" "CW" worked

Now the screen it is in the right orientation:

(It gives output to outside of the screen, but if I can get the mouse to work and I make it able to move the screen to see what I want I´m fine)

Dillo

Now, I tried to used a mouse with the CXII to use dillo. But it refuses to boot if I do that with the same config as the CX

It detects the Mouse, but it doesn´t detect the sda1 partition. It only lists the RAM one which I don´t know why that can be. Maybe Power issues?

Attachments
1-fbdev.conf.txt
Remove the .txt extension

SuperXX

Niveau 7: EP (Espèce Protégée: geek)
Level up: 43.8%

Posts: 66
Joined: 15 May 2021, 10:25
Gender:
Calculator(s):

PreviousNext

Who is online

Users browsing this forum: No registered users and 22 guests

-
Search
-
Social
-
Featured topics
123
-
For more contests, prizes, reviews, helping us pay the server and domains...

Discover the the advantages of a donor account !

-
Stats.
554 utilisateurs:
>537 invités
>11 membres
>6 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)

-
Other interesting websites
Texas Instruments Education
Global | France
(English / Français)
Banque de programmes TI
ticalc.org
(English)
La communauté TI-82
tout82.free.fr
(Français)