* "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu
@ 2024-06-13 5:59 Marek Olšák
2024-06-13 6:00 ` Marek Olšák
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Marek Olšák @ 2024-06-13 5:59 UTC (permalink / raw)
To: Thomas Zimmermann, javierm, pjones, deller, ardb, dri-devel,
linux-fbdev, Deucher, Alexander, Christian König
Hi Thomas,
Commit 9eac534db0013aff9b9124985dab114600df9081 as per the title
breaks (crashes?) lightdm (login screen) such that all I get is the
terminal. It's also reproducible with tag v6.9 where the commit is
present.
Reverting the commit fixes lightdm. A workaround is to bypass lightdm
by triggering auto-login. This is a bug report.
(For AMD folks: It's also reproducible with amd-staging-drm-next.)
Marek
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu
2024-06-13 5:59 "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu Marek Olšák
@ 2024-06-13 6:00 ` Marek Olšák
2024-06-13 7:23 ` Thomas Zimmermann
2024-06-19 13:50 ` Thomas Zimmermann
2024-06-21 9:50 ` Thomas Zimmermann
2 siblings, 1 reply; 9+ messages in thread
From: Marek Olšák @ 2024-06-13 6:00 UTC (permalink / raw)
To: Thomas Zimmermann, javierm, pjones, deller, ardb, dri-devel,
linux-fbdev, Deucher, Alexander, Christian König,
amd-gfx mailing list
+amd-gfx
On Thu, Jun 13, 2024 at 1:59 AM Marek Olšák <maraeo@gmail.com> wrote:
>
> Hi Thomas,
>
> Commit 9eac534db0013aff9b9124985dab114600df9081 as per the title
> breaks (crashes?) lightdm (login screen) such that all I get is the
> terminal. It's also reproducible with tag v6.9 where the commit is
> present.
>
> Reverting the commit fixes lightdm. A workaround is to bypass lightdm
> by triggering auto-login. This is a bug report.
>
> (For AMD folks: It's also reproducible with amd-staging-drm-next.)
>
> Marek
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu
2024-06-13 6:00 ` Marek Olšák
@ 2024-06-13 7:23 ` Thomas Zimmermann
2024-06-13 14:20 ` Marek Olšák
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Zimmermann @ 2024-06-13 7:23 UTC (permalink / raw)
To: Marek Olšák, javierm, pjones, deller, ardb, dri-devel,
linux-fbdev, Deucher, Alexander, Christian König,
amd-gfx mailing list
Hi
Am 13.06.24 um 08:00 schrieb Marek Olšák:
> +amd-gfx
>
> On Thu, Jun 13, 2024 at 1:59 AM Marek Olšák <maraeo@gmail.com> wrote:
>> Hi Thomas,
>>
>> Commit 9eac534db0013aff9b9124985dab114600df9081 as per the title
>> breaks (crashes?) lightdm (login screen) such that all I get is the
>> terminal. It's also reproducible with tag v6.9 where the commit is
>> present.
>>
>> Reverting the commit fixes lightdm. A workaround is to bypass lightdm
>> by triggering auto-login. This is a bug report.
I see. Do you know why it crashes? Or have any logs.
Best regards
Thomas
>>
>> (For AMD folks: It's also reproducible with amd-staging-drm-next.)
>>
>> Marek
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu
2024-06-13 7:23 ` Thomas Zimmermann
@ 2024-06-13 14:20 ` Marek Olšák
2024-06-13 14:59 ` Thomas Zimmermann
0 siblings, 1 reply; 9+ messages in thread
From: Marek Olšák @ 2024-06-13 14:20 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: javierm, pjones, deller, ardb, dri-devel, linux-fbdev,
Deucher, Alexander, Christian König, amd-gfx mailing list
On Thu, Jun 13, 2024 at 3:23 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Hi
>
> Am 13.06.24 um 08:00 schrieb Marek Olšák:
> > +amd-gfx
> >
> > On Thu, Jun 13, 2024 at 1:59 AM Marek Olšák <maraeo@gmail.com> wrote:
> >> Hi Thomas,
> >>
> >> Commit 9eac534db0013aff9b9124985dab114600df9081 as per the title
> >> breaks (crashes?) lightdm (login screen) such that all I get is the
> >> terminal. It's also reproducible with tag v6.9 where the commit is
> >> present.
> >>
> >> Reverting the commit fixes lightdm. A workaround is to bypass lightdm
> >> by triggering auto-login. This is a bug report.
>
> I see. Do you know why it crashes? Or have any logs.
How to debug this? I only know it's run through systemctl somehow.
Marek
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu
2024-06-13 14:20 ` Marek Olšák
@ 2024-06-13 14:59 ` Thomas Zimmermann
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Zimmermann @ 2024-06-13 14:59 UTC (permalink / raw)
To: Marek Olšák
Cc: javierm, pjones, deller, ardb, dri-devel, linux-fbdev,
Deucher, Alexander, Christian König, amd-gfx mailing list
Hi
Am 13.06.24 um 16:20 schrieb Marek Olšák:
> On Thu, Jun 13, 2024 at 3:23 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>> Hi
>>
>> Am 13.06.24 um 08:00 schrieb Marek Olšák:
>>> +amd-gfx
>>>
>>> On Thu, Jun 13, 2024 at 1:59 AM Marek Olšák <maraeo@gmail.com> wrote:
>>>> Hi Thomas,
>>>>
>>>> Commit 9eac534db0013aff9b9124985dab114600df9081 as per the title
>>>> breaks (crashes?) lightdm (login screen) such that all I get is the
>>>> terminal. It's also reproducible with tag v6.9 where the commit is
>>>> present.
>>>>
>>>> Reverting the commit fixes lightdm. A workaround is to bypass lightdm
>>>> by triggering auto-login. This is a bug report.
>> I see. Do you know why it crashes? Or have any logs.
> How to debug this? I only know it's run through systemctl somehow.
IDK what Ubuntu supports, but 'systemctl status' or 'journalctl' might
turn up something.
https://unix.stackexchange.com/questions/225401/how-to-see-full-log-from-systemctl-status-service
From there, maybe with additional fprintf(stderr) output.
Best regards
Thomas
>
> Marek
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu
2024-06-13 5:59 "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu Marek Olšák
2024-06-13 6:00 ` Marek Olšák
@ 2024-06-19 13:50 ` Thomas Zimmermann
2024-06-19 18:40 ` Marek Olšák
2024-06-21 9:50 ` Thomas Zimmermann
2 siblings, 1 reply; 9+ messages in thread
From: Thomas Zimmermann @ 2024-06-19 13:50 UTC (permalink / raw)
To: Marek Olšák, javierm, pjones, deller, ardb, dri-devel,
linux-fbdev, Deucher, Alexander, Christian König
Hi
Am 13.06.24 um 07:59 schrieb Marek Olšák:
> Hi Thomas,
>
> Commit 9eac534db0013aff9b9124985dab114600df9081 as per the title
> breaks (crashes?) lightdm (login screen) such that all I get is the
> terminal. It's also reproducible with tag v6.9 where the commit is
> present.
I was able to reproduce the problem with Ubutu 22.04 and later under
qemu plus qxl, sort of. I login via gdm3 and then the quest machine
switches off entirely.
>
> Reverting the commit fixes lightdm. A workaround is to bypass lightdm
> by triggering auto-login. This is a bug report.
The problem is that reverting the commit doesn't fix the issue for me.
I'll try to do my own bisecting.
Best regards
Thomas
>
> (For AMD folks: It's also reproducible with amd-staging-drm-next.)
>
> Marek
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu
2024-06-19 13:50 ` Thomas Zimmermann
@ 2024-06-19 18:40 ` Marek Olšák
2024-06-20 6:40 ` Thomas Zimmermann
0 siblings, 1 reply; 9+ messages in thread
From: Marek Olšák @ 2024-06-19 18:40 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: javierm, pjones, deller, ardb, dri-devel, linux-fbdev,
Deucher, Alexander, Christian König
[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]
Attached is the revert commit that works for me. Tested with Radeon
6800 and Radeon 7900XTX.
Marek
Marek
On Wed, Jun 19, 2024 at 9:50 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Hi
>
> Am 13.06.24 um 07:59 schrieb Marek Olšák:
> > Hi Thomas,
> >
> > Commit 9eac534db0013aff9b9124985dab114600df9081 as per the title
> > breaks (crashes?) lightdm (login screen) such that all I get is the
> > terminal. It's also reproducible with tag v6.9 where the commit is
> > present.
>
> I was able to reproduce the problem with Ubutu 22.04 and later under
> qemu plus qxl, sort of. I login via gdm3 and then the quest machine
> switches off entirely.
>
> >
> > Reverting the commit fixes lightdm. A workaround is to bypass lightdm
> > by triggering auto-login. This is a bug report.
>
> The problem is that reverting the commit doesn't fix the issue for me.
> I'll try to do my own bisecting.
>
> Best regards
> Thomas
>
> >
> > (For AMD folks: It's also reproducible with amd-staging-drm-next.)
> >
> > Marek
>
> --
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Frankenstrasse 146, 90461 Nuernberg, Germany
> GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
> HRB 36809 (AG Nuernberg)
>
[-- Attachment #2: 0001-Revert-firmware-sysfb-Set-firmware-framebuffer-paren.patch --]
[-- Type: application/x-patch, Size: 4600 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu
2024-06-19 18:40 ` Marek Olšák
@ 2024-06-20 6:40 ` Thomas Zimmermann
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Zimmermann @ 2024-06-20 6:40 UTC (permalink / raw)
To: Marek Olšák
Cc: javierm, pjones, deller, ardb, dri-devel, linux-fbdev,
Deucher, Alexander, Christian König
Hi
Am 19.06.24 um 20:40 schrieb Marek Olšák:
> Attached is the revert commit that works for me. Tested with Radeon
> 6800 and Radeon 7900XTX.
Thanks. That's the same revert that I did. Let's see if my bisecting
turns up something.
Best regards
Thomas
>
> Marek
>
>
> Marek
>
> On Wed, Jun 19, 2024 at 9:50 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>> Hi
>>
>> Am 13.06.24 um 07:59 schrieb Marek Olšák:
>>> Hi Thomas,
>>>
>>> Commit 9eac534db0013aff9b9124985dab114600df9081 as per the title
>>> breaks (crashes?) lightdm (login screen) such that all I get is the
>>> terminal. It's also reproducible with tag v6.9 where the commit is
>>> present.
>> I was able to reproduce the problem with Ubutu 22.04 and later under
>> qemu plus qxl, sort of. I login via gdm3 and then the quest machine
>> switches off entirely.
>>
>>> Reverting the commit fixes lightdm. A workaround is to bypass lightdm
>>> by triggering auto-login. This is a bug report.
>> The problem is that reverting the commit doesn't fix the issue for me.
>> I'll try to do my own bisecting.
>>
>> Best regards
>> Thomas
>>
>>> (For AMD folks: It's also reproducible with amd-staging-drm-next.)
>>>
>>> Marek
>> --
>> --
>> Thomas Zimmermann
>> Graphics Driver Developer
>> SUSE Software Solutions Germany GmbH
>> Frankenstrasse 146, 90461 Nuernberg, Germany
>> GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
>> HRB 36809 (AG Nuernberg)
>>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu
2024-06-13 5:59 "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu Marek Olšák
2024-06-13 6:00 ` Marek Olšák
2024-06-19 13:50 ` Thomas Zimmermann
@ 2024-06-21 9:50 ` Thomas Zimmermann
2 siblings, 0 replies; 9+ messages in thread
From: Thomas Zimmermann @ 2024-06-21 9:50 UTC (permalink / raw)
To: Marek Olšák, javierm, pjones, deller, ardb, dri-devel,
linux-fbdev, Deucher, Alexander, Christian König
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
Hi Marek
Am 13.06.24 um 07:59 schrieb Marek Olšák:
> Hi Thomas,
>
> Commit 9eac534db0013aff9b9124985dab114600df9081 as per the title
> breaks (crashes?) lightdm (login screen) such that all I get is the
> terminal. It's also reproducible with tag v6.9 where the commit is
> present.
I still cannot reproduce the problem reliably. But I've found a
ref-counting bug on the parent device that was introduced by that
commit. This needs to be fixed anyway. A patch is attached if you want
to test.
Best regards
Thomas
>
> Reverting the commit fixes lightdm. A workaround is to bypass lightdm
> by triggering auto-login. This is a bug report.
>
> (For AMD folks: It's also reproducible with amd-staging-drm-next.)
>
> Marek
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #2: 0001-firmware-sysfb-Fix-reference-count-of-syfb-parent-de.patch --]
[-- Type: text/x-patch, Size: 2021 bytes --]
From 5ca700a36fc06e1ec5b3c2c9a383c2d0011c0d83 Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann <tzimmermann@suse.de>
Date: Tue, 18 Jun 2024 17:37:11 +0200
Subject: [PATCH] firmware: sysfb: Fix reference count of syfb parent device
Retrieving the system framebuffer's parent device in sysfb_init()
increments the parent device's reference count. Hence release the
reference before leaving the init function.
Adding the sysfb platform device acquires and additional reference
for the parent. This keeps the parent device around while the system
framebuffer is in use.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 9eac534db001 ("firmware/sysfb: Set firmware-framebuffer parent device")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Sui Jingfeng <suijingfeng@loongson.cn>
Cc: <stable@vger.kernel.org> # v6.9+
---
drivers/firmware/sysfb.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/sysfb.c b/drivers/firmware/sysfb.c
index 880ffcb500887..a316bd92dfed2 100644
--- a/drivers/firmware/sysfb.c
+++ b/drivers/firmware/sysfb.c
@@ -137,7 +137,7 @@ static __init int sysfb_init(void)
if (compatible) {
pd = sysfb_create_simplefb(si, &mode, parent);
if (!IS_ERR(pd))
- goto unlock_mutex;
+ goto put_device;
}
/* if the FB is incompatible, create a legacy framebuffer device */
@@ -155,7 +155,7 @@ static __init int sysfb_init(void)
pd = platform_device_alloc(name, 0);
if (!pd) {
ret = -ENOMEM;
- goto unlock_mutex;
+ goto put_device;
}
pd->dev.parent = parent;
@@ -170,9 +170,12 @@ static __init int sysfb_init(void)
if (ret)
goto err;
- goto unlock_mutex;
+
+ goto put_device;
err:
platform_device_put(pd);
+put_device:
+ put_device(parent);
unlock_mutex:
mutex_unlock(&disable_lock);
return ret;
--
2.45.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-06-21 9:50 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13 5:59 "firmware/sysfb: Set firmware-framebuffer parent device" breaks lightdm on Ubuntu 22.04 using amdgpu Marek Olšák
2024-06-13 6:00 ` Marek Olšák
2024-06-13 7:23 ` Thomas Zimmermann
2024-06-13 14:20 ` Marek Olšák
2024-06-13 14:59 ` Thomas Zimmermann
2024-06-19 13:50 ` Thomas Zimmermann
2024-06-19 18:40 ` Marek Olšák
2024-06-20 6:40 ` Thomas Zimmermann
2024-06-21 9:50 ` Thomas Zimmermann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.