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

DietPi-Config | RPi: Enhance and replace some obsolete dietpi.txt settings #2402

Merged
merged 12 commits into from
Jan 10, 2019

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Jan 9, 2019

Status: Testing

Reference: https://github.com/Fourdee/DietPi/issues/2401

Commit list/description:

  • DietPi-Config | RPi: Disable display output via undocumented config.txt setting instead of tvservice -o
  • DietPi-Config | RPi: Estimate current console resolution via vcgencmd instead of config.txt entry
  • DietPi-Config | RPi: Allow some config.txt settings to be missing, by using default values in case
  • DietPi-Config | RPi: Replace deprecated config.txt setting "display_rotate" by new "display_hdmi_rotate"
  • DietPi-Config | RPi: Minor coding
  • RPi | config.txt: Replace deprecated setting "display_rotate" by new "display_hdmi_rotate"
  • RPi | config.txt: Remove obsolete settings: "disable_pvt", "avoid_pwm_pll"
  • DietPi-Patch | Remove/Replace obsolete RPi config.txt settings
  • DietPi-Set_Hardware | RPi: Remove edits of obsolete config.txt setting: "avoid_pwm_pll"
  • DietPi-PreBoot | Remove "tvservice -o", which is not achieved via new config.txt entry#
  • DietPi-Patch | RPi: If headless display mode was selected, apply new dietpi.txt entry
  • CHANGELOG | DietPi-Config | RPi: Enhance and replace some obsolete dietpi.txt settings
  • dietpi.txt | RPi: Update CONFIG_HDMI_OUTPUT explanation

+ DietPi-Config | RPi: Disable display output via undocumented config.txt setting instead of tvservice -o
+ DietPi-Config | RPi: Estimate current console resolution via vcgencmd instead of config.txt entry
+ DietPi-Config | RPi: Allow some config.txt settings to be missing, by using default values in case
+ DietPi-Config | RPi: Replace deprecated config.txt setting "display_rotate" by new "display_hdmi_rotate"
+ DietPi-Config | RPi: Minor coding
@MichaIng MichaIng added this to the v6.20 milestone Jan 9, 2019
@MichaIng MichaIng self-assigned this Jan 9, 2019
+ RPi | config.txt: Replace deprecated setting "display_rotate" by new "display_hdmi_rotate"
+ RPi | config.txt: Remove obsolete settings: "disable_pvt", "avoid_pwm_pll"
+ DietPi-Patch | Remove/Replace obsolete RPi config.txt settings
+ DietPi-Config | Update forgotten "display_rotate" occurrence
+ DietPi-Set_Hardware | RPi: Remove edits of obsolete config.txt setting: "avoid_pwm_pll"
+ DietPi-PreBoot | Remove "tvservice -o", which is not achieved via new config.txt entry
+ DietPi-Patch | RPi: If headless display mode was selected, apply new dietpi.txt entry
+ CHANGELOG | DietPi-Config | RPi: Enhance and replace some obsolete dietpi.txt settings
@MichaIng MichaIng requested a review from Fourdee January 9, 2019 01:58
dietpi/patch_file Outdated Show resolved Hide resolved
dietpi/dietpi-config Outdated Show resolved Hide resolved
Copy link
Collaborator

@Fourdee Fourdee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MichaIng

Looks good, nice update 👍
Only issue with a few config.txt dietpi.txt need swapping?

@MichaIng
Copy link
Owner Author

MichaIng commented Jan 9, 2019

@Fourdee
Jep, damn, while typing, I mixed them up every second time 😆.

+ DietPi-Config | Fix config.txt vs dietpi.txt muddle
+ DietPi-Patch | Fix config.txt vs dietpi.txt muddle
+ DietPi-Config | CONFIG_HDMI_OUTPUT: Add an informational comment to each adjusted setting
@MichaIng
Copy link
Owner Author

MichaIng commented Jan 9, 2019

@Fourdee
Actually CONFIG_HDMI_OUTPUT is not really correct here. We do not only disable HDMI, but composite video output as well. This was the same with tvservice -o.

I think, cases where you want to disable HDMI, but have composite enabled, are very low. If no HDMI cable is attached, I think disabling it's hotplug functionality has (nearly) no impact on power/RAM.
And we already have the option to force HDMI plug state, which is a more common case, if hotplugged monitor is not recognized.

So I think it is okay and clearer, if we rename the setting to CONFIG_VIDEO_OUTPUT or CONFIG_VIDEO_DISABLE (which implies that not only output is suppressed, but the whole functionality disabled) or CONFIG_HEADLESS_MODE to better match DietPi-Config menu?


Not sure if we should add a first run setup for this, since the dietpi.txt entry itself does not have any effect itself. But then applying it should be moved into dietpi-set_hardware to avoid doubled code.

Consequently we could make it an AUTO_SETUP setting and estimate video by checking existence of /dev/fb[0-9]? Currently not sure if this exists even if no monitor is attached?


Just for reference what the config.txt entries result in kernel cmd line:
kernel: Kernel command line: bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbdepth=8 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000...
The error, some of them already show up with only gpu_mem=16 (<32: raspberrypi/firmware#428):

[    0.219431] BCM2708FB: allocated DMA memory fdd00000
[    0.219503] BCM2708FB: allocated DMA channel 0 @ be813000
[    0.219697] bcm2708_fb soc:fb: Failed to allocate GPU framebuffer (-22)
[    0.219750] bcm2708_fb soc:fb: probe failed, err -22
[    0.219802] bcm2708_fb: probe of soc:fb failed with error -22
...
[    0.688467] vchiq: vchiq_init_state: slot_zero = bdd80000, is_master = 0
[    0.690078] [vc_sm_connected_init]: start
[    0.693547] vc_vchi_sm_init: failed to open VCHI service (-1)
[    0.693559] [vc_sm_connected_init]: failed to initialize shared memory service
[    0.693622] [vc_sm_connected_init]: end - returning -1

What is annoying once for every CPU core:

[    0.797461] bcm2835-clk 3f101000.cprman: pllh: couldn't lock PLL
[    0.797502] ------------[ cut here ]------------
[    0.797546] WARNING: CPU: 2 PID: 31 at drivers/clk/clk.c:653 clk_core_enable+0xb4/0x224
[    0.797577] Modules linked in:
[    0.797611] CPU: 2 PID: 31 Comm: kworker/2:1 Not tainted 4.14.79-v7+ #1159
[    0.797637] Hardware name: BCM2835
[    0.797670] Workqueue: events deferred_probe_work_func
[    0.797726] [<8010ff30>] (unwind_backtrace) from [<8010c174>] (show_stack+0x20/0x24)
[    0.797773] [<8010c174>] (show_stack) from [<80788fa4>] (dump_stack+0xd4/0x118)
[    0.797819] [<80788fa4>] (dump_stack) from [<8011dd50>] (__warn+0xf8/0x110)
[    0.797857] [<8011dd50>] (__warn) from [<8011de38>] (warn_slowpath_null+0x30/0x38)
[    0.797901] [<8011de38>] (warn_slowpath_null) from [<804f0b44>] (clk_core_enable+0xb4/0x224)
[    0.797951] [<804f0b44>] (clk_core_enable) from [<804f324c>] (clk_register+0x52c/0x650)
[    0.797999] [<804f324c>] (clk_register) from [<804f33e0>] (devm_clk_hw_register+0x4c/0x90)
[    0.798046] [<804f33e0>] (devm_clk_hw_register) from [<804f80d0>] (bcm2835_register_pll+0xac/0xd4)
[    0.798093] [<804f80d0>] (bcm2835_register_pll) from [<804f8810>] (bcm2835_clk_probe+0x178/0x218)
[    0.798141] [<804f8810>] (bcm2835_clk_probe) from [<80546bb0>] (platform_drv_probe+0x5c/0xc0)
[    0.798188] [<80546bb0>] (platform_drv_probe) from [<80545190>] (driver_probe_device+0x244/0x300)
[    0.798234] [<80545190>] (driver_probe_device) from [<805453f8>] (__device_attach_driver+0xa4/0xbc)
[    0.798279] [<805453f8>] (__device_attach_driver) from [<80543280>] (bus_for_each_drv+0x74/0xa8)
[    0.798324] [<80543280>] (bus_for_each_drv) from [<80544e04>] (__device_attach+0xc0/0x120)
[    0.798368] [<80544e04>] (__device_attach) from [<8054542c>] (device_initial_probe+0x1c/0x20)
[    0.798412] [<8054542c>] (device_initial_probe) from [<805442f4>] (bus_probe_device+0x94/0x9c)
[    0.798457] [<805442f4>] (bus_probe_device) from [<8054479c>] (deferred_probe_work_func+0x5c/0x154)
[    0.798503] [<8054479c>] (deferred_probe_work_func) from [<801379b4>] (process_one_work+0x158/0x454)
[    0.798548] [<801379b4>] (process_one_work) from [<80137d14>] (worker_thread+0x64/0x5b8)
[    0.798592] [<80137d14>] (worker_thread) from [<8013dd98>] (kthread+0x13c/0x16c)
[    0.798639] [<8013dd98>] (kthread) from [<801080ac>] (ret_from_fork+0x14/0x28)
[    0.798673] ---[ end trace 049453980c0b9921 ]---
  • Not yet 100% sure, if it's related, but I guess so.

+ dietpi.txt | RPi: Update CONFIG_HDMI_OUTPUT explanation
@Fourdee Fourdee merged commit 2f204d3 into dev Jan 10, 2019
@Fourdee
Copy link
Collaborator

Fourdee commented Jan 10, 2019

@MichaIng

Many thanks, will merge 👍

@MichaIng MichaIng deleted the rpi_config branch January 10, 2019 12:57
@MichaIng
Copy link
Owner Author

MichaIng commented Jan 10, 2019

@Fourdee
Just recognized this settings (for disabling display) need to be reset when re-selecting the resolution.

I think it's better to have it as separate option, which then leads to other display settings being hidden.

Will open another PR later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants