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

PineTab-V Image issues #12

Open
6 of 11 tasks
Fishwaldo opened this issue Aug 4, 2023 · 24 comments
Open
6 of 11 tasks

PineTab-V Image issues #12

Fishwaldo opened this issue Aug 4, 2023 · 24 comments

Comments

@Fishwaldo
Copy link
Owner

Fishwaldo commented Aug 4, 2023

Known Issues with the PTV image currently:

  • Apt Repository is disabled while we are testing
  • Any KDE app that integrates HTML content, or is a KDE based browser (konqueror, angelfish, kmail etc) currently crashes as the qtwebengine component still needs more work to port to Risc-V
  • Trackpad on the PTV is "funky"
  • Charger IC doesn't detect when on power versus battery (need to try to port to bq25890 driver?)
  • libcamera needs StarFive Patches
  • Sound isn't working reliably.
  • Sleep Mode is broken (wont come out from sleep)
  • LCD Backlight needs to be wired up to PWM for backlight adjustment
  • Kernel Ooops when booting - Setting Orientation
  • if the battery is dead, and you boot with the charger connected, when the SDDM login appears, it will shutdown. This is related to not detecting when it's been charged. Fix for now is to let it charge for 30 mins then attempt to boot.
  • Battery Percentage is incorrect. The fuel gauge used is a cw2015 device and the battery profile shipped with the factory image appears to be a cut/paste from another device and is not applicable to the PineTab-V. This results in incorrect battery percentage reporting (it will never reach 100%). Unfortunately the only way to get a correct battery profile is to send battery samples to cellwise for testing.
@Techwizz-somboo
Copy link

I'm assuming this falls under "Trackpad on the PTV is 'funky'" but for me left click doesn't work at all, other than that it isn't bad.

@Fishwaldo
Copy link
Owner Author

Yeah correct. I have been suggested a fix and will push a new image with some updates later today or tomorrow.

@Fishwaldo
Copy link
Owner Author

  • Touchpad is better, but still has a big of "lag" do it.
  • LCD Backlight works, but there is a bug with the Starfive PWM driver, so we can't actually turn off the backlight (setting backlight to 0 actually turns the BL on full)

@Fishwaldo
Copy link
Owner Author

new images pushed with a few other fixes. right now, i'm working on the Charger...

@Wulsi
Copy link

Wulsi commented Aug 8, 2023

  • Touchpad is better, but still has a big of "lag" do it.
  • LCD Backlight works, but there is a bug with the Starfive PWM driver, so we can't actually turn off the backlight (setting backlight to 0 actually turns the BL on full)

Don't disabled pwm or change pwm driver,then the BL will off.
When the gpio45 pin is low level,you must first turn it on with a high level,and then use pwm to control the brightness.

`static void pwm_backlight_power_off(struct pwm_bl_data *pb)
{
struct pwm_state state;

pwm_get_state(pb->pwm, &state);
if (!pb->enabled)
	return;

if (pb->enable_gpio)
	gpiod_set_value_cansleep(pb->enable_gpio, 0);

if (pb->pwm_off_delay)
	msleep(pb->pwm_off_delay);

// state.enabled = false;
state.duty_cycle = 0;
pwm_apply_state(pb->pwm, &state);

regulator_disable(pb->power_supply);
pb->enabled = false;

}`

@sxa
Copy link

sxa commented Aug 11, 2023

Just tried the 04082023 image and I'm seemingly getting a crash a few seconds after the login screen is displayed - anyone else had that? Is it related to Kernel Ooops when booting - Setting Orientation? I've tried starting the tablet up in both orientations but it happens regardless (The splash screen is always portrait, the login screen is always displayed in landscape until it disappears)

@Fishwaldo
Copy link
Owner Author

Do you have uart board connected? You should get some logs there on what's going wrong.

@Fishwaldo
Copy link
Owner Author

Btw, There is no accelerometer on the PinetabV, so auto rotation won't work.

@sxa
Copy link

sxa commented Aug 11, 2023

Do you have uart board connected? You should get some logs there on what's going wrong.

Not yet but it's on my list to get one connected to it :-) Just wanted to confirm that it's not a common known issue first and it sounds like it isn't so far.

And great work on getting it this far!

@Fishwaldo
Copy link
Owner Author

If the battery is empty, the PtV will shutdown after the login screen appears. Let it charge for a while and try again. (Will fix that eventually)

@sxa
Copy link

sxa commented Aug 11, 2023

If the battery is empty, the PtV will shutdown after the login screen appears. Let it charge for a while and try again. (Will fix that eventually)

Yep that is it - I thought it was near fully charged but I guess not :-)
Now I've got to figure out what I've done with my UART adapter since I seem to have misplaced it ...

@Fishwaldo
Copy link
Owner Author

  • Touchpad is better, but still has a big of "lag" do it.
  • LCD Backlight works, but there is a bug with the Starfive PWM driver, so we can't actually turn off the backlight (setting backlight to 0 actually turns the BL on full)

Don't disabled pwm or change pwm driver,then the BL will off. When the gpio45 pin is low level,you must first turn it on with a high level,and then use pwm to control the brightness.

`static void pwm_backlight_power_off(struct pwm_bl_data *pb) { struct pwm_state state;

pwm_get_state(pb->pwm, &state);
if (!pb->enabled)
	return;

if (pb->enable_gpio)
	gpiod_set_value_cansleep(pb->enable_gpio, 0);

if (pb->pwm_off_delay)
	msleep(pb->pwm_off_delay);

// state.enabled = false;
state.duty_cycle = 0;
pwm_apply_state(pb->pwm, &state);

regulator_disable(pb->power_supply);
pb->enabled = false;

}`

This does not work. Assigning the BL pin to the enable function just runs pulls the PWM output to 100% and thus its either on/off. What should happen is when the PWM duty cycle goes to 0, the pin stays at logic 0, but for some reason, at duty cycle 0, the pin goes logic 1 and thus drives at full strength.

Its either a error in the PWM driver, or the actual peripheral.

@Fishwaldo
Copy link
Owner Author

Fishwaldo commented Aug 14, 2023

New Image just pushed that:

  • Uses a mainline driver for the charger IC rather than the vendor patched version shipped in the factory kernel. Charging is now much better, faster and more accurate (you can get a almost full charge now - Some more tweaks might be required).
  • Really fixes the touchpad issues (middle/right click and much more reponsive)
  • Fixes the backlight power off issue now
  • Battery Percent should be more accurate, but still needs confirmation
  • rfkill for BT/Wifi works
  • flash led works
  • Hall Sensor now triggers a LID event instead of power event
  • Dropped the vendor patches for the es8316 and backported drivers from linux 6.5 for the sound. This is WIP, command line works, but pipewire/wireplumber needs more work to function under KDE.

@Wulsi
Copy link

Wulsi commented Aug 16, 2023

  • Touchpad is better, but still has a big of "lag" do it.
  • LCD Backlight works, but there is a bug with the Starfive PWM driver, so we can't actually turn off the backlight (setting backlight to 0 actually turns the BL on full)

Don't disabled pwm or change pwm driver,then the BL will off. When the gpio45 pin is low level,you must first turn it on with a high level,and then use pwm to control the brightness.
`static void pwm_backlight_power_off(struct pwm_bl_data *pb) { struct pwm_state state;

pwm_get_state(pb->pwm, &state);
if (!pb->enabled)
	return;

if (pb->enable_gpio)
	gpiod_set_value_cansleep(pb->enable_gpio, 0);

if (pb->pwm_off_delay)
	msleep(pb->pwm_off_delay);

// state.enabled = false;
state.duty_cycle = 0;
pwm_apply_state(pb->pwm, &state);

regulator_disable(pb->power_supply);
pb->enabled = false;

}`

This does not work. Assigning the BL pin to the enable function just runs pulls the PWM output to 100% and thus its either on/off. What should happen is when the PWM duty cycle goes to 0, the pin stays at logic 0, but for some reason, at duty cycle 0, the pin goes logic 1 and thus drives at full strength.

Its either a error in the PWM driver, or the actual peripheral.

As long as the pwm is not disabled, the pin will not being logic 1,you can set duty cycle 0,then backlight off. When the duty cycle is set from 0 to other values, you must first set the duty cycle to 100% to make U5200 conduction, and then you can set the duty cycle at will。

@Fishwaldo
Copy link
Owner Author

As long as the pwm is not disabled, the pin will not being logic 1,you can set duty cycle 0,then backlight off. When the duty cycle is set from 0 to other values, you must first set the duty cycle to 100% to make U5200 conduction, and then you can set the duty cycle at will。

Thats not what is happening. At Duty Cycle 0, the pin is going high, and thus pulling up the EN pin on TCS5201, thus driving the BL at full power. I've confirmed this on a Star64 with a standard GPIO connected to PWM as well (so I could rule out any problems with the BL circuit)

As a workaround i set the PD register on the GPIO. Not sure if thats intended but it seems very counter-intuitive to set PU/PD registers on a PWM pin.

@prushik
Copy link

prushik commented Aug 16, 2023

Uses a mainline driver for the charger IC rather than the vendor patched version shipped in the factory kernel. Charging is now much better, faster and more accurate (you can get a almost full charge now - Some more tweaks might be required).
Battery Percent should be more accurate, but still needs confirmation

I think there is still something wrong with charging or accuracy. I let mine sit on a USB-PD charger overnight and in the morning the battery percentage was 56%. With the previous version it would have been around 71%.

Other than this, everything about 20230814 image is a major improvement.

Also, I am unfamiliar with Yocto, but I searched through this repo and I can't seem to figure out where the kernel source tree comes from or where your patches are stored and applied. Is this accessible somewhere?

@Fishwaldo
Copy link
Owner Author

I've used some pretty conservative values right now for charging as we don't have a official data sheet on the battery.

For slow "offline" charging you can improve by:

  1. plugging in the PD charger while the PtV is turned on. The driver will increase the current limit for charging. Once plugged in, you can shutdown the PTV, and the charger will retain the current limit setting.
  2. alternatively (but almost the same) - boot up the PtV once plugging in, so the driver can update.

I hope we can fix the offline charging, but only after I'm sure we are not going to burn down PtV's haha.

The patches (which apply on top of the Star64_linux repo) are here: https://github.com/Fishwaldo/meta-riscv/tree/ptv/recipes-kernel/linux/linux-starfive (I'll be pushing to the actual kernel repo soonish)

@Fishwaldo
Copy link
Owner Author

By the way, you can cat /sys/class/power/*/uevent to see the progress of charging. The previous driver was limiting charging to 500mA and a low voltage, and could never get a full charge. The new driver pushes upto 2A and can get 100% charge.

@mbohun
Copy link

mbohun commented Aug 17, 2023

Just tried the 04082023 image and I'm seemingly getting a crash a few seconds after the login screen is displayed - anyone else had that? Is it related to Kernel Ooops when booting - Setting Orientation? I've tried starting the tablet up in both orientations but it happens regardless (The splash screen is always portrait, the login screen is always displayed in landscape until it disappears)

@sxa yes, i had a similar experience 2 days ago, but it looks/feels like it was caused by me being impatient :-) when the plasma/SDDM login screen appears - there is like a 1-2min delay until one can actually enter username and password to login.
So i think the first 2-3 times i was too impatient, started clicking my external mouse, and clicking the keys on my external keyboard - and i ended up with crashing the plasma/SDDM; although i could still switch to the console, and reboot from there.
However if I just boot, and wait, i am able to login without any problems.

PLUS i had some issues (i have to double-check this) when i tried to boot with the UART adapter (in the bottom USB-C port) and some USB device (keyboard, mouse, USB dock) plugged into the upper USB-C port, it would boot UART adapter working fine, i was observing the boot process over minicom from my PineBookPro, but the USB device plugged into the upper USB-C port was not responding - i have to double-check that as i said, because again that could be related to that slow startup / delay.

So the last time i started my PineTab-V, it was connected as follows:
IMG_20230817_152607

Only after the start and login, i reconnected the UART adapter:
IMG_20230817_160026

The red USB-C cable, those are 2 separate USB-C cables:

  • UART adapter red USB-C cable is plugged into my PineBookPro for the minicom session
  • and in my PineTab-V upper USB-C port i have plugged my KOGAN USB-C dock:
    • red USB-C cable is power for the KOGAN dock
    • black USCB cable goes to my pine64 keyboard (the keyboard has USB mouse plugged in it)
    • ethernet cable

I am using (have to - at the moment) an external monitor, because my PineTab-V display or the cable connecting the display to the motherboard is broken, and needs to be fixed.
IMG_20230817_152852

@mbohun
Copy link

mbohun commented Aug 18, 2023

@sxa UPDATE: I double-checked, and I can have the UART adapter AND my USB-C dock connected BOTH at the time of the boot, and it works as expected.
HOWEVER my PineTab-V "crashed" rebooted itself (overnight) after running OK for apx. 48 hours. I returned to my home office this morning and found the PineTab-V restarted.

@xudianhua
Copy link

@Fishwaldo would you tell me how to change system time?
image

@xudianhua
Copy link

@Fishwaldo we has found the ways to configure the system time. thanks.

@tinspin
Copy link

tinspin commented Dec 14, 2023

Most applications do not draw bitmap content making them unusable?

Try launching GIMP f.ex.

Another thing they have in common is that the mouse pointer disappears.

Edit: Switching to X11 kinda works, but then the mouse pointer does not show on the desktop GUI, colors are wrong and the performance is much worse (X takes one core on it's own, why?!) than wayland (and the working softpipe wayland on Vision Five 2).

The above should be highest priority as it makes the device unusable for anything but YouTube. Edit: just realized this probably is caused by the GPU driver? Would be nice with a way to know if the display output uses the GPU in some more fundamental way than trying 3D accelerated apps.

I'm just listing things you probably know but for completeness:

  • Battery levels are wonky (as still listed as unfix-ed/able), since I'm planning to use this perma-plugged-in this is of some concern, can the battery be told to not charge programmatically or is that part of the hardware circuit?
  • The battery icon goes away from the taskbar alot, can't reproduce when it happens but the only way to know battery status then is to lock the screen.
  • Bluetooth Mouse connects but does not move the cursor.
  • Booting without keyboard only work on login screen, once logged in touch stops working until you connect the keyboard but then the mousepad is broken.
  • Audio has static and the headphone jack does not work, these are probably ok to ignore if there is no DAC, most SBC need USB DACs even Raspberry Pi 4.
  • The touch keyboard needs work.

My solution to most of these is a 3 port USB-C dongle + USB DAC that I plug wired keyboard + mouse into, it also has Ethernet! Works great for home use.

Hardcore problems to use the GPU and develop games:

  • My OpenGL 1 game crashes, could switch to softpipe.
  • My OpenGL ES 3 game crashes with wayland.so.
  • I cannot compile with g++ the command returns immediately without any output. Edit: with X11 I get output, but then there is no gles2-mesa-dev package... and searching gles yeilds nothing!!
  • It seems webgl in ff works but it uses softpipe.
  • glinfo and glgears both fail.
  • Emacs would be nice nox or uemacs ok...

Last but not least I have had one pretty scary hardware glitch; once I was trying to get Twitch webpage to load (won't happen for some reason, but I know it's one of the heavier sites out there) and all of a sudden black screen without recourse (had to pull all cables and force reboot); I could hear the USB DAC make a faint crackle noise when it happened (not twitch audio related) so pretty sure it was power related, I'm thinking full USB hub + eth and CPU max loaded for 5 min. = something really bad. But it happened with power plugged in. That said I can't seem to get it charging reliably; sometimes it charges fast, sometime it discharges WHILE the power cable is in! Rebooted fine though, so no permanent damage I think.

I didn't have the UART inserted because I was testing without keyboard stuff... anyhow this is worrying combined with the whole battery charging situation. Don't want to cause a fire with this thing.

Edit: Now that I think about it maybe the USB-C connectors are to blame, I never used those on moving items, maybe they are glitchy?

@barracuda156
Copy link

The patches (which apply on top of the Star64_linux repo) are here: https://github.com/Fishwaldo/meta-riscv/tree/ptv/recipes-kernel/linux/linux-starfive (I'll be pushing to the actual kernel repo soonish)

@Fishwaldo Has there been any updates ever since for the OS itself?

And a minor issue: I cannot get Wifi connected to any of the networks (iPhone hotspot, 802.1x network): they are recognized, but never connecting to them fails.

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

9 participants