How to close lid without turning off monitor in BookwormPup64 10.0.6 (x86_64)?

Moderator: Forum moderators

Post Reply
User avatar
Governor
Posts: 789
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 194 times
Been thanked: 40 times

How to close lid without turning off monitor in BookwormPup64 10.0.6 (x86_64)?

Post by Governor »

I recently installed this Puppy on a USB stick.

I really appreciate this feature that is included with fossapup64_9.5, but appears to be missing from Bookworm.

I use a laptop which is placed at the center of my desk, it is just behind the keyboard, and just in front of my desk monitor.
In fossapup, I can close the laptop lid and use my monitor. When I try this in bookworm, my monitor shuts off. If I have to keep the lid open in order to use my monitor, it defeats the purpose of having a monitor since it is blocked by the laptop lid.

This very important feature is extremely practical and ergonomic. My laptop, keyboard, and peripherals and all close together and optimally placed.
Please consider bringing this important feature to Bookworm.

Thanks!

Don't take life too seriously, you will never get out alive.

TerryH
Posts: 618
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 153 times
Been thanked: 151 times

Re: Feature request for BookwormPup64 10.0.6 (x86_64)

Post by TerryH »

Governor wrote: Sun Jun 09, 2024 2:28 pm

I recently installed this Puppy on a USB stick.

I really appreciate this feature that is included with fossapup64_9.5, but appears to be missing from Bookworm.

I use a laptop which is placed at the center of my desk, it is just behind the keyboard, and just in front of my desk monitor.
In fossapup, I can close the laptop lid and use my monitor. When I try this in bookworm, my monitor shuts off. If I have to keep the lid open in order to use my monitor, it defeats the purpose of having a monitor since it is blocked by the laptop lid.

This very important feature is extremely practical and ergonomic. My laptop, keyboard, and peripherals and all close together and optimally placed.
Please consider bringing this important feature to Bookworm.

Thanks!

BookwormPup64 can do this already. Try Menu > Desktop > Display Settings. You can also access the 'Display Settings' from the Display Control (Menu > Desktop > Display Control, then the icon at the bottom with the rainbow coloured screen.
This will show the connected displays, something like eDP (Which will be the laptop) and HDMI (Your external display). If you uncheck the eDP entry, it will only display the external monitor. You can continue with the laptop lid closed.

Edit: I rarely use an external monitor. There is one thing that I don't know how to change to my liking, being the display of the desktop background, it's spread across both monitors. In the background settings, altering the image settings still covers both displays with the one image. I am not aware if this can be changed as depending on the background, you may only see half of the background picture, which may also appear pixelated.

New Laptop - ASUS ZenBook Ryzen 7 5800H Vega 7 iGPU / 16 GB RAM

User avatar
Governor
Posts: 789
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 194 times
Been thanked: 40 times

Re: Feature request for BookwormPup64 10.0.6 (x86_64)

Post by Governor »

TerryH wrote: Sun Jun 09, 2024 7:29 pm
Governor wrote: Sun Jun 09, 2024 2:28 pm

I recently installed this Puppy on a USB stick.

I really appreciate this feature that is included with fossapup64_9.5, but appears to be missing from Bookworm.

I use a laptop which is placed at the center of my desk, it is just behind the keyboard, and just in front of my desk monitor.
In fossapup, I can close the laptop lid and use my monitor. When I try this in bookworm, my monitor shuts off. If I have to keep the lid open in order to use my monitor, it defeats the purpose of having a monitor since it is blocked by the laptop lid.

This very important feature is extremely practical and ergonomic. My laptop, keyboard, and peripherals and all close together and optimally placed.
Please consider bringing this important feature to Bookworm.

Thanks!

BookwormPup64 can do this already. Try Menu > Desktop > Display Settings. You can also access the 'Display Settings' from the Display Control (Menu > Desktop > Display Control, then the icon at the bottom with the rainbow coloured screen.
This will show the connected displays, something like eDP (Which will be the laptop) and HDMI (Your external display). If you uncheck the eDP entry, it will only display the external monitor. You can continue with the laptop lid closed.

Thank you for answering. I am on fossapup now, and I will do this on my next boot with Bookworm.

With fossapup, the laptop screen turns off when I close the lid, and turns on again when I open it. This is also important if I need to use the laptop screen. Is it possible to replicate this behavior in Bookworm?

I had previously (in fossapup) turned the eDP off, and I had a problem when I took the (still running) laptop to a location where there was no external monitor. Since the laptop screen was turned off, I could see nothing but a blank screen and I had to reboot (power button). It would be the same if my monitor stops working if the eDP is off. I am hoping to avoid this issue with Bookworm. Thanks.

Edit: I rarely use an external monitor. There is one thing that I don't know how to change to my liking, being the display of the desktop background, it's spread across both monitors. In the background settings, altering the image settings still covers both displays with the one image. I am not aware if this can be changed as depending on the background, you may only see half of the background picture, which may also appear pixelated.

Last edited by Governor on Mon Jun 10, 2024 9:13 am, edited 1 time in total.

Don't take life too seriously, you will never get out alive.

dimkr
Posts: 2346
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 50 times
Been thanked: 1145 times

Re: Feature request for BookwormPup64 10.0.6 (x86_64)

Post by dimkr »

https://github.com/puppylinux-woof-CE/woof-CE/pull/4278 is far from perfect but it should address the common use case where a laptop user connects it to an external monitor, closes the lid to disable the internal monitor (without the laptop suspending) and expects the internal monitor to be enabled when the lid is opened. Maybe you'll have ideas how to improve this proposed behavior.

User avatar
Governor
Posts: 789
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 194 times
Been thanked: 40 times

Re: Feature request for BookwormPup64 10.0.6 (x86_64)

Post by Governor »

dimkr wrote: Mon Jun 10, 2024 6:30 am

https://github.com/puppylinux-woof-CE/woof-CE/pull/4278 is far from perfect but it should address the common use case where a laptop user connects it to an external monitor, closes the lid to disable the internal monitor (without the laptop suspending) and expects the internal monitor to be enabled when the lid is opened. Maybe you'll have ideas how to improve this proposed behavior.

Thank you for answering. My idea is a simple one. Since it already works that way in fossapup, why not in Bookworm too.
I am not a programmer, and I am unable to comment on the code itself. The proposed behavior sounds great to me.
Thanks!

Don't take life too seriously, you will never get out alive.

radky
Posts: 354
Joined: Fri May 28, 2021 2:14 am
Has thanked: 41 times
Been thanked: 316 times

Re: Feature request for BookwormPup64 10.0.6 (x86_64)

Post by radky »

@Governor

As time permits, maybe you could test @dimkr 's Woof-CE PR #4278 which adjusts suspend.sh for the following scenario:

If using an external monitor, turn off the internal display on lid close

dimkr wrote:
https://github.com/puppylinux-woof-CE/woof-CE/pull/4278 is merely a 80/20 solution for the use case of people who use a laptop with external monitor(s) and want to close the lid. It will mess up the display settings of people who somehow configure their monitors, once they reopen the lid, which is practically nobody (again, because Puppy doesn't have a display settings panel...).

Attachments
suspend.sh_PR_4278.zip
(1.79 KiB) Downloaded 12 times
User avatar
Governor
Posts: 789
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 194 times
Been thanked: 40 times

Re: Feature request for BookwormPup64 10.0.6 (x86_64)

Post by Governor »

radky wrote: Tue Jun 11, 2024 10:02 pm

@Governor

As time permits, maybe you could test @dimkr 's Woof-CE PR #4278 which adjusts suspend.sh for the following scenario:

If using an external monitor, turn off the internal display on lid close

dimkr wrote:
https://github.com/puppylinux-woof-CE/woof-CE/pull/4278 is merely a 80/20 solution for the use case of people who use a laptop with external monitor(s) and want to close the lid. It will mess up the display settings of people who somehow configure their monitors, once they reopen the lid, which is practically nobody (again, because Puppy doesn't have a display settings panel...).

I downloaded "suspend.sh_PR_4278.zip". I am currently running fossapup, but I will test this as soon as I can boot Bookworm.
Thanks.

Don't take life too seriously, you will never get out alive.

User avatar
Governor
Posts: 789
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 194 times
Been thanked: 40 times

Re: Feature request for BookwormPup64 10.0.6 (x86_64)

Post by Governor »

radky wrote: Tue Jun 11, 2024 10:02 pm

@Governor

As time permits, maybe you could test @dimkr 's Woof-CE PR #4278 which adjusts suspend.sh for the following scenario:

If using an external monitor, turn off the internal display on lid close

dimkr wrote:
https://github.com/puppylinux-woof-CE/woof-CE/pull/4278 is merely a 80/20 solution for the use case of people who use a laptop with external monitor(s) and want to close the lid. It will mess up the display settings of people who somehow configure their monitors, once they reopen the lid, which is practically nobody (again, because Puppy doesn't have a display settings panel...).

After unzipping the file, I copied this file:
suspend.sh_PR_4278/etc/acpi/actions/suspend.sh

to:
/etc/acpi/actions/suspend.sh on my live Bookworm installation.

Great! Closing the laptop lid no longer turns off the monitor. However, the laptop screen does not turn off as expected when the lid is closed.
On the hdmi setting in Display Settings, there is no possibity to choose anything in the "Position" field. I don't want to turn the laptop screen completely off because I sometimes need it. Thanks.

Unable to set monitor to default.png
Unable to set monitor to default.png (124.52 KiB) Viewed 500 times

Addendum: The laptop screen did turn off after some hours, so perhaps there is a setting for that?

Don't take life too seriously, you will never get out alive.

radky
Posts: 354
Joined: Fri May 28, 2021 2:14 am
Has thanked: 41 times
Been thanked: 316 times

Re: How to close laptop lid without turning off external monitor in BookwormPup64?

Post by radky »

Governor wrote: Fri Jun 14, 2024 8:53 am

Great! Closing the laptop lid no longer turns off the (external) monitor. However, the laptop screen does not turn off as expected when the lid is closed...

Addendum: The laptop screen did turn off after some hours, so perhaps there is a setting for that?

@Governor

Re: Testing suspend.sh (PR_4278) in the X11 (non-wayland) desktop environment of BW64

If the laptop lid is closed (and the external monitor is connected and enabled) then suspend.sh (PR_4278) will call xrandr to turn off the internal (laptop) screen. At this point (by design) the script immediately terminates (effectively bypassing any subsequent calls to suspend the laptop or lock the screen).

In this scenario, xrandr should darken (turn off) the laptop screen by software modulation. However, this utility has no effect on power input to the underlying hardware backlight. Is it possible you are observing persistent screen illumination from the backlight or perhaps light leakage from the backlight along the edges of the dark laptop screen when the lid is first closed ?

Unfortunately, modern kernels may not fully support the physical hardware of older laptops (and software modulation of screen brightness may not work as expected).

Maybe @dimkr will also reply.

dimkr
Posts: 2346
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 50 times
Been thanked: 1145 times

Re: How to close lid without turning off monitor in BookwormPup64 10.0.6 (x86_64)?

Post by dimkr »

suspend.sh alone is not enough, you also need /etc/acpi.map.

And yes, backlight should turn off once xrandr disables the internal monitor. You'll still see the internal monitor in lxrandr because it's connected - if you're not sure whether or not it's disabled, 1) check if backlight is on by looking at the edges 2) try to move a window to another monitor 3) open a terminal and check the output of xrandr.

User avatar
Governor
Posts: 789
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 194 times
Been thanked: 40 times

Re: How to close lid without turning off monitor in BookwormPup64 10.0.6 (x86_64)?

Post by Governor »

dimkr wrote: Sun Jun 16, 2024 4:10 am

suspend.sh alone is not enough, you also need /etc/acpi.map.

And yes, backlight should turn off once xrandr disables the internal monitor. You'll still see the internal monitor in lxrandr because it's connected - if you're not sure whether or not it's disabled, 1) check if backlight is on by looking at the edges 2) try to move a window to another monitor 3) open a terminal and check the output of xrandr.

Display Settings:
Laptop lid is closed, laptop screen is off. I turn eDP on and click Apply.
I open the lid and the laptop screen resumes.
I close the lid and the laptop screen turns off.
I open the lid and the laptop screen remains off.
I restart the display Settings and I see that eDP is now set to off.
Some part of the software involved has turned the laptop screen completely off.

I created the file: "/etc/acpi.map" with the content below. Is that correct, and will I have to reboot for it to take effect?

Code: Select all

"EV_KEY"	0x01	"KEY_POWER"	116	1	"button/power PWRF 00000080"
"EV_KEY"	0x01	"KEY_POWER"	116	1	"button/power PWRB 00000080"
"EV_SW"		0x05	"SW_LID"	0	1	"button/lid LID0 00000080"

Don't take life too seriously, you will never get out alive.

dimkr
Posts: 2346
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 50 times
Been thanked: 1145 times

Re: How to close lid without turning off monitor in BookwormPup64 10.0.6 (x86_64)?

Post by dimkr »

@Governor You need to restart X or reboot, otherwise lid open action won't run

dimkr
Posts: 2346
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 50 times
Been thanked: 1145 times

Re: How to close lid without turning off monitor in BookwormPup64 10.0.6 (x86_64)?

Post by dimkr »

User avatar
Governor
Posts: 789
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 194 times
Been thanked: 40 times

Re: How to close lid without turning off monitor in BookwormPup64 10.0.6 (x86_64)?

Post by Governor »

dimkr wrote: Sun Jun 16, 2024 11:12 am

@Governor You missed one line

https://github.com/puppylinux-woof-CE/w ... c/acpi.map

Ok, got all 4 lines now. Works great! The content displayed is the same on both the monitor and the laptop screen. I like it better than the alternative, where sometimes an item is displayed only on one screen and I had to drag the item to the other screen (took me a while to find that out).
Thank you very much!

Don't take life too seriously, you will never get out alive.

Post Reply

Return to “BookwormPup”