Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: There is no gdm.service, so where to add gdm session exec line?

  1. #1

    Default There is no gdm.service, so where to add gdm session exec line?

    I want to control the colorspace that my gpu uses to display the desktop.

    I have a PC that uses a TV as its display.
    The color range of the TV is 16-235 (limited rgb), but the full range is being sent, resulting in crushment of darkest and brightest shades.

    I prefer to figure out a way to manage colorspace in wayland, and found several references to this brad-x post on specifying colorspace in wayland, but I quickly found that:
    Quote Originally Posted by malcolmlewis View Post
    There is no gdm.service file in Tumbleweed, it's all done via update-alternatives
    So what is another way (or the right way) to add the following line to a gdm-session start sequence?
    Code:
    ExecStartPre=/usr/local/bin/proptest -M radeon -D /dev/dri/card0 48 connector 40 1
    Or am I approaching this completely wrong? maybe there's a tool for this?

    -Cyril

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,104
    Blog Entries
    15

    Default Re: There is no gdm.service, so where to add gdm session exec line?

    Quote Originally Posted by 53Ri41 View Post
    I want to control the colorspace that my gpu uses to display the desktop.

    I have a PC that uses a TV as its display.
    The color range of the TV is 16-235 (limited rgb), but the full range is being sent, resulting in crushment of darkest and brightest shades.

    I prefer to figure out a way to manage colorspace in wayland, and found several references to this brad-x post on specifying colorspace in wayland, but I quickly found that:

    So what is another way (or the right way) to add the following line to a gdm-session start sequence?
    Code:
    ExecStartPre=/usr/local/bin/proptest -M radeon -D /dev/dri/card0 48 connector 40 1
    Or am I approaching this completely wrong? maybe there's a tool for this?

    -Cyril
    Hi
    What I would do is copy the service over to /etc/systemd/system and edit that one with your pre execute and see how it goes.

    Can this be run as your user? If so, just add to the users ~/.profile so it gets run at login.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: There is no gdm.service, so where to add gdm session exec line?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    What I would do is copy the service over to /etc/systemd/system and edit that one
    Hello.

    Sounds good, but which service am I copying? I see services under /usr/lib/systemd/system, but no gdm.service.

    Thanks for your help @malcolmlewis
    -Cyril

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,104
    Blog Entries
    15

    Default Re: There is no gdm.service, so where to add gdm session exec line?

    Quote Originally Posted by 53Ri41 View Post
    Hello.

    Sounds good, but which service am I copying? I see services under /usr/lib/systemd/system, but no gdm.service.

    Thanks for your help @malcolmlewis
    -Cyril
    Hi
    You can create your own, just need to ensure it starts after the display-manager, then just make it an Exec=. Have a look at /etc/systemd/system/graphical.target.wants/display-manager.service
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Sep 2012
    Posts
    5,201

    Default Re: There is no gdm.service, so where to add gdm session exec line?

    Quote Originally Posted by malcolmlewis View Post
    HiYou can create your own [service], just need to ensure it starts after the display-manager
    According to blog mentioned in the original post, it has to start before​ display-manager.

  6. #6

    Default Re: There is no gdm.service, so where to add gdm session exec line?

    Quote Originally Posted by arvidjaar View Post
    According to blog mentioned in the original post, it has to start before​ display-manager.
    Thanks, I only have a cursory understanding of how these services work, but I was definitely feeling like the recommendation was in conflict with the directions of the original post.
    To be fair, I asked specifically about gdm.service, and so got advice centered there-about.
    The original post only states that the command needs to be run prior to the start of wayland, which (I think) is called by the display-manager service.

    Because this is a permanent setup (pc will always be viewed through this rgb-limited display), I prefer that the command is run as soon as possible, so that it is active for ANY display, graphical or not, no matter the user.
    I have observed that the command has immediate effect at run-level3, so in theory I could set before=graphical.target and also before=multi-user.target.

    Thanks for the feedback, I will try some things...

    or is there a way to run this via kms? or as a grub entry?
    this kernel.org/kms page suggests that a kms rgb/colorspace entry is possible.
    Time to go learn (break) some stuff...

    -Cyril

  7. #7

    Default Re: There is no gdm.service, so where to add gdm session exec line?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    You can create your own [ ... ] Have a look at /etc/systemd/system/graphical.target.wants/display-manager.service
    Quote Originally Posted by arvidjaar View Post
    According to blog mentioned in the original post, it has to start before​ display-manager.
    Success! Thank you both. With a few cues from the afore-mentioned display-manager unit, I came up with the service file below ( tvRGB.service )
    Feedback is welcome.

    Code:
    [Unit]
    Description=Force tvRGB output
    After=rc-local.service plymouth-start.service systemd-user-sessions.service
    Before=display-manager.service
    
    [Service]
    Type=oneshot
    ExecStart=-/bin/sh -c '/usr/bin/proptest -M radeon -D /dev/dri/card0 48 connector 40 1'
    
    [Install]
    WantedBy=multi-user.target

  8. #8
    Join Date
    Sep 2012
    Posts
    5,201

    Default Re: There is no gdm.service, so where to add gdm session exec line?

    Quote Originally Posted by 53Ri41 View Post
    Code:
    ExecStart=-/bin/sh -c '/usr/bin/proptest -M radeon -D /dev/dri/card0 48 connector 40 1'
    There is no need to use /bin/sh here, just use your command directly.

  9. #9

    Default Re: There is no gdm.service, so where to add gdm session exec line?

    Quote Originally Posted by arvidjaar View Post
    There is no need to use /bin/sh here, just use your command directly.
    When I remove the /bin/sh, the service fails with:
    Code:
    code=exited, status=243
    although when I systemctl start tvRGB.service from runlevel-3, the service runs successfully:
    Code:
    code=exited, status=0/SUCCESS
    I'll need to look into timing again...

  10. #10

    Default Re: There is no gdm.service, so where to add gdm session exec line?

    This has become confusing and frustrating.
    I can't find any information on the exit-code "status=243", and the command works.
    The unit works as long as I manually start it prior to logging into a wayland session,
    but the unit errors when auto started.

    Any help is appreciated.

    -Cyril

    Code:
    cyril@ten:~> systemctl status tvRGBa.service 
    ● tvRGBa.service - Force tvRGB output
       Loaded: loaded (/etc/systemd/system/tvRGBa.service; enabled; vendor preset: disabled)
       Active: inactive (dead) since Mon 2019-10-21 16:50:04 EDT; 2min 23s ago
      Process: 1748 ExecStart=-/usr/bin/proptest -M i915 -D /dev/dri/card0 68 connector 70 2 (code=exited, status=243)
     Main PID: 1748 (code=exited, status=243)

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •