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

lightdm-fb: add hotplug support for display port #466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arulcse2008
Copy link

Add hotplug support for display port.
Add lightdm-fb package to lxde.yml by default

Fixes: #463

Add hotplug support for display port.
Add lightdm-fb package to lxde.yml by default

Fixes: siemens#463

Signed-off-by: Arulpandiyan Vadivel <[email protected]>
@arulcse2008
Copy link
Author

@jan-kiszka @BaochengSu Kindly help to review the changes

Display port hotplug is working logs were attached for reference below.

root@iot2050-debian:~# dmesg |tail
[   12.293291] remoteproc remoteproc3: powering up b004000.rtu
[   12.301086] remoteproc remoteproc3: Booting fw image ti-pruss/am65x-sr2-rtu0-prueth-fw.elf, size 30872
[   12.310444] remoteproc remoteproc3: remote processor b004000.rtu is now up
[   12.317351] remoteproc remoteproc4: powering up b00a000.txpru
[   12.327432] remoteproc remoteproc4: Booting fw image ti-pruss/am65x-sr2-txpru0-prueth-fw.elf, size 37328
[   12.336964] remoteproc remoteproc4: remote processor b00a000.txpru is now up
[   12.345967] net eno2: started
[   33.839519] tps62363-vout: disabling
[   63.971848] Console: switching to colour frame buffer device 240x67
[   64.011260] tidss 4a00000.dss: [drm] fb0: tidssdrmfb frame buffer device
root@iot2050-debian:~# systemctl status lightdm
● lightdm.service - Light Display Manager
     Loaded: loaded (8;;file://iot2050-debian/lib/systemd/system/lightdm.service/lib/systemd/system/lightdm.service8;;; enabled; preset: enabled)
     Active: active (running) since Tue 2023-02-28 11:18:51 UTC; 11s ago
       Docs: 8;;man:lightdm(1)man:lightdm(1)8;;
   Main PID: 523 (lightdm)
      Tasks: 7 (limit: 2289)
     Memory: 99.6M
        CPU: 1.398s
     CGroup: /system.slice/lightdm.service
             ├─523 /usr/sbin/lightdm
             ├─529 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
             └─591 lightdm --session-child 15 22

Feb 28 11:18:50 iot2050-debian systemd[1]: Starting lightdm.service - Light Display Manager...
Feb 28 11:18:51 iot2050-debian systemd[1]: Started lightdm.service - Light Display Manager.
Feb 28 11:18:51 iot2050-debian lightdm[523]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: Th>
Feb 28 11:18:55 iot2050-debian lightdm[552]: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: Th>
Feb 28 11:18:55 iot2050-debian lightdm[552]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=105) by (uid=0)
root@iot2050-debian:~# ls -la /dev/fb0
crw-rw---- 1 root video 29, 0 Feb 28 11:18 /dev/fb0
root@iot2050-debian:~#

#

# Add support for hotplug of Display Port
sed -i 's/LABEL="systemd_end"/SUBSYSTEM=="graphics", KERNEL=="fb0", SYMLINK="fb0", TAG+="systemd"\nLABEL="systemd_end"/g' /lib/udev/rules.d/99-systemd.rules
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please ship and install a file to /etc. Make this package a customization package.

Copy link
Contributor

Choose a reason for hiding this comment

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

in addition, the whole purpose of rules.d is to let people add their own rules (in separate files)

Copy link
Member

Choose a reason for hiding this comment

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

The correct debian way would be to use dh_installudev. By that, the file also gets correctly numbered. Just put it into its own package and add a file <package>.udev in the debian folder. For details, see man dh_installudev.

# Add support for hotplug of Display Port
sed -i 's/LABEL="systemd_end"/SUBSYSTEM=="graphics", KERNEL=="fb0", SYMLINK="fb0", TAG+="systemd"\nLABEL="systemd_end"/g' /lib/udev/rules.d/99-systemd.rules

sed -i '/plymouth/d' /lib/systemd/system/lightdm.service
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nope, thats's what /etc/systemd is for.

Copy link
Contributor

Choose a reason for hiding this comment

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

it is also unclear what we are doing here (I mean I understand that we are essentially killing every single line where the word plymouth can be found but why?)

@jan-kiszka
Copy link
Collaborator

And the commit messages of the patch should explain what is going on, not just list what it does.

@jan-kiszka
Copy link
Collaborator

Will this receive an update?

@arulcse2008
Copy link
Author

Will this receive an update?

Yes we will get an update,

Please ship and install a file to /etc. Make this package a customization package.

Can you help me to understand what do you mean by making customization package? Rest of the comments I can understand

@jan-kiszka
Copy link
Collaborator

Create something like customizations-lxde or add your custom lightdm.service to https://github.com/siemens/meta-iot2050/tree/master/recipes-core/customizations-example if the lxde image is selected. The former might be cleaner, see also https://github.com/siemens/meta-iot2050/tree/master/recipes-core/customizations-swupdate

@arulcse2008
Copy link
Author

Create something like customizations-lxde or add your custom lightdm.service to https://github.com/siemens/meta-iot2050/tree/master/recipes-core/customizations-example if the lxde image is selected. The former might be cleaner, see also https://github.com/siemens/meta-iot2050/tree/master/recipes-core/customizations-swupdate

Thanks for the information, I will update the PR shortly

sed -i 's/LABEL="systemd_end"/SUBSYSTEM=="graphics", KERNEL=="fb0", SYMLINK="fb0", TAG+="systemd"\nLABEL="systemd_end"/g' /lib/udev/rules.d/99-systemd.rules

sed -i '/plymouth/d' /lib/systemd/system/lightdm.service
sed -i '/Service/i [email protected] [email protected]\[email protected] [email protected]\nBindsTo=dev-fb0.device\nAfter=dev-fb0.device\n' /lib/systemd/system/lightdm.service
Copy link
Contributor

Choose a reason for hiding this comment

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

please use a systemd dropin (we should avoid patching systemd units from other packages)

@@ -0,0 +1,12 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

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

if we ship a postinst script, we should ideally have a postrm script to support uninstallation

@jan-kiszka
Copy link
Collaborator

Waiting for an update...

@jan-kiszka
Copy link
Collaborator

Still no update - while gates are closing...

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

Successfully merging this pull request may close these issues.

IOT2050 Advanced PG2 board Display enumeration
4 participants