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

Printer darkness reset from 0% to default #337

Closed
proski opened this issue Feb 9, 2024 · 1 comment
Closed

Printer darkness reset from 0% to default #337

proski opened this issue Feb 9, 2024 · 1 comment
Assignees
Labels
bug Something isn't working priority-low
Milestone

Comments

@proski
Copy link
Contributor

proski commented Feb 9, 2024

Describe the bug
If the printed darkness is set to 0% in the lprint web interface, it's reset to the default value (53%) after the lprint server restarts. Observed with TSPL 203dpi driver.

To Reproduce
Steps to reproduce the behavior:

  1. Go to lprint web interface
  2. Set printer darkness to 0% and save settings
  3. Restart lprint: sudo systemctl restart lprint
  4. Refresh lprint web interface
  5. The printer darkness is shown as 53% in the web interface.

Expected behavior
The printer darkness is shown as 0% in the web interface.

System Information:

  • OS: Fedora Workstation 39 x86_64
  • Browser: Firefox
  • Version: master branch of lprint, 1.4.x branch of pappl

Additional context
When any non-zero darkness is configured, it's saved in /etc/lprint.conf on a line starting with printer-darkness-configured. When the darkness is set to 0%, that line is absent. It appears that zero darkness is treated as unset darkness.

The issue is very likely in pappl/system-loadsave.c on line 531. However, most other settings are not saved when they are 0.

michaelrsweet added a commit that referenced this issue Feb 9, 2024
michaelrsweet added a commit that referenced this issue Feb 9, 2024
@michaelrsweet
Copy link
Owner

Yes, this also affects print-speed-default, so I've updated both to output if the corresponding attributes are supported:

[master 528bd54] Save print-speed-default and printer-darkness-configured values if the attributes are supported (Issue #337)

[v1.4.x 977491a] Save print-speed-default and printer-darkness-configured values if the attributes are supported (Issue #337)

@michaelrsweet michaelrsweet self-assigned this Feb 9, 2024
@michaelrsweet michaelrsweet added bug Something isn't working priority-low labels Feb 9, 2024
@michaelrsweet michaelrsweet added this to the Stable milestone Feb 9, 2024
michaelrsweet added a commit that referenced this issue Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low
Projects
None yet
Development

No branches or pull requests

2 participants