-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Switching on backlight #1179
Comments
There's a known bug with the firmware glue switching the DSI backlight. A fix is in the patch queue. |
Ok thanks, will retest then as soon as its pushed out... |
Firmware is pushed. Please test after running rpi-update. |
@popcornmix one on off cycle then off and back to:-
And if i leave it a while it seems to toggle again sometimes |
You're switching the backlight at a fast interval. I can see two entries in the log that are less than 500ms apart. Switching the backlight on and off that quickly will hit the ratelimit built into the firmware. Is the issue still present if your do .. until loop incorporates a ~1 second delay? |
@P33M I am triggering on a key press (activating soft off), I left the install overnight and tired triggering again no joy, I am also toggling the frame buffer blanking? at the same time. Even if it skips a setting it should fix after a pause and timer reset, is that rate limit there for any real reason? and as said this code path works fine for backlights provided via gpio_backlight and fbtft, I will go back and generate an a application log and corresponding kernel log a am fairly sure that I only wrote once in a second to the sysfs bl power file but i didn't save the logs. Phill. |
Setting framebuffer blanking as well as backlight power is unnecessary - blanking the fb will turn off the backlight. |
@P33M ok yes that's probably whats causing the backlight setting in rapid succession though it really should recover gracefully as left overnight and just switching on failed? i am not sure if toggling the blanking on a fbtft frame buffer toggles the bl(and not all display have bl control) which is why the codes in there for the blanking and of course blanking the HDMI output before calling vcgencmd display_power to cause HDMI screen power saving. |
Part of the problem is that it appears the linux-side expects a backlight change to never fail - the backlight update function can return a value, but this value is ignored by the framebuffer update. I'll think about this a bit more. |
@P33M something doesn't smell right in my case I am setting blank and power off then unblank and poweron, so it shouldn't matter that the second op failed as it would be set to the same state by either call... |
Hm. That's right actually - even with the limit you should still be seeing the backlight actually switch state. Can you post the full script you use so I can replicate the behaviour? |
@P33M is available but theirs quite an overhead as this is an applet embedded in a build of squeeze play of the Pi debs in https://github.com/pssc/squeezeplay-dist its alpha and if you have don't have a Logitech music server you will have to abort the setup to connect to server by pressing home (q) toggles soft power. Probably best if I try and document my tests tonight with dmesg and application log output, I cant test from here and I can disable blank and/or backlight control will a simple option to test how thats affecting the interaction.... In summary before firmware update:- Re toggled off last night wouldn't switch on left for 7hrs tried to power on again in the morning no joy |
@P33M ok disabling the back light control and just toggling the backlight in the app works so its some artefact of setting both bl and blaking |
@P33M also first toggle blanks screen but doesnt toggle the backlight... |
I've installed squeezeplay and can see the issue. |
@P33M oh good its not just not me, by default it will toggle both (bl and blanking), there should be a menu option under setup advanced SqueezePi to toggle Bl control/ Blanking also add applet.Linux to info in the logging config so see what’s going on and sqeezeplay.ui to warn to reduce noise. Feed back appreciated as your probably about the 3rd user of that package... |
For some reason, pressing Q (or waiting for a backlight wakeup) causes two writes to the mailbox interface in quick succession. The first always has a bl value of 0, the second is what the backlight is supposed to be, which is why switch-off works but not switch-on. There is an obvious fix to make to the firmware - don't bother ratelimiting unless the backlight actually changes. This solves this particular case. |
Can you test the start.elf from this link? Replace start.elf in /boot. |
@P33M ware you still getting two writes event with one of the two options disabled? and did you see on the first toggle after reboot to blanking only that it didn't switch off? , say if the values the same not to bother with the rate limiting would seem to me reasonable. |
@P33M start.elf will do, have to wait till about 11 this eve as the PI here at work doesn’t have a Official Pi LCD screen ;-) |
@P33M ok seems to be good with both blanking and bl control enabled, however still seeing first toggle with blanking only not affecting the back light. initial sate odd somewhere? |
If I reset the Pi when SqueezePi is running and the backlight is off, on the next boot I either get an infinite loop of backlight calls to the firmware or a call to turn the backlight on, but the framebuffer remains blanked. The internal state of the driver and firmware remains consistent. |
ok that’s different to the issue I am seeing which is when i reboot the pi the back-light on and console is unblanked and squeezepi is on (console blanks bl remains on and I only have blanking control enabled). I will try replicate that at home. You could see if the what the application issues by enabling logging(Settings->Advanced->logging) at info of the applet.Linux module stuff should appear is syslog. Are you running with bl and blanking control? (Settings->Advanced->SqueezePi) and is your instance connected to a server? |
FYI I only issue bl/ blacking contol on soft power on/off events so struggling to figure how that loops occurring in the code unless your not connected to a server and thats causing the loop somehow. |
…m edges See: #463 firmware: di_adv: Add config setting to add nop delays to shader See: http://forum.kodi.tv/showthread.php?tid=231092&pid=2150605#pid2150605 firmware: vcilcs: Avoid a potential deadlock when very threaded See: #449 firmware: vrf: Add spinlock around vrf acquire/release calls to avoid restoring an invalid p10 from ISR context firmware: rpi_display: only ratelimit if the backlight is actually changed See: raspberrypi/linux#1179 firmware: di_adv: Support multiple instances of qpu deinterlace at SD resolution See: popcornmix/omxplayer#386 linux: rpi-ft5406: Use interruptible sleep to avoid high load reported See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=125034 linux: dts: Added overlay for Adafruit PiTFT 2.8 capacitive touch screen See: raspberrypi/linux#1192 linux: config: Add MCP320X See: raspberrypi/linux#1189 linux: Build i2c_gpio module and add a device tree overlay to configure it See: raspberrypi/linux#1183
…m edges See: raspberrypi/firmware#463 firmware: di_adv: Add config setting to add nop delays to shader See: http://forum.kodi.tv/showthread.php?tid=231092&pid=2150605#pid2150605 firmware: vcilcs: Avoid a potential deadlock when very threaded See: raspberrypi/firmware#449 firmware: vrf: Add spinlock around vrf acquire/release calls to avoid restoring an invalid p10 from ISR context firmware: rpi_display: only ratelimit if the backlight is actually changed See: raspberrypi/linux#1179 firmware: di_adv: Support multiple instances of qpu deinterlace at SD resolution See: popcornmix/omxplayer#386 linux: rpi-ft5406: Use interruptible sleep to avoid high load reported See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=125034 linux: dts: Added overlay for Adafruit PiTFT 2.8 capacitive touch screen See: raspberrypi/linux#1192 linux: config: Add MCP320X See: raspberrypi/linux#1189 linux: Build i2c_gpio module and add a device tree overlay to configure it See: raspberrypi/linux#1183
- firmware: TC358762: Fix bad cast in backlight ratelimiting raspberrypi/linux#1179 - firmware: image_fx: Populate vdec_params when running in non-tunneled mode - firmware: di_adv: Add direct support for YUV420 - bootcode: Enable the RNG as early as possible - firmware: rng: Avoid initialising if already enabled - firmware: IL Video_encode: Minimise fragmentation by default See: #698 - firmware: IL ISP: Correct image to be nFrameHeight high - firmware: IL ISP: Handle dec_params from decoder - firmware: di_adv: Minimise the number of uniform writes - firmware: di_adv: Do qpu deinterlace in larger chunks - firmware: di_adv: Also request core_freq=400 for hd deinterlace - firmware: platform: Calculate volts for pi3 ring oscillator and store it away - firmware: arm_loader: If boost freq is higher than max freq then increase to boost voltage See: arm_loader: If boost freq is higher than max freq then increase to boost voltage - firmware: CEC code clean up - firmware: CEC code cleanup 2 - firmware: Don't invert the status bit for broadcast Revert: CEC code clean up See: #710 See: Hexxeh/rpi-firmware#133
Hi, I have been struggling with the same issues as described by others here. I'm on pi3 and latest official image. |
@popcornmix Can the firmware be updated, so that small changes in backlight (within few percent from actual value) are allowed at faster rate? 500ms seems to be awfully slow. My aim is to provide soft backlight adaptions (change from one value to another within approximately 5 seconds) in case of longer screen inactivity. It worked with older versions of firmware pretty good, but with the newest one, where 500ms limit is indeed working, it looks really disgusting :( |
Ah. I see an issue here - the ratelimit is always applied, whereas the original reason for applying it was to limit hard switching on v1.0 display boards that only support on or off switching. Other boards don't have this limitation so there's no reason not to allow arbitrary backlight change rates. |
TC358762_DSI.c: Only ratelimit backlight changes on v1.0 boards See: raspberrypi/linux#1179 (comment)
TC358762_DSI.c: Only ratelimit backlight changes on v1.0 boards See: raspberrypi/linux#1179 (comment)
commit 2b495acb7ed00d629bd865209858c9eccff8f77f Author: popcornmix <[email protected]> Date: Mon Feb 20 14:04:15 2017 +0000 bootromfs.c: Check for recovery.elf TC358762_DSI.c: Only ratelimit backlight changes on v1.0 boards See: raspberrypi/linux#1179 (comment)
…m edges See: raspberrypi#463 firmware: di_adv: Add config setting to add nop delays to shader See: http://forum.kodi.tv/showthread.php?tid=231092&pid=2150605#pid2150605 firmware: vcilcs: Avoid a potential deadlock when very threaded See: raspberrypi#449 firmware: vrf: Add spinlock around vrf acquire/release calls to avoid restoring an invalid p10 from ISR context firmware: rpi_display: only ratelimit if the backlight is actually changed See: raspberrypi/linux#1179 firmware: di_adv: Support multiple instances of qpu deinterlace at SD resolution See: popcornmix/omxplayer#386 linux: rpi-ft5406: Use interruptible sleep to avoid high load reported See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=125034 linux: dts: Added overlay for Adafruit PiTFT 2.8 capacitive touch screen See: raspberrypi/linux#1192 linux: config: Add MCP320X See: raspberrypi/linux#1189 linux: Build i2c_gpio module and add a device tree overlay to configure it See: raspberrypi/linux#1183
raspberrypi/linux#1179 firmware: image_fx: Populate vdec_params when running in non-tunneled mode firmware: di_adv: Add direct support for YUV420
TC358762_DSI.c: Only ratelimit backlight changes on v1.0 boards See: raspberrypi/linux#1179 (comment)
@popcornmix Thank You. The last commits have fixed the issue, I can do slow and smooth backlight changes again :) |
@popcornmix Do You know when this fix will be available in stable apt-get update? |
@roblan apt-get firmware is dated March 3rd, so will include the latest backlight fix. |
I have been having the touch screen wake up problem since we upgraded to Jessie - Dec 7 2016. I did an update and dist-upgrade on March 9 2017 and it has had no effect on the wake up problem. Any idea when the proper fix will be available or a simple mod to the OS ? |
I should add that the sometimes the screen will not wake up on touch or keyboard, but then a few minutes later it seems to work fine. |
@GreenEyes2796 what does |
Nov 25 2016 16:03:50 Do you need the hex string version number? Thanks |
Your firmware is too old. The dist-upgrade version should be newer than that (with a March date). |
Hmm. Just ran update and upgrade again and the version did not change. Known working internet connection. Any idea why I'm stuck in Nov. 2016? |
I assume you rebooted after updating?
|
Yes. Did reboot after update and dist-upgrade. |
It failed. I think all the dist-upgrades are failing, Maybe I should just download a current distribution? |
Yes, I think installing the latest raspbian jessie image is probably advisable. Something is wrong on your image. It may be possible to fix it, but that will probably be harder than reinstalling, and you'll never know if you have fixed everything. |
Thanks!
…On 3/13/2017 5:41 PM, popcornmix wrote:
Yes, I think installing the latest raspbian jessie image is probably
advisable.
Something is wrong on your image. It may be possible to fix it, but
that will probably be harder than reinstalling, and you'll never know
if you have fixed everything.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1179 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZKeWTFxG3omlFjmGX2CMeuDHCmn-2qDks5rlbgmgaJpZM4GZAVz>.
--
Vince Kelly
Director - Green Eyes LLC
+1 443 746 2175
[email protected]
gescience.com
|
Installed the March 3, 2017 raspian OS and the touch screen has woken up
successfully five times in a row. I think it's fixed. Thanks!
…On 3/13/2017 5:41 PM, popcornmix wrote:
Yes, I think installing the latest raspbian jessie image is probably
advisable.
Something is wrong on your image. It may be possible to fix it, but
that will probably be harder than reinstalling, and you'll never know
if you have fixed everything.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1179 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZKeWTFxG3omlFjmGX2CMeuDHCmn-2qDks5rlbgmgaJpZM4GZAVz>.
--
Vince Kelly
Director - Green Eyes LLC
+1 443 746 2175
[email protected]
gescience.com
|
To dereference bond->curr_active_slave, it uses rcu_dereference(). But it and the caller doesn't acquire RCU so a warning occurs. So add rcu_read_lock(). Splat looks like: WARNING: suspicious RCU usage 5.13.0-rc6+ #1179 Not tainted drivers/net/bonding/bond_main.c:571 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by ping/974: #0: ffff888109e7db70 (sk_lock-AF_INET){+.+.}-{0:0}, at: raw_sendmsg+0x1303/0x2cb0 stack backtrace: CPU: 2 PID: 974 Comm: ping Not tainted 5.13.0-rc6+ #1179 Call Trace: dump_stack+0xa4/0xe5 bond_ipsec_offload_ok+0x1f4/0x260 [bonding] xfrm_output+0x179/0x890 xfrm4_output+0xfa/0x410 ? __xfrm4_output+0x4b0/0x4b0 ? __ip_make_skb+0xecc/0x2030 ? xfrm4_udp_encap_rcv+0x800/0x800 ? ip_local_out+0x21/0x3a0 ip_send_skb+0x37/0xa0 raw_sendmsg+0x1bfd/0x2cb0 Fixes: 18cb261 ("bonding: support hardware encryption offload to slaves") Signed-off-by: Taehee Yoo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
[ Upstream commit 955b785 ] To dereference bond->curr_active_slave, it uses rcu_dereference(). But it and the caller doesn't acquire RCU so a warning occurs. So add rcu_read_lock(). Splat looks like: WARNING: suspicious RCU usage 5.13.0-rc6+ raspberrypi#1179 Not tainted drivers/net/bonding/bond_main.c:571 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by ping/974: #0: ffff888109e7db70 (sk_lock-AF_INET){+.+.}-{0:0}, at: raw_sendmsg+0x1303/0x2cb0 stack backtrace: CPU: 2 PID: 974 Comm: ping Not tainted 5.13.0-rc6+ raspberrypi#1179 Call Trace: dump_stack+0xa4/0xe5 bond_ipsec_offload_ok+0x1f4/0x260 [bonding] xfrm_output+0x179/0x890 xfrm4_output+0xfa/0x410 ? __xfrm4_output+0x4b0/0x4b0 ? __ip_make_skb+0xecc/0x2030 ? xfrm4_udp_encap_rcv+0x800/0x800 ? ip_local_out+0x21/0x3a0 ip_send_skb+0x37/0xa0 raw_sendmsg+0x1bfd/0x2cb0 Fixes: 18cb261 ("bonding: support hardware encryption offload to slaves") Signed-off-by: Taehee Yoo <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 955b785 ] To dereference bond->curr_active_slave, it uses rcu_dereference(). But it and the caller doesn't acquire RCU so a warning occurs. So add rcu_read_lock(). Splat looks like: WARNING: suspicious RCU usage 5.13.0-rc6+ #1179 Not tainted drivers/net/bonding/bond_main.c:571 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by ping/974: #0: ffff888109e7db70 (sk_lock-AF_INET){+.+.}-{0:0}, at: raw_sendmsg+0x1303/0x2cb0 stack backtrace: CPU: 2 PID: 974 Comm: ping Not tainted 5.13.0-rc6+ #1179 Call Trace: dump_stack+0xa4/0xe5 bond_ipsec_offload_ok+0x1f4/0x260 [bonding] xfrm_output+0x179/0x890 xfrm4_output+0xfa/0x410 ? __xfrm4_output+0x4b0/0x4b0 ? __ip_make_skb+0xecc/0x2030 ? xfrm4_udp_encap_rcv+0x800/0x800 ? ip_local_out+0x21/0x3a0 ip_send_skb+0x37/0xa0 raw_sendmsg+0x1bfd/0x2cb0 Fixes: 18cb261 ("bonding: support hardware encryption offload to slaves") Signed-off-by: Taehee Yoo <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ 165.533763] rpi-backlight rpi_backlight: Backlight change failed
[ 167.085803] rpi-backlight rpi_backlight: Backlight change failed
[ 168.281433] rpi-backlight rpi_backlight: Backlight change failed
[ 169.628353] rpi-backlight rpi_backlight: Backlight change failed
[ 169.742678] rpi-backlight rpi_backlight: Backlight change failed
Linux screenpi 4.1.12-v7+ #824 SMP PREEMPT Wed Oct 28 16:46:35 GMT 2015 armv7l GNU/Linux
I have an application controling the backlight via the
/sys/class/backlight/rpi_backlight/bl_power
Powering off writing 4 into the file seems reliable however power on fails.
I can sometime prod it into life via echoing more stuff into the file manually but its not reliable.
Code works on gpio_backlight for fbtft displays (adafruit28rt).
The text was updated successfully, but these errors were encountered: