Skip to main content
Topic: CD Tray opens after reboot (Read 782 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

CD Tray opens after reboot

Hello,
Yesterday, I installed Artix with the OpenRC init system and XFCE as the DE, all went smoothly.
But today, I tried to restart the OS to fix some grub issue, and the CD tray opened when Artix was booting up.
At first, I thought it was maybe me clicking it randomly, so I tried restarting again, and it did the same thing.
So I looked online and found a script to log the process that executes /usr/bin/eject at startup, which is the following:
Code: [Select]
#!/usr/bin/bash
echo "eject `ps -o %a`" >> /home/tux/cdtray.log

oldeject
and rebooted the system, the CD tray still opened, but there was no cdtray.log in the home folder.
This issue happens only when I try to restart the computer, if I fully shutdown and then boot it up, the CD tray doesn't eject.

Do you guys have any idea why its happening and is there any way to fix it?
I'll happily provide more logs if needed.

Re: CD Tray opens after reboot

Reply #1
Again, nobody can help you if you don't provide detailed logs, preferably using paste.artixlinux.org.

That said, and given no faulty archaic hardware nor custom-configured kernel with custom archaic drivers:

Yesterday, I installed Artix with the OpenRC init system and XFCE as the DE, all went smoothly.
But today, I tried to restart the OS to fix some grub issue, and the CD tray opened when Artix was booting up.
By "fix some grub issue" you mean exactly what? And anything else, if applicable?
Quote
So I looked online and found a script to log the process that executes /usr/bin/eject at startup, which is the following:
Code: [Select]
#!/usr/bin/bash
echo "eject `ps -o %a`" >> /home/tux/cdtray.log

oldeject
There is normally no "process that executes /usr/bin/eject at startup". If you add the call yourself (I presume "oldeject" is the renamed "eject" program), like this script you quoted, of course it will eject the tray. But it was you who added it, it wasn't there to begin with.

By the way, this seems to echo the string "eject", joined by the output of the "ps" command, printing the full command lines of all the processes with a controlling terminal run by the user, preceeded with the column title "COMMAND", and append the output to /home/tux/cdtray.log, then call "oldeject", whatever that is. The end result would be something like this in /home/tux/cdtray.log, provided the /home/tux exists and is a directory (just an example, if there were more processes running the output would be different):

Code: [Select]
eject COMMAND
/bin/bash
ps -o %a

Quote
This issue happens only when I try to restart the computer, if I fully shutdown and then boot it up, the CD tray doesn't eject.
Highly unlikely if you have the script you quoted execute at boot.

Re: CD Tray opens after reboot

Reply #2
By "fix some grub issue" you mean exactly what? And anything else, if applicable?
I was trying to fix the Windows Boot Manager entry on grub, it was not showing up so I was running update-grub to fix it, and I had to restart the computer to see if that worked.
There is normally no "process that executes /usr/bin/eject at startup". If you add the call yourself (I presume "oldeject" is the renamed "eject" program), like this script you quoted, of course it will eject the tray. But it was you who added it, it wasn't there to begin with.
I renamed the original eject binary to oldeject, and made that script in hopes of catching a process that would've invoked the eject binary, but to no avail.

As for the logs:
lspci -v command: https://paste.artixlinux.org/view/b4a5972f
dmesg command: https://paste.artixlinux.org/view/d5b01328
/var/log/rc.log file: https://paste.artixlinux.org/view/91644186
/var/log/everything.log file: https://paste.artixlinux.org/view/d5533ee8