Merge pull request #2691 from fewtarius/dev
Fix AYANEO 2S display remaining on when put to sleep.
This commit is contained in:
commit
5e680f2a0a
10 changed files with 69 additions and 44 deletions
Binary file not shown.
Before Width: | Height: | Size: 619 B |
7
packages/hardware/quirks/devices/AYANEO AYANEO 2S/sleep.d/post/001-dpms
Executable file
7
packages/hardware/quirks/devices/AYANEO AYANEO 2S/sleep.d/post/001-dpms
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
dpms-client -m on
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
# There is a display bug with the Ayaneo 2S preventing the display from
|
||||
# blanking and powering the backlight off. To work around this, we will
|
||||
# set the brightness to the lowest value, and display an black image before
|
||||
# entering sleep.
|
||||
|
||||
# Yes, it's gross.
|
||||
|
||||
. /etc/profile
|
||||
|
||||
BRIGHTNESS=$(cat /tmp/.brightness)
|
||||
echo ${BRIGHTNESS} >"/sys/devices/pci0000:00/0000:00:08.1/0000:c4:00.0/drm/card0/card0-eDP-1/amdgpu_bl0/brightness"
|
||||
killall weston-image
|
7
packages/hardware/quirks/devices/AYANEO AYANEO 2S/sleep.d/pre/001-dpms
Executable file
7
packages/hardware/quirks/devices/AYANEO AYANEO 2S/sleep.d/pre/001-dpms
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
dpms-client -m off
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
# There is a display bug with the Ayaneo 2S preventing the display from
|
||||
# blanking and powering the backlight off. To work around this, we will
|
||||
# set the brightness to the lowest value, and display an black image before
|
||||
# entering sleep.
|
||||
|
||||
# Yes, it's gross.
|
||||
|
||||
. /etc/profile
|
||||
|
||||
brightness >/tmp/.brightness
|
||||
echo 0 >"/sys/devices/pci0000:00/0000:00:08.1/0000:c4:00.0/drm/card0/card0-eDP-1/amdgpu_bl0/brightness"
|
||||
weston-image /usr/lib/autostart/quirks/devices/"${QUIRK_DEVICE}"/images/black.png &
|
||||
sleep 1
|
|
@ -74,17 +74,7 @@ pre_configure() {
|
|||
|
||||
post_makeinstall_target() {
|
||||
make -C lib/et LIBMODE=644 DESTDIR=${SYSROOT_PREFIX} install
|
||||
|
||||
rm -rf ${INSTALL}/usr/sbin/badblocks
|
||||
rm -rf ${INSTALL}/usr/sbin/blkid
|
||||
rm -rf ${INSTALL}/usr/sbin/dumpe2fs
|
||||
rm -rf ${INSTALL}/usr/sbin/e2freefrag
|
||||
rm -rf ${INSTALL}/usr/sbin/e2undo
|
||||
rm -rf ${INSTALL}/usr/sbin/e4defrag
|
||||
rm -rf ${INSTALL}/usr/sbin/filefrag
|
||||
rm -rf ${INSTALL}/usr/sbin/fsck
|
||||
rm -rf ${INSTALL}/usr/sbin/logsave
|
||||
rm -rf ${INSTALL}/usr/sbin/mklost+found
|
||||
}
|
||||
|
||||
makeinstall_init() {
|
||||
|
|
|
@ -42,7 +42,10 @@ else
|
|||
PKG_DEPENDS_TARGET+=" ${PKG_TOOLS} ${PKG_FONTS} ${PKG_SOUND} ${PKG_SYNC} ${PKG_GRAPHICS} ${PKG_UI} ${PKG_UI_TOOLS} ${PKG_MULTIMEDIA} misc-packages"
|
||||
|
||||
# GL demos and tools
|
||||
[ "${OPENGL_SUPPORT}" = "yes" ]&& PKG_DEPENDS_TARGET+=" mesa-demos glmark2"
|
||||
[ "${OPENGL_SUPPORT}" = "yes" ] && PKG_DEPENDS_TARGET+=" mesa-demos glmark2"
|
||||
|
||||
# Weston kiosk shell dpms support.
|
||||
[ "${DISPLAYSERVER}" = "wl" ] && PKG_DEPENDS_TARGET+=" weston-kiosk-shell-dpms"
|
||||
|
||||
# Sound support
|
||||
[ "${PIPEWIRE_SUPPORT}" = "yes" ] && PKG_DEPENDS_TARGET+=" alsa pulseaudio pipewire wireplumber"
|
||||
|
|
16
packages/wayland/weston-kiosk-shell-dpms/package.mk
Normal file
16
packages/wayland/weston-kiosk-shell-dpms/package.mk
Normal file
|
@ -0,0 +1,16 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
PKG_NAME="weston-kiosk-shell-dpms"
|
||||
PKG_VERSION="dccd7db3905464bb0c00b65ee554b0fd2e3ba7b6"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/akhilharihar/Weston-kiosk-shell-DPMS"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
PKG_DEPENDS_TARGET="toolchain weston"
|
||||
PKG_LONGDESC="A dpms module for Weston's kiosk shell."
|
||||
|
||||
post_makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
cp ${PKG_BUILD}/.${TARGET_NAME}/dpms-client ${INSTALL}/usr/bin
|
||||
chmod 0755 ${INSTALL}/usr/bin/dpms-client
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index f1fb908..6ea815e 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -6,11 +6,11 @@ if get_option('buildtype') == 'debug'
|
||||
add_project_arguments('-DDEBUG', language: ['c', 'cpp'])
|
||||
endif
|
||||
|
||||
-libweston_version = 10
|
||||
+libweston_version = 12
|
||||
dir_prefix = get_option('prefix')
|
||||
dir_lib = dir_prefix / get_option('libdir')
|
||||
dir_module_weston = dir_lib / 'weston'
|
||||
-dir_system_include = '/usr/include'
|
||||
+dir_system_include = dir_lib / 'include'
|
||||
|
||||
weston = dependency('libweston-@0@'.format(libweston_version), method: 'pkg-config')
|
||||
wayland_server = dependency('wayland-server', method: 'pkg-config')
|
||||
@@ -47,7 +47,7 @@ shared_library(
|
||||
name_prefix: '',
|
||||
install: true,
|
||||
install_dir: dir_module_weston,
|
||||
- include_directories: ['@0@/libweston-@1@'.format(dir_system_include, libweston_version), '@0@/pixman-1'.format(dir_system_include)]
|
||||
+ #include_directories: ['@0@/libweston-@1@'.format(dir_system_include, libweston_version), '@0@/pixman-1'.format(dir_system_include)]
|
||||
)
|
||||
|
||||
executable(
|
||||
@@ -56,4 +56,4 @@ executable(
|
||||
dependencies: [wayland_client],
|
||||
name_prefix: '',
|
||||
install: false
|
||||
-)
|
||||
\ No newline at end of file
|
||||
+)
|
|
@ -2,6 +2,7 @@
|
|||
idle-time=0
|
||||
backend=drm-backend.so
|
||||
shell=kiosk-shell.so
|
||||
modules=systemd-notify.so,kiosk-shell-dpms.so
|
||||
xwayland=true
|
||||
|
||||
[xwayland]
|
||||
|
|
Loading…
Reference in a new issue